From 407b8a697c9687e4951dbcad42be77c96e4307de Mon Sep 17 00:00:00 2001 From: Yuchao Yan Date: Tue, 19 May 2026 14:23:20 +0800 Subject: [PATCH 1/3] generated from swagger:9dcf0e13ae13d5b5abbdcd7429272412975300a3 --- sdk/cdn/azure-mgmt-cdn/CHANGELOG.md | 4 + sdk/cdn/azure-mgmt-cdn/MANIFEST.in | 9 +- sdk/cdn/azure-mgmt-cdn/README.md | 6 +- sdk/cdn/azure-mgmt-cdn/_meta.json | 11 - sdk/cdn/azure-mgmt-cdn/_metadata.json | 11 + .../azure-mgmt-cdn/apiview-properties.json | 618 + sdk/cdn/azure-mgmt-cdn/azure/__init__.py | 2 +- sdk/cdn/azure-mgmt-cdn/azure/mgmt/__init__.py | 2 +- .../azure-mgmt-cdn/azure/mgmt/cdn/__init__.py | 12 +- .../azure/mgmt/cdn/_cdn_management_client.py | 44 +- .../azure/mgmt/cdn/_configuration.py | 24 +- .../azure-mgmt-cdn/azure/mgmt/cdn/_patch.py | 2 + .../azure/mgmt/cdn/_utils/__init__.py | 6 + .../serialization.py} | 603 +- .../cdn/{aio/_vendor.py => _utils/utils.py} | 19 +- .../azure-mgmt-cdn/azure/mgmt/cdn/_vendor.py | 36 - .../azure-mgmt-cdn/azure/mgmt/cdn/_version.py | 3 +- .../azure/mgmt/cdn/aio/__init__.py | 12 +- .../mgmt/cdn/aio/_cdn_management_client.py | 46 +- .../azure/mgmt/cdn/aio/_configuration.py | 24 +- .../azure/mgmt/cdn/aio/_patch.py | 2 + .../azure/mgmt/cdn/aio/operations/__init__.py | 56 +- .../_afd_custom_domains_operations.py | 238 +- .../operations/_afd_endpoints_operations.py | 302 +- .../_afd_origin_groups_operations.py | 219 +- .../aio/operations/_afd_origins_operations.py | 201 +- .../operations/_afd_profiles_operations.py | 153 +- .../_cdn_management_client_operations.py | 74 +- .../operations/_custom_domains_operations.py | 194 +- .../aio/operations/_edge_nodes_operations.py | 39 +- .../aio/operations/_endpoints_operations.py | 337 +- .../operations/_log_analytics_operations.py | 108 +- .../_managed_rule_sets_operations.py | 39 +- .../mgmt/cdn/aio/operations/_operations.py | 39 +- .../operations/_origin_groups_operations.py | 165 +- .../cdn/aio/operations/_origins_operations.py | 165 +- .../azure/mgmt/cdn/aio/operations/_patch.py | 1 + .../aio/operations/_policies_operations.py | 150 +- .../aio/operations/_profiles_operations.py | 772 +- .../operations/_resource_usage_operations.py | 39 +- .../cdn/aio/operations/_routes_operations.py | 201 +- .../aio/operations/_rule_sets_operations.py | 141 +- .../cdn/aio/operations/_rules_operations.py | 201 +- .../cdn/aio/operations/_secrets_operations.py | 153 +- .../_security_policies_operations.py | 201 +- .../azure/mgmt/cdn/models/__init__.py | 851 +- .../models/_cdn_management_client_enums.py | 308 +- .../azure/mgmt/cdn/models/_models_py3.py | 2149 +- .../azure/mgmt/cdn/models/_patch.py | 1 + .../azure/mgmt/cdn/operations/__init__.py | 56 +- .../_afd_custom_domains_operations.py | 301 +- .../operations/_afd_endpoints_operations.py | 384 +- .../_afd_origin_groups_operations.py | 282 +- .../cdn/operations/_afd_origins_operations.py | 254 +- .../operations/_afd_profiles_operations.py | 194 +- .../_cdn_management_client_operations.py | 87 +- .../operations/_custom_domains_operations.py | 233 +- .../cdn/operations/_edge_nodes_operations.py | 43 +- .../cdn/operations/_endpoints_operations.py | 405 +- .../operations/_log_analytics_operations.py | 147 +- .../_managed_rule_sets_operations.py | 45 +- .../azure/mgmt/cdn/operations/_operations.py | 43 +- .../operations/_origin_groups_operations.py | 198 +- .../cdn/operations/_origins_operations.py | 198 +- .../azure/mgmt/cdn/operations/_patch.py | 1 + .../cdn/operations/_policies_operations.py | 201 +- .../cdn/operations/_profiles_operations.py | 943 +- .../operations/_resource_usage_operations.py | 43 +- .../mgmt/cdn/operations/_routes_operations.py | 254 +- .../cdn/operations/_rule_sets_operations.py | 194 +- .../mgmt/cdn/operations/_rules_operations.py | 254 +- .../cdn/operations/_secrets_operations.py | 198 +- .../_security_policies_operations.py | 254 +- .../azure-mgmt-cdn/code_report_swagger.json | 56539 ++++++++++++++++ .../afd_custom_domains_create.py | 17 +- .../afd_custom_domains_delete.py | 5 +- .../afd_custom_domains_get.py | 5 +- .../afd_custom_domains_list_by_profile.py | 5 +- ...custom_domains_refresh_validation_token.py | 5 +- .../afd_custom_domains_update.py | 17 +- .../generated_samples/afd_endpoints_create.py | 7 +- .../generated_samples/afd_endpoints_delete.py | 5 +- .../generated_samples/afd_endpoints_get.py | 4 +- .../afd_endpoints_list_by_profile.py | 5 +- .../afd_endpoints_list_resource_usage.py | 5 +- .../afd_endpoints_purge_content.py | 7 +- .../generated_samples/afd_endpoints_update.py | 7 +- .../afd_endpoints_validate_custom_domain.py | 7 +- .../afd_origin_groups_create.py | 14 +- .../afd_origin_groups_delete.py | 5 +- .../afd_origin_groups_get.py | 5 +- .../afd_origin_groups_list_by_profile.py | 5 +- .../afd_origin_groups_list_resource_usage.py | 5 +- .../afd_origin_groups_update.py | 14 +- .../generated_samples/afd_origins_create.py | 6 +- .../generated_samples/afd_origins_delete.py | 4 +- .../generated_samples/afd_origins_get.py | 4 +- .../afd_origins_list_by_origin_group.py | 5 +- .../generated_samples/afd_origins_update.py | 6 +- ...ofiles_check_endpoint_name_availability.py | 7 +- ...d_profiles_check_host_name_availability.py | 7 +- .../afd_profiles_list_resource_usage.py | 5 +- .../generated_samples/afd_profiles_upgrade.py | 7 +- .../afd_profiles_validate_secret.py | 7 +- .../cdn_profiles_can_migrate.py | 43 + .../generated_samples/cdn_profiles_migrate.py | 44 + .../check_endpoint_name_availability.py | 7 +- .../check_name_availability.py | 5 +- ...eck_name_availability_with_subscription.py | 7 +- .../custom_domains_create.py | 7 +- .../custom_domains_delete.py | 5 +- .../custom_domains_disable_custom_https.py | 5 +- ..._domains_enable_custom_https_using_byoc.py | 5 +- ...tom_https_using_cdn_managed_certificate.py | 5 +- .../generated_samples/custom_domains_get.py | 4 +- .../custom_domains_list_by_endpoint.py | 5 +- .../generated_samples/edge_nodes_list.py | 2 +- .../generated_samples/endpoints_create.py | 7 +- .../generated_samples/endpoints_delete.py | 4 +- .../generated_samples/endpoints_get.py | 4 +- .../endpoints_list_by_profile.py | 5 +- .../endpoints_list_resource_usage.py | 5 +- .../endpoints_load_content.py | 7 +- .../endpoints_purge_content.py | 7 +- .../generated_samples/endpoints_start.py | 4 +- .../generated_samples/endpoints_stop.py | 4 +- .../generated_samples/endpoints_update.py | 6 +- .../endpoints_validate_custom_domain.py | 7 +- ...g_analytics_get_log_analytics_locations.py | 5 +- ...log_analytics_get_log_analytics_metrics.py | 10 +- ...og_analytics_get_log_analytics_rankings.py | 10 +- ...g_analytics_get_log_analytics_resources.py | 5 +- ...analytics_get_waf_log_analytics_metrics.py | 10 +- ...nalytics_get_waf_log_analytics_rankings.py | 10 +- .../generated_samples/operations_list.py | 2 +- .../generated_samples/origin_groups_create.py | 7 +- .../generated_samples/origin_groups_delete.py | 5 +- .../generated_samples/origin_groups_get.py | 4 +- .../origin_groups_list_by_endpoint.py | 5 +- .../generated_samples/origin_groups_update.py | 7 +- .../generated_samples/origins_create.py | 7 +- .../generated_samples/origins_delete.py | 4 +- .../generated_samples/origins_get.py | 4 +- .../origins_list_by_endpoint.py | 5 +- .../generated_samples/origins_update.py | 6 +- .../generated_samples/profiles_can_migrate.py | 7 +- .../generated_samples/profiles_create.py | 6 +- .../generated_samples/profiles_delete.py | 4 +- .../profiles_generate_sso_uri.py | 5 +- .../generated_samples/profiles_get.py | 4 +- .../generated_samples/profiles_list.py | 4 +- .../profiles_list_by_resource_group.py | 5 +- .../profiles_list_resource_usage.py | 5 +- ...files_list_supported_optimization_types.py | 5 +- .../generated_samples/profiles_migrate.py | 6 +- .../profiles_migration_abort.py | 42 + .../profiles_migration_commit.py | 5 +- .../generated_samples/profiles_update.py | 6 +- .../generated_samples/resource_usage_list.py | 5 +- .../generated_samples/routes_create.py | 7 +- .../generated_samples/routes_delete.py | 4 +- .../generated_samples/routes_get.py | 4 +- .../routes_list_by_endpoint.py | 5 +- .../generated_samples/routes_update.py | 7 +- .../generated_samples/rule_sets_create.py | 4 +- .../generated_samples/rule_sets_delete.py | 4 +- .../generated_samples/rule_sets_get.py | 4 +- .../rule_sets_list_by_profile.py | 5 +- .../rule_sets_list_resource_usage.py | 5 +- .../generated_samples/rules_create.py | 6 +- .../generated_samples/rules_delete.py | 4 +- .../generated_samples/rules_get.py | 4 +- .../rules_list_by_rule_set.py | 5 +- .../generated_samples/rules_update.py | 6 +- .../generated_samples/secrets_create.py | 7 +- .../generated_samples/secrets_delete.py | 4 +- .../generated_samples/secrets_get.py | 4 +- .../secrets_list_by_profile.py | 5 +- .../security_policies_create.py | 7 +- .../security_policies_delete.py | 5 +- .../security_policies_get.py | 5 +- .../security_policies_list_by_profile.py | 5 +- .../security_policies_patch.py | 7 +- .../generated_samples/validate_probe.py | 6 +- .../waf_list_managed_rule_sets.py | 5 +- .../generated_samples/waf_list_policies.py | 4 +- .../generated_samples/waf_patch_policy.py | 6 +- .../waf_policy_create_or_update.py | 7 +- .../generated_samples/waf_policy_delete.py | 4 +- .../generated_samples/waf_policy_get.py | 4 +- .../generated_tests/conftest.py | 35 + .../generated_tests/test_cdn_management.py | 68 + ...anagement_afd_custom_domains_operations.py | 137 + ...ent_afd_custom_domains_operations_async.py | 152 + ...cdn_management_afd_endpoints_operations.py | 146 + ...nagement_afd_endpoints_operations_async.py | 155 + ...management_afd_origin_groups_operations.py | 143 + ...ment_afd_origin_groups_operations_async.py | 150 + ...t_cdn_management_afd_origins_operations.py | 139 + ...management_afd_origins_operations_async.py | 146 + ..._cdn_management_afd_profiles_operations.py | 89 + ...anagement_afd_profiles_operations_async.py | 92 + .../test_cdn_management_async.py | 69 + ...dn_management_custom_domains_operations.py | 103 + ...agement_custom_domains_operations_async.py | 112 + ...st_cdn_management_edge_nodes_operations.py | 29 + ..._management_edge_nodes_operations_async.py | 30 + ...est_cdn_management_endpoints_operations.py | 293 + ...n_management_endpoints_operations_async.py | 308 + ...cdn_management_log_analytics_operations.py | 111 + ...nagement_log_analytics_operations_async.py | 112 + ...management_managed_rule_sets_operations.py | 29 + ...ment_managed_rule_sets_operations_async.py | 30 + .../test_cdn_management_operations.py | 29 + .../test_cdn_management_operations_async.py | 30 + ...cdn_management_origin_groups_operations.py | 131 + ...nagement_origin_groups_operations_async.py | 138 + .../test_cdn_management_origins_operations.py | 128 + ...cdn_management_origins_operations_async.py | 135 + ...test_cdn_management_policies_operations.py | 164 + ...dn_management_policies_operations_async.py | 169 + ...test_cdn_management_profiles_operations.py | 257 + ...dn_management_profiles_operations_async.py | 276 + ...dn_management_resource_usage_operations.py | 29 + ...agement_resource_usage_operations_async.py | 30 + .../test_cdn_management_routes_operations.py | 137 + ..._cdn_management_routes_operations_async.py | 144 + ...est_cdn_management_rule_sets_operations.py | 83 + ...n_management_rule_sets_operations_async.py | 86 + .../test_cdn_management_rules_operations.py | 115 + ...t_cdn_management_rules_operations_async.py | 122 + .../test_cdn_management_secrets_operations.py | 87 + ...cdn_management_secrets_operations_async.py | 92 + ...management_security_policies_operations.py | 101 + ...ment_security_policies_operations_async.py | 108 + sdk/cdn/azure-mgmt-cdn/pyproject.toml | 82 + sdk/cdn/azure-mgmt-cdn/sdk_packaging.toml | 7 - sdk/cdn/azure-mgmt-cdn/setup.py | 82 - 238 files changed, 71117 insertions(+), 5852 deletions(-) delete mode 100644 sdk/cdn/azure-mgmt-cdn/_meta.json create mode 100644 sdk/cdn/azure-mgmt-cdn/_metadata.json create mode 100644 sdk/cdn/azure-mgmt-cdn/apiview-properties.json create mode 100644 sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/_utils/__init__.py rename sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/{_serialization.py => _utils/serialization.py} (81%) rename sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/{aio/_vendor.py => _utils/utils.py} (59%) delete mode 100644 sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/_vendor.py create mode 100644 sdk/cdn/azure-mgmt-cdn/code_report_swagger.json create mode 100644 sdk/cdn/azure-mgmt-cdn/generated_samples/cdn_profiles_can_migrate.py create mode 100644 sdk/cdn/azure-mgmt-cdn/generated_samples/cdn_profiles_migrate.py create mode 100644 sdk/cdn/azure-mgmt-cdn/generated_samples/profiles_migration_abort.py create mode 100644 sdk/cdn/azure-mgmt-cdn/generated_tests/conftest.py create mode 100644 sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management.py create mode 100644 sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_afd_custom_domains_operations.py create mode 100644 sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_afd_custom_domains_operations_async.py create mode 100644 sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_afd_endpoints_operations.py create mode 100644 sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_afd_endpoints_operations_async.py create mode 100644 sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_afd_origin_groups_operations.py create mode 100644 sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_afd_origin_groups_operations_async.py create mode 100644 sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_afd_origins_operations.py create mode 100644 sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_afd_origins_operations_async.py create mode 100644 sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_afd_profiles_operations.py create mode 100644 sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_afd_profiles_operations_async.py create mode 100644 sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_async.py create mode 100644 sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_custom_domains_operations.py create mode 100644 sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_custom_domains_operations_async.py create mode 100644 sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_edge_nodes_operations.py create mode 100644 sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_edge_nodes_operations_async.py create mode 100644 sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_endpoints_operations.py create mode 100644 sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_endpoints_operations_async.py create mode 100644 sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_log_analytics_operations.py create mode 100644 sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_log_analytics_operations_async.py create mode 100644 sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_managed_rule_sets_operations.py create mode 100644 sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_managed_rule_sets_operations_async.py create mode 100644 sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_operations.py create mode 100644 sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_operations_async.py create mode 100644 sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_origin_groups_operations.py create mode 100644 sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_origin_groups_operations_async.py create mode 100644 sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_origins_operations.py create mode 100644 sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_origins_operations_async.py create mode 100644 sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_policies_operations.py create mode 100644 sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_policies_operations_async.py create mode 100644 sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_profiles_operations.py create mode 100644 sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_profiles_operations_async.py create mode 100644 sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_resource_usage_operations.py create mode 100644 sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_resource_usage_operations_async.py create mode 100644 sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_routes_operations.py create mode 100644 sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_routes_operations_async.py create mode 100644 sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_rule_sets_operations.py create mode 100644 sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_rule_sets_operations_async.py create mode 100644 sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_rules_operations.py create mode 100644 sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_rules_operations_async.py create mode 100644 sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_secrets_operations.py create mode 100644 sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_secrets_operations_async.py create mode 100644 sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_security_policies_operations.py create mode 100644 sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_security_policies_operations_async.py delete mode 100644 sdk/cdn/azure-mgmt-cdn/sdk_packaging.toml delete mode 100644 sdk/cdn/azure-mgmt-cdn/setup.py diff --git a/sdk/cdn/azure-mgmt-cdn/CHANGELOG.md b/sdk/cdn/azure-mgmt-cdn/CHANGELOG.md index d3fbb1381f6d..57ba49fb6f19 100644 --- a/sdk/cdn/azure-mgmt-cdn/CHANGELOG.md +++ b/sdk/cdn/azure-mgmt-cdn/CHANGELOG.md @@ -1,5 +1,9 @@ # Release History +## 13.2.0 (2026-05-19) + +skip changelog generation + ## 13.1.1 (2024-06-12) ### Bugs Fixed diff --git a/sdk/cdn/azure-mgmt-cdn/MANIFEST.in b/sdk/cdn/azure-mgmt-cdn/MANIFEST.in index 83cdb3bd0252..513bb2791590 100644 --- a/sdk/cdn/azure-mgmt-cdn/MANIFEST.in +++ b/sdk/cdn/azure-mgmt-cdn/MANIFEST.in @@ -1,8 +1,7 @@ -include _meta.json -recursive-include tests *.py *.json -recursive-include samples *.py *.md include *.md -include azure/__init__.py -include azure/mgmt/__init__.py include LICENSE include azure/mgmt/cdn/py.typed +recursive-include tests *.py +recursive-include samples *.py *.md +include azure/__init__.py +include azure/mgmt/__init__.py diff --git a/sdk/cdn/azure-mgmt-cdn/README.md b/sdk/cdn/azure-mgmt-cdn/README.md index 6aa59315c876..0a9b8cd2f27b 100644 --- a/sdk/cdn/azure-mgmt-cdn/README.md +++ b/sdk/cdn/azure-mgmt-cdn/README.md @@ -1,7 +1,7 @@ # Microsoft Azure SDK for Python This is the Microsoft Azure CDN Management Client Library. -This package has been tested with Python 3.8+. +This package has been tested with Python 3.10+. For a more complete view of Azure libraries, see the [azure sdk python release](https://aka.ms/azsdk/python/all). ## _Disclaimer_ @@ -12,7 +12,7 @@ _Azure SDK Python packages support for Python 2.7 has ended 01 January 2022. For ### Prerequisites -- Python 3.8+ is required to use this package. +- Python 3.10+ is required to use this package. - [Azure subscription](https://azure.microsoft.com/free/) ### Install the package @@ -24,7 +24,7 @@ pip install azure-identity ### Authentication -By default, [Azure Active Directory](https://aka.ms/awps/aad) token authentication depends on correct configure of following environment variables. +By default, [Azure Active Directory](https://aka.ms/awps/aad) token authentication depends on correct configuration of the following environment variables. - `AZURE_CLIENT_ID` for Azure client ID. - `AZURE_TENANT_ID` for Azure tenant ID. diff --git a/sdk/cdn/azure-mgmt-cdn/_meta.json b/sdk/cdn/azure-mgmt-cdn/_meta.json deleted file mode 100644 index a5cd8e2186b3..000000000000 --- a/sdk/cdn/azure-mgmt-cdn/_meta.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "commit": "de1f3772629b6f4d3ac01548a5f6d719bfb97c9e", - "repository_url": "https://github.com/Azure/azure-rest-api-specs", - "autorest": "3.10.2", - "use": [ - "@autorest/python@6.13.19", - "@autorest/modelerfour@4.27.0" - ], - "autorest_command": "autorest specification/cdn/resource-manager/readme.md --generate-sample=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --use=@autorest/python@6.13.19 --use=@autorest/modelerfour@4.27.0 --version=3.10.2 --version-tolerant=False", - "readme": "specification/cdn/resource-manager/readme.md" -} \ No newline at end of file diff --git a/sdk/cdn/azure-mgmt-cdn/_metadata.json b/sdk/cdn/azure-mgmt-cdn/_metadata.json new file mode 100644 index 000000000000..ef9739b12669 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/_metadata.json @@ -0,0 +1,11 @@ +{ + "commit": "9dcf0e13ae13d5b5abbdcd7429272412975300a3", + "repository_url": "https://github.com/Azure/azure-rest-api-specs", + "autorest": "3.10.2", + "use": [ + "@autorest/python@6.50.0", + "@autorest/modelerfour@4.27.0" + ], + "autorest_command": "autorest specification/cdn/resource-manager/readme.md --generate-sample=True --generate-test=True --include-x-ms-examples-original-file=True --package-mode=azure-mgmt --python --python-sdks-folder=C:\\dev\\worktrees\\sdk-azure-mgmt-cdn\\sdk --use=@autorest/python@6.50.0 --use=@autorest/modelerfour@4.27.0 --version=3.10.2 --version-tolerant=False", + "readme": "specification/cdn/resource-manager/readme.md" +} \ No newline at end of file diff --git a/sdk/cdn/azure-mgmt-cdn/apiview-properties.json b/sdk/cdn/azure-mgmt-cdn/apiview-properties.json new file mode 100644 index 000000000000..daf6c078f394 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/apiview-properties.json @@ -0,0 +1,618 @@ +{ + "CrossLanguagePackageId": null, + "CrossLanguageDefinitionId": { + "azure.mgmt.cdn.models.ActivatedResourceReference": null, + "azure.mgmt.cdn.models.Resource": null, + "azure.mgmt.cdn.models.ProxyResource": null, + "azure.mgmt.cdn.models.AFDDomain": null, + "azure.mgmt.cdn.models.AFDDomainHttpsCustomizedCipherSuiteSet": null, + "azure.mgmt.cdn.models.AFDDomainHttpsParameters": null, + "azure.mgmt.cdn.models.AFDDomainListResult": null, + "azure.mgmt.cdn.models.AFDStateProperties": null, + "azure.mgmt.cdn.models.AFDDomainUpdatePropertiesParameters": null, + "azure.mgmt.cdn.models.AFDDomainProperties": null, + "azure.mgmt.cdn.models.AFDDomainUpdateParameters": null, + "azure.mgmt.cdn.models.TrackedResource": null, + "azure.mgmt.cdn.models.AFDEndpoint": null, + "azure.mgmt.cdn.models.AFDEndpointListResult": null, + "azure.mgmt.cdn.models.AFDEndpointPropertiesUpdateParameters": null, + "azure.mgmt.cdn.models.AFDEndpointProperties": null, + "azure.mgmt.cdn.models.AFDEndpointUpdateParameters": null, + "azure.mgmt.cdn.models.AFDOrigin": null, + "azure.mgmt.cdn.models.AFDOriginGroup": null, + "azure.mgmt.cdn.models.AFDOriginGroupListResult": null, + "azure.mgmt.cdn.models.AFDOriginGroupUpdatePropertiesParameters": null, + "azure.mgmt.cdn.models.AFDOriginGroupProperties": null, + "azure.mgmt.cdn.models.AFDOriginGroupUpdateParameters": null, + "azure.mgmt.cdn.models.AFDOriginListResult": null, + "azure.mgmt.cdn.models.AFDOriginUpdatePropertiesParameters": null, + "azure.mgmt.cdn.models.AFDOriginProperties": null, + "azure.mgmt.cdn.models.AFDOriginUpdateParameters": null, + "azure.mgmt.cdn.models.AfdPurgeParameters": null, + "azure.mgmt.cdn.models.AfdRouteCacheConfiguration": null, + "azure.mgmt.cdn.models.Certificate": null, + "azure.mgmt.cdn.models.AzureFirstPartyManagedCertificate": null, + "azure.mgmt.cdn.models.SecretParameters": null, + "azure.mgmt.cdn.models.AzureFirstPartyManagedCertificateParameters": null, + "azure.mgmt.cdn.models.CacheConfiguration": null, + "azure.mgmt.cdn.models.DeliveryRuleActionParameters": null, + "azure.mgmt.cdn.models.CacheExpirationActionParameters": null, + "azure.mgmt.cdn.models.CacheKeyQueryStringActionParameters": null, + "azure.mgmt.cdn.models.CanMigrateParameters": null, + "azure.mgmt.cdn.models.CanMigrateResult": null, + "azure.mgmt.cdn.models.CertificateSourceParameters": null, + "azure.mgmt.cdn.models.CdnCertificateSourceParameters": null, + "azure.mgmt.cdn.models.CdnEndpoint": null, + "azure.mgmt.cdn.models.CustomDomainHttpsParameters": null, + "azure.mgmt.cdn.models.CdnManagedHttpsParameters": null, + "azure.mgmt.cdn.models.CdnMigrationToAfdParameters": null, + "azure.mgmt.cdn.models.CdnWebApplicationFirewallPolicy": null, + "azure.mgmt.cdn.models.CdnWebApplicationFirewallPolicyList": null, + "azure.mgmt.cdn.models.CdnWebApplicationFirewallPolicyPatchParameters": null, + "azure.mgmt.cdn.models.CheckEndpointNameAvailabilityInput": null, + "azure.mgmt.cdn.models.CheckEndpointNameAvailabilityOutput": null, + "azure.mgmt.cdn.models.CheckHostNameAvailabilityInput": null, + "azure.mgmt.cdn.models.CheckNameAvailabilityInput": null, + "azure.mgmt.cdn.models.CheckNameAvailabilityOutput": null, + "azure.mgmt.cdn.models.CidrIpAddress": null, + "azure.mgmt.cdn.models.DeliveryRuleConditionParameters": null, + "azure.mgmt.cdn.models.ClientPortMatchConditionParameters": null, + "azure.mgmt.cdn.models.Components18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsPropertiesDataItems": null, + "azure.mgmt.cdn.models.Components1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsPropertiesDataItems": null, + "azure.mgmt.cdn.models.ComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItems": null, + "azure.mgmt.cdn.models.CompressionSettings": null, + "azure.mgmt.cdn.models.ContinentsResponse": null, + "azure.mgmt.cdn.models.ContinentsResponseContinentsItem": null, + "azure.mgmt.cdn.models.ContinentsResponseCountryOrRegionsItem": null, + "azure.mgmt.cdn.models.CookiesMatchConditionParameters": null, + "azure.mgmt.cdn.models.CustomDomain": null, + "azure.mgmt.cdn.models.CustomDomainListResult": null, + "azure.mgmt.cdn.models.CustomDomainParameters": null, + "azure.mgmt.cdn.models.CustomerCertificate": null, + "azure.mgmt.cdn.models.CustomerCertificateParameters": null, + "azure.mgmt.cdn.models.CustomRule": null, + "azure.mgmt.cdn.models.CustomRuleList": null, + "azure.mgmt.cdn.models.DeepCreatedCustomDomain": null, + "azure.mgmt.cdn.models.DeepCreatedOrigin": null, + "azure.mgmt.cdn.models.DeepCreatedOriginGroup": null, + "azure.mgmt.cdn.models.DeliveryRule": null, + "azure.mgmt.cdn.models.DeliveryRuleAction": null, + "azure.mgmt.cdn.models.DeliveryRuleCacheExpirationAction": null, + "azure.mgmt.cdn.models.DeliveryRuleCacheKeyQueryStringAction": null, + "azure.mgmt.cdn.models.DeliveryRuleCondition": null, + "azure.mgmt.cdn.models.DeliveryRuleClientPortCondition": null, + "azure.mgmt.cdn.models.DeliveryRuleCookiesCondition": null, + "azure.mgmt.cdn.models.DeliveryRuleHostNameCondition": null, + "azure.mgmt.cdn.models.DeliveryRuleHttpVersionCondition": null, + "azure.mgmt.cdn.models.DeliveryRuleIsDeviceCondition": null, + "azure.mgmt.cdn.models.DeliveryRulePostArgsCondition": null, + "azure.mgmt.cdn.models.DeliveryRuleQueryStringCondition": null, + "azure.mgmt.cdn.models.DeliveryRuleRemoteAddressCondition": null, + "azure.mgmt.cdn.models.DeliveryRuleRequestBodyCondition": null, + "azure.mgmt.cdn.models.DeliveryRuleRequestHeaderAction": null, + "azure.mgmt.cdn.models.DeliveryRuleRequestHeaderCondition": null, + "azure.mgmt.cdn.models.DeliveryRuleRequestMethodCondition": null, + "azure.mgmt.cdn.models.DeliveryRuleRequestSchemeCondition": null, + "azure.mgmt.cdn.models.DeliveryRuleRequestUriCondition": null, + "azure.mgmt.cdn.models.DeliveryRuleResponseHeaderAction": null, + "azure.mgmt.cdn.models.DeliveryRuleRouteConfigurationOverrideAction": null, + "azure.mgmt.cdn.models.DeliveryRuleServerPortCondition": null, + "azure.mgmt.cdn.models.DeliveryRuleSocketAddrCondition": null, + "azure.mgmt.cdn.models.DeliveryRuleSslProtocolCondition": null, + "azure.mgmt.cdn.models.DeliveryRuleUrlFileExtensionCondition": null, + "azure.mgmt.cdn.models.DeliveryRuleUrlFileNameCondition": null, + "azure.mgmt.cdn.models.DeliveryRuleUrlPathCondition": null, + "azure.mgmt.cdn.models.DimensionProperties": null, + "azure.mgmt.cdn.models.DomainValidationProperties": null, + "azure.mgmt.cdn.models.EdgeNode": null, + "azure.mgmt.cdn.models.EdgenodeResult": null, + "azure.mgmt.cdn.models.Endpoint": null, + "azure.mgmt.cdn.models.EndpointListResult": null, + "azure.mgmt.cdn.models.EndpointPropertiesUpdateParameters": null, + "azure.mgmt.cdn.models.EndpointProperties": null, + "azure.mgmt.cdn.models.EndpointPropertiesUpdateParametersDeliveryPolicy": null, + "azure.mgmt.cdn.models.EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink": null, + "azure.mgmt.cdn.models.EndpointUpdateParameters": null, + "azure.mgmt.cdn.models.ErrorAdditionalInfo": null, + "azure.mgmt.cdn.models.ErrorDetail": null, + "azure.mgmt.cdn.models.ErrorResponse": null, + "azure.mgmt.cdn.models.GeoFilter": null, + "azure.mgmt.cdn.models.HeaderActionParameters": null, + "azure.mgmt.cdn.models.HealthProbeParameters": null, + "azure.mgmt.cdn.models.HostNameMatchConditionParameters": null, + "azure.mgmt.cdn.models.HttpErrorRangeParameters": null, + "azure.mgmt.cdn.models.HttpVersionMatchConditionParameters": null, + "azure.mgmt.cdn.models.IpAddressGroup": null, + "azure.mgmt.cdn.models.IsDeviceMatchConditionParameters": null, + "azure.mgmt.cdn.models.KeyVaultCertificateSourceParameters": null, + "azure.mgmt.cdn.models.KeyVaultSigningKeyParameters": null, + "azure.mgmt.cdn.models.LoadBalancingSettingsParameters": null, + "azure.mgmt.cdn.models.LoadParameters": null, + "azure.mgmt.cdn.models.LogSpecification": null, + "azure.mgmt.cdn.models.ManagedCertificate": null, + "azure.mgmt.cdn.models.ManagedCertificateParameters": null, + "azure.mgmt.cdn.models.ManagedRuleDefinition": null, + "azure.mgmt.cdn.models.ManagedRuleGroupDefinition": null, + "azure.mgmt.cdn.models.ManagedRuleGroupOverride": null, + "azure.mgmt.cdn.models.ManagedRuleOverride": null, + "azure.mgmt.cdn.models.ManagedRuleSet": null, + "azure.mgmt.cdn.models.ManagedRuleSetDefinition": null, + "azure.mgmt.cdn.models.ManagedRuleSetDefinitionList": null, + "azure.mgmt.cdn.models.ManagedRuleSetList": null, + "azure.mgmt.cdn.models.ManagedServiceIdentity": null, + "azure.mgmt.cdn.models.MatchCondition": null, + "azure.mgmt.cdn.models.MetricAvailability": null, + "azure.mgmt.cdn.models.MetricSpecification": null, + "azure.mgmt.cdn.models.MetricsResponse": null, + "azure.mgmt.cdn.models.MetricsResponseSeriesItem": null, + "azure.mgmt.cdn.models.MetricsResponseSeriesPropertiesItemsItem": null, + "azure.mgmt.cdn.models.MigrateResult": null, + "azure.mgmt.cdn.models.MigrationEndpointMapping": null, + "azure.mgmt.cdn.models.MigrationErrorType": null, + "azure.mgmt.cdn.models.MigrationParameters": null, + "azure.mgmt.cdn.models.MigrationWebApplicationFirewallMapping": null, + "azure.mgmt.cdn.models.Operation": null, + "azure.mgmt.cdn.models.OperationDisplay": null, + "azure.mgmt.cdn.models.OperationsListResult": null, + "azure.mgmt.cdn.models.Origin": null, + "azure.mgmt.cdn.models.OriginAuthenticationProperties": null, + "azure.mgmt.cdn.models.OriginGroup": null, + "azure.mgmt.cdn.models.OriginGroupListResult": null, + "azure.mgmt.cdn.models.OriginGroupOverride": null, + "azure.mgmt.cdn.models.OriginGroupOverrideAction": null, + "azure.mgmt.cdn.models.OriginGroupOverrideActionParameters": null, + "azure.mgmt.cdn.models.OriginGroupUpdatePropertiesParameters": null, + "azure.mgmt.cdn.models.OriginGroupProperties": null, + "azure.mgmt.cdn.models.OriginGroupUpdateParameters": null, + "azure.mgmt.cdn.models.OriginListResult": null, + "azure.mgmt.cdn.models.OriginUpdatePropertiesParameters": null, + "azure.mgmt.cdn.models.OriginProperties": null, + "azure.mgmt.cdn.models.OriginUpdateParameters": null, + "azure.mgmt.cdn.models.PolicySettings": null, + "azure.mgmt.cdn.models.PostArgsMatchConditionParameters": null, + "azure.mgmt.cdn.models.Profile": null, + "azure.mgmt.cdn.models.ProfileChangeSkuWafMapping": null, + "azure.mgmt.cdn.models.ProfileListResult": null, + "azure.mgmt.cdn.models.ProfileLogScrubbing": null, + "azure.mgmt.cdn.models.ProfileScrubbingRules": null, + "azure.mgmt.cdn.models.ProfileUpdateParameters": null, + "azure.mgmt.cdn.models.ProfileUpgradeParameters": null, + "azure.mgmt.cdn.models.PurgeParameters": null, + "azure.mgmt.cdn.models.QueryStringMatchConditionParameters": null, + "azure.mgmt.cdn.models.RankingsResponse": null, + "azure.mgmt.cdn.models.RankingsResponseTablesItem": null, + "azure.mgmt.cdn.models.RankingsResponseTablesPropertiesItemsItem": null, + "azure.mgmt.cdn.models.RankingsResponseTablesPropertiesItemsMetricsItem": null, + "azure.mgmt.cdn.models.RateLimitRule": null, + "azure.mgmt.cdn.models.RateLimitRuleList": null, + "azure.mgmt.cdn.models.RemoteAddressMatchConditionParameters": null, + "azure.mgmt.cdn.models.RequestBodyMatchConditionParameters": null, + "azure.mgmt.cdn.models.RequestHeaderMatchConditionParameters": null, + "azure.mgmt.cdn.models.RequestMethodMatchConditionParameters": null, + "azure.mgmt.cdn.models.RequestSchemeMatchConditionParameters": null, + "azure.mgmt.cdn.models.RequestUriMatchConditionParameters": null, + "azure.mgmt.cdn.models.ResourceReference": null, + "azure.mgmt.cdn.models.ResourcesResponse": null, + "azure.mgmt.cdn.models.ResourcesResponseCustomDomainsItem": null, + "azure.mgmt.cdn.models.ResourcesResponseEndpointsItem": null, + "azure.mgmt.cdn.models.ResourcesResponseEndpointsPropertiesItemsItem": null, + "azure.mgmt.cdn.models.ResourceUsage": null, + "azure.mgmt.cdn.models.ResourceUsageListResult": null, + "azure.mgmt.cdn.models.ResponseBasedOriginErrorDetectionParameters": null, + "azure.mgmt.cdn.models.Route": null, + "azure.mgmt.cdn.models.RouteConfigurationOverrideActionParameters": null, + "azure.mgmt.cdn.models.RouteListResult": null, + "azure.mgmt.cdn.models.RouteUpdatePropertiesParameters": null, + "azure.mgmt.cdn.models.RouteProperties": null, + "azure.mgmt.cdn.models.RouteUpdateParameters": null, + "azure.mgmt.cdn.models.Rule": null, + "azure.mgmt.cdn.models.RuleListResult": null, + "azure.mgmt.cdn.models.RuleUpdatePropertiesParameters": null, + "azure.mgmt.cdn.models.RuleProperties": null, + "azure.mgmt.cdn.models.RuleSet": null, + "azure.mgmt.cdn.models.RuleSetListResult": null, + "azure.mgmt.cdn.models.RuleSetProperties": null, + "azure.mgmt.cdn.models.RuleUpdateParameters": null, + "azure.mgmt.cdn.models.Secret": null, + "azure.mgmt.cdn.models.SecretListResult": null, + "azure.mgmt.cdn.models.SecretProperties": null, + "azure.mgmt.cdn.models.SecurityPolicy": null, + "azure.mgmt.cdn.models.SecurityPolicyListResult": null, + "azure.mgmt.cdn.models.SecurityPolicyProperties": null, + "azure.mgmt.cdn.models.SecurityPolicyPropertiesParameters": null, + "azure.mgmt.cdn.models.SecurityPolicyUpdateParameters": null, + "azure.mgmt.cdn.models.SecurityPolicyWebApplicationFirewallAssociation": null, + "azure.mgmt.cdn.models.SecurityPolicyWebApplicationFirewallParameters": null, + "azure.mgmt.cdn.models.ServerPortMatchConditionParameters": null, + "azure.mgmt.cdn.models.ServiceSpecification": null, + "azure.mgmt.cdn.models.SharedPrivateLinkResourceProperties": null, + "azure.mgmt.cdn.models.Sku": null, + "azure.mgmt.cdn.models.SocketAddrMatchConditionParameters": null, + "azure.mgmt.cdn.models.SslProtocolMatchConditionParameters": null, + "azure.mgmt.cdn.models.SsoUri": null, + "azure.mgmt.cdn.models.SupportedOptimizationTypesListResult": null, + "azure.mgmt.cdn.models.SystemData": null, + "azure.mgmt.cdn.models.UrlFileExtensionMatchConditionParameters": null, + "azure.mgmt.cdn.models.UrlFileNameMatchConditionParameters": null, + "azure.mgmt.cdn.models.UrlPathMatchConditionParameters": null, + "azure.mgmt.cdn.models.UrlRedirectAction": null, + "azure.mgmt.cdn.models.UrlRedirectActionParameters": null, + "azure.mgmt.cdn.models.UrlRewriteAction": null, + "azure.mgmt.cdn.models.UrlRewriteActionParameters": null, + "azure.mgmt.cdn.models.UrlSigningAction": null, + "azure.mgmt.cdn.models.UrlSigningActionParameters": null, + "azure.mgmt.cdn.models.UrlSigningKey": null, + "azure.mgmt.cdn.models.UrlSigningKeyParameters": null, + "azure.mgmt.cdn.models.UrlSigningParamIdentifier": null, + "azure.mgmt.cdn.models.Usage": null, + "azure.mgmt.cdn.models.UsageName": null, + "azure.mgmt.cdn.models.UsagesListResult": null, + "azure.mgmt.cdn.models.UserAssignedIdentity": null, + "azure.mgmt.cdn.models.UserManagedHttpsParameters": null, + "azure.mgmt.cdn.models.ValidateCustomDomainInput": null, + "azure.mgmt.cdn.models.ValidateCustomDomainOutput": null, + "azure.mgmt.cdn.models.ValidateProbeInput": null, + "azure.mgmt.cdn.models.ValidateProbeOutput": null, + "azure.mgmt.cdn.models.ValidateSecretInput": null, + "azure.mgmt.cdn.models.ValidateSecretOutput": null, + "azure.mgmt.cdn.models.ValidationToken": null, + "azure.mgmt.cdn.models.WafMetricsResponse": null, + "azure.mgmt.cdn.models.WafMetricsResponseSeriesItem": null, + "azure.mgmt.cdn.models.WafMetricsResponseSeriesPropertiesItemsItem": null, + "azure.mgmt.cdn.models.WafRankingsResponse": null, + "azure.mgmt.cdn.models.WafRankingsResponseDataItem": null, + "azure.mgmt.cdn.models.UsageUnit": null, + "azure.mgmt.cdn.models.ScrubbingRuleEntryMatchVariable": null, + "azure.mgmt.cdn.models.ScrubbingRuleEntryMatchOperator": null, + "azure.mgmt.cdn.models.ScrubbingRuleEntryState": null, + "azure.mgmt.cdn.models.AfdCustomizedCipherSuiteForTls12": null, + "azure.mgmt.cdn.models.AfdCustomizedCipherSuiteForTls13": null, + "azure.mgmt.cdn.models.CreatedByType": null, + "azure.mgmt.cdn.models.AfdCertificateType": null, + "azure.mgmt.cdn.models.AfdCipherSuiteSetType": null, + "azure.mgmt.cdn.models.AfdMinimumTlsVersion": null, + "azure.mgmt.cdn.models.AfdProvisioningState": null, + "azure.mgmt.cdn.models.DeploymentStatus": null, + "azure.mgmt.cdn.models.DomainValidationState": null, + "azure.mgmt.cdn.models.EnabledState": null, + "azure.mgmt.cdn.models.AutoGeneratedDomainNameLabelScope": null, + "azure.mgmt.cdn.models.HealthProbeRequestType": null, + "azure.mgmt.cdn.models.ProbeProtocol": null, + "azure.mgmt.cdn.models.OriginAuthenticationType": null, + "azure.mgmt.cdn.models.SharedPrivateLinkResourceStatus": null, + "azure.mgmt.cdn.models.AFDEndpointProtocols": null, + "azure.mgmt.cdn.models.AfdQueryStringCachingBehavior": null, + "azure.mgmt.cdn.models.ForwardingProtocol": null, + "azure.mgmt.cdn.models.LinkToDefaultDomain": null, + "azure.mgmt.cdn.models.HttpsRedirect": null, + "azure.mgmt.cdn.models.MatchVariable": null, + "azure.mgmt.cdn.models.DeliveryRuleConditionParametersType": null, + "azure.mgmt.cdn.models.CookiesOperator": null, + "azure.mgmt.cdn.models.Transform": null, + "azure.mgmt.cdn.models.HostNameOperator": null, + "azure.mgmt.cdn.models.HttpVersionOperator": null, + "azure.mgmt.cdn.models.IsDeviceOperator": null, + "azure.mgmt.cdn.models.IsDeviceMatchValue": null, + "azure.mgmt.cdn.models.PostArgsOperator": null, + "azure.mgmt.cdn.models.QueryStringOperator": null, + "azure.mgmt.cdn.models.RemoteAddressOperator": null, + "azure.mgmt.cdn.models.RequestBodyOperator": null, + "azure.mgmt.cdn.models.RequestHeaderOperator": null, + "azure.mgmt.cdn.models.RequestMethodOperator": null, + "azure.mgmt.cdn.models.RequestMethodMatchValue": null, + "azure.mgmt.cdn.models.RequestSchemeMatchConditionParametersOperator": null, + "azure.mgmt.cdn.models.RequestSchemeMatchValue": null, + "azure.mgmt.cdn.models.RequestUriOperator": null, + "azure.mgmt.cdn.models.ServerPortOperator": null, + "azure.mgmt.cdn.models.SocketAddrOperator": null, + "azure.mgmt.cdn.models.SslProtocolOperator": null, + "azure.mgmt.cdn.models.SslProtocol": null, + "azure.mgmt.cdn.models.UrlFileExtensionOperator": null, + "azure.mgmt.cdn.models.UrlFileNameOperator": null, + "azure.mgmt.cdn.models.UrlPathOperator": null, + "azure.mgmt.cdn.models.ClientPortOperator": null, + "azure.mgmt.cdn.models.DeliveryRuleActionEnum": null, + "azure.mgmt.cdn.models.DeliveryRuleActionParametersType": null, + "azure.mgmt.cdn.models.QueryStringBehavior": null, + "azure.mgmt.cdn.models.HeaderAction": null, + "azure.mgmt.cdn.models.RuleQueryStringCachingBehavior": null, + "azure.mgmt.cdn.models.RuleIsCompressionEnabled": null, + "azure.mgmt.cdn.models.RuleCacheBehavior": null, + "azure.mgmt.cdn.models.RedirectType": null, + "azure.mgmt.cdn.models.DestinationProtocol": null, + "azure.mgmt.cdn.models.Algorithm": null, + "azure.mgmt.cdn.models.ParamIndicator": null, + "azure.mgmt.cdn.models.CacheBehavior": null, + "azure.mgmt.cdn.models.CacheType": null, + "azure.mgmt.cdn.models.MatchProcessingBehavior": null, + "azure.mgmt.cdn.models.SecurityPolicyType": null, + "azure.mgmt.cdn.models.SecretType": null, + "azure.mgmt.cdn.models.LogMetric": null, + "azure.mgmt.cdn.models.LogMetricsGroupBy": null, + "azure.mgmt.cdn.models.MetricsSeriesUnit": null, + "azure.mgmt.cdn.models.LogRanking": null, + "azure.mgmt.cdn.models.LogRankingMetric": null, + "azure.mgmt.cdn.models.WafMetric": null, + "azure.mgmt.cdn.models.WafAction": null, + "azure.mgmt.cdn.models.WafRankingGroupBy": null, + "azure.mgmt.cdn.models.WafRuleType": null, + "azure.mgmt.cdn.models.WafMetricsSeriesUnit": null, + "azure.mgmt.cdn.models.WafRankingType": null, + "azure.mgmt.cdn.models.SkuName": null, + "azure.mgmt.cdn.models.ManagedServiceIdentityType": null, + "azure.mgmt.cdn.models.ProfileResourceState": null, + "azure.mgmt.cdn.models.ProfileProvisioningState": null, + "azure.mgmt.cdn.models.ProfileScrubbingState": null, + "azure.mgmt.cdn.models.OptimizationType": null, + "azure.mgmt.cdn.models.ResourceUsageUnit": null, + "azure.mgmt.cdn.models.PrivateEndpointStatus": null, + "azure.mgmt.cdn.models.ResponseBasedDetectedErrorTypes": null, + "azure.mgmt.cdn.models.GeoFilterActions": null, + "azure.mgmt.cdn.models.KeyVaultSigningKeyParametersType": null, + "azure.mgmt.cdn.models.QueryStringCachingBehavior": null, + "azure.mgmt.cdn.models.EndpointResourceState": null, + "azure.mgmt.cdn.models.EndpointProvisioningState": null, + "azure.mgmt.cdn.models.OriginResourceState": null, + "azure.mgmt.cdn.models.OriginProvisioningState": null, + "azure.mgmt.cdn.models.OriginGroupResourceState": null, + "azure.mgmt.cdn.models.OriginGroupProvisioningState": null, + "azure.mgmt.cdn.models.CustomDomainResourceState": null, + "azure.mgmt.cdn.models.CustomHttpsProvisioningState": null, + "azure.mgmt.cdn.models.CustomHttpsProvisioningSubstate": null, + "azure.mgmt.cdn.models.CertificateSource": null, + "azure.mgmt.cdn.models.ProtocolType": null, + "azure.mgmt.cdn.models.MinimumTlsVersion": null, + "azure.mgmt.cdn.models.CertificateSourceParametersType": null, + "azure.mgmt.cdn.models.CertificateType": null, + "azure.mgmt.cdn.models.UpdateRule": null, + "azure.mgmt.cdn.models.DeleteRule": null, + "azure.mgmt.cdn.models.TransformType": null, + "azure.mgmt.cdn.models.WafMatchVariable": null, + "azure.mgmt.cdn.models.Operator": null, + "azure.mgmt.cdn.models.CustomRuleEnabledState": null, + "azure.mgmt.cdn.models.ActionType": null, + "azure.mgmt.cdn.models.ManagedRuleEnabledState": null, + "azure.mgmt.cdn.models.PolicyEnabledState": null, + "azure.mgmt.cdn.models.PolicyMode": null, + "azure.mgmt.cdn.models.PolicySettingsDefaultCustomBlockResponseStatusCode": null, + "azure.mgmt.cdn.models.ProvisioningState": null, + "azure.mgmt.cdn.models.PolicyResourceState": null, + "azure.mgmt.cdn.models.ResourceType": null, + "azure.mgmt.cdn.models.Status": null, + "azure.mgmt.cdn.models.LogMetricsGranularity": null, + "azure.mgmt.cdn.models.MetricsGranularity": null, + "azure.mgmt.cdn.models.WafGranularity": null, + "azure.mgmt.cdn.models.WafMetricsGranularity": null, + "azure.mgmt.cdn.models.CanMigrateDefaultSku": null, + "azure.mgmt.cdn.CdnManagementClient.check_endpoint_name_availability": null, + "azure.mgmt.cdn.aio.CdnManagementClient.check_endpoint_name_availability": null, + "azure.mgmt.cdn.CdnManagementClient.check_name_availability": null, + "azure.mgmt.cdn.aio.CdnManagementClient.check_name_availability": null, + "azure.mgmt.cdn.CdnManagementClient.check_name_availability_with_subscription": null, + "azure.mgmt.cdn.aio.CdnManagementClient.check_name_availability_with_subscription": null, + "azure.mgmt.cdn.CdnManagementClient.validate_probe": null, + "azure.mgmt.cdn.aio.CdnManagementClient.validate_probe": null, + "azure.mgmt.cdn.operations.AFDProfilesOperations.check_endpoint_name_availability": null, + "azure.mgmt.cdn.aio.operations.AFDProfilesOperations.check_endpoint_name_availability": null, + "azure.mgmt.cdn.operations.AFDProfilesOperations.list_resource_usage": null, + "azure.mgmt.cdn.aio.operations.AFDProfilesOperations.list_resource_usage": null, + "azure.mgmt.cdn.operations.AFDProfilesOperations.check_host_name_availability": null, + "azure.mgmt.cdn.aio.operations.AFDProfilesOperations.check_host_name_availability": null, + "azure.mgmt.cdn.operations.AFDProfilesOperations.validate_secret": null, + "azure.mgmt.cdn.aio.operations.AFDProfilesOperations.validate_secret": null, + "azure.mgmt.cdn.operations.AFDProfilesOperations.begin_upgrade": null, + "azure.mgmt.cdn.aio.operations.AFDProfilesOperations.begin_upgrade": null, + "azure.mgmt.cdn.operations.AFDCustomDomainsOperations.list_by_profile": null, + "azure.mgmt.cdn.aio.operations.AFDCustomDomainsOperations.list_by_profile": null, + "azure.mgmt.cdn.operations.AFDCustomDomainsOperations.get": null, + "azure.mgmt.cdn.aio.operations.AFDCustomDomainsOperations.get": null, + "azure.mgmt.cdn.operations.AFDCustomDomainsOperations.begin_create": null, + "azure.mgmt.cdn.aio.operations.AFDCustomDomainsOperations.begin_create": null, + "azure.mgmt.cdn.operations.AFDCustomDomainsOperations.begin_update": null, + "azure.mgmt.cdn.aio.operations.AFDCustomDomainsOperations.begin_update": null, + "azure.mgmt.cdn.operations.AFDCustomDomainsOperations.begin_delete": null, + "azure.mgmt.cdn.aio.operations.AFDCustomDomainsOperations.begin_delete": null, + "azure.mgmt.cdn.operations.AFDCustomDomainsOperations.begin_refresh_validation_token": null, + "azure.mgmt.cdn.aio.operations.AFDCustomDomainsOperations.begin_refresh_validation_token": null, + "azure.mgmt.cdn.operations.AFDEndpointsOperations.list_by_profile": null, + "azure.mgmt.cdn.aio.operations.AFDEndpointsOperations.list_by_profile": null, + "azure.mgmt.cdn.operations.AFDEndpointsOperations.get": null, + "azure.mgmt.cdn.aio.operations.AFDEndpointsOperations.get": null, + "azure.mgmt.cdn.operations.AFDEndpointsOperations.begin_create": null, + "azure.mgmt.cdn.aio.operations.AFDEndpointsOperations.begin_create": null, + "azure.mgmt.cdn.operations.AFDEndpointsOperations.begin_update": null, + "azure.mgmt.cdn.aio.operations.AFDEndpointsOperations.begin_update": null, + "azure.mgmt.cdn.operations.AFDEndpointsOperations.begin_delete": null, + "azure.mgmt.cdn.aio.operations.AFDEndpointsOperations.begin_delete": null, + "azure.mgmt.cdn.operations.AFDEndpointsOperations.begin_purge_content": null, + "azure.mgmt.cdn.aio.operations.AFDEndpointsOperations.begin_purge_content": null, + "azure.mgmt.cdn.operations.AFDEndpointsOperations.list_resource_usage": null, + "azure.mgmt.cdn.aio.operations.AFDEndpointsOperations.list_resource_usage": null, + "azure.mgmt.cdn.operations.AFDEndpointsOperations.validate_custom_domain": null, + "azure.mgmt.cdn.aio.operations.AFDEndpointsOperations.validate_custom_domain": null, + "azure.mgmt.cdn.operations.AFDOriginGroupsOperations.list_by_profile": null, + "azure.mgmt.cdn.aio.operations.AFDOriginGroupsOperations.list_by_profile": null, + "azure.mgmt.cdn.operations.AFDOriginGroupsOperations.get": null, + "azure.mgmt.cdn.aio.operations.AFDOriginGroupsOperations.get": null, + "azure.mgmt.cdn.operations.AFDOriginGroupsOperations.begin_create": null, + "azure.mgmt.cdn.aio.operations.AFDOriginGroupsOperations.begin_create": null, + "azure.mgmt.cdn.operations.AFDOriginGroupsOperations.begin_update": null, + "azure.mgmt.cdn.aio.operations.AFDOriginGroupsOperations.begin_update": null, + "azure.mgmt.cdn.operations.AFDOriginGroupsOperations.begin_delete": null, + "azure.mgmt.cdn.aio.operations.AFDOriginGroupsOperations.begin_delete": null, + "azure.mgmt.cdn.operations.AFDOriginGroupsOperations.list_resource_usage": null, + "azure.mgmt.cdn.aio.operations.AFDOriginGroupsOperations.list_resource_usage": null, + "azure.mgmt.cdn.operations.AFDOriginsOperations.list_by_origin_group": null, + "azure.mgmt.cdn.aio.operations.AFDOriginsOperations.list_by_origin_group": null, + "azure.mgmt.cdn.operations.AFDOriginsOperations.get": null, + "azure.mgmt.cdn.aio.operations.AFDOriginsOperations.get": null, + "azure.mgmt.cdn.operations.AFDOriginsOperations.begin_create": null, + "azure.mgmt.cdn.aio.operations.AFDOriginsOperations.begin_create": null, + "azure.mgmt.cdn.operations.AFDOriginsOperations.begin_update": null, + "azure.mgmt.cdn.aio.operations.AFDOriginsOperations.begin_update": null, + "azure.mgmt.cdn.operations.AFDOriginsOperations.begin_delete": null, + "azure.mgmt.cdn.aio.operations.AFDOriginsOperations.begin_delete": null, + "azure.mgmt.cdn.operations.RoutesOperations.list_by_endpoint": null, + "azure.mgmt.cdn.aio.operations.RoutesOperations.list_by_endpoint": null, + "azure.mgmt.cdn.operations.RoutesOperations.get": null, + "azure.mgmt.cdn.aio.operations.RoutesOperations.get": null, + "azure.mgmt.cdn.operations.RoutesOperations.begin_create": null, + "azure.mgmt.cdn.aio.operations.RoutesOperations.begin_create": null, + "azure.mgmt.cdn.operations.RoutesOperations.begin_update": null, + "azure.mgmt.cdn.aio.operations.RoutesOperations.begin_update": null, + "azure.mgmt.cdn.operations.RoutesOperations.begin_delete": null, + "azure.mgmt.cdn.aio.operations.RoutesOperations.begin_delete": null, + "azure.mgmt.cdn.operations.RuleSetsOperations.list_by_profile": null, + "azure.mgmt.cdn.aio.operations.RuleSetsOperations.list_by_profile": null, + "azure.mgmt.cdn.operations.RuleSetsOperations.get": null, + "azure.mgmt.cdn.aio.operations.RuleSetsOperations.get": null, + "azure.mgmt.cdn.operations.RuleSetsOperations.create": null, + "azure.mgmt.cdn.aio.operations.RuleSetsOperations.create": null, + "azure.mgmt.cdn.operations.RuleSetsOperations.begin_delete": null, + "azure.mgmt.cdn.aio.operations.RuleSetsOperations.begin_delete": null, + "azure.mgmt.cdn.operations.RuleSetsOperations.list_resource_usage": null, + "azure.mgmt.cdn.aio.operations.RuleSetsOperations.list_resource_usage": null, + "azure.mgmt.cdn.operations.RulesOperations.list_by_rule_set": null, + "azure.mgmt.cdn.aio.operations.RulesOperations.list_by_rule_set": null, + "azure.mgmt.cdn.operations.RulesOperations.get": null, + "azure.mgmt.cdn.aio.operations.RulesOperations.get": null, + "azure.mgmt.cdn.operations.RulesOperations.begin_create": null, + "azure.mgmt.cdn.aio.operations.RulesOperations.begin_create": null, + "azure.mgmt.cdn.operations.RulesOperations.begin_update": null, + "azure.mgmt.cdn.aio.operations.RulesOperations.begin_update": null, + "azure.mgmt.cdn.operations.RulesOperations.begin_delete": null, + "azure.mgmt.cdn.aio.operations.RulesOperations.begin_delete": null, + "azure.mgmt.cdn.operations.SecurityPoliciesOperations.list_by_profile": null, + "azure.mgmt.cdn.aio.operations.SecurityPoliciesOperations.list_by_profile": null, + "azure.mgmt.cdn.operations.SecurityPoliciesOperations.get": null, + "azure.mgmt.cdn.aio.operations.SecurityPoliciesOperations.get": null, + "azure.mgmt.cdn.operations.SecurityPoliciesOperations.begin_create": null, + "azure.mgmt.cdn.aio.operations.SecurityPoliciesOperations.begin_create": null, + "azure.mgmt.cdn.operations.SecurityPoliciesOperations.begin_patch": null, + "azure.mgmt.cdn.aio.operations.SecurityPoliciesOperations.begin_patch": null, + "azure.mgmt.cdn.operations.SecurityPoliciesOperations.begin_delete": null, + "azure.mgmt.cdn.aio.operations.SecurityPoliciesOperations.begin_delete": null, + "azure.mgmt.cdn.operations.SecretsOperations.list_by_profile": null, + "azure.mgmt.cdn.aio.operations.SecretsOperations.list_by_profile": null, + "azure.mgmt.cdn.operations.SecretsOperations.get": null, + "azure.mgmt.cdn.aio.operations.SecretsOperations.get": null, + "azure.mgmt.cdn.operations.SecretsOperations.begin_create": null, + "azure.mgmt.cdn.aio.operations.SecretsOperations.begin_create": null, + "azure.mgmt.cdn.operations.SecretsOperations.begin_delete": null, + "azure.mgmt.cdn.aio.operations.SecretsOperations.begin_delete": null, + "azure.mgmt.cdn.operations.LogAnalyticsOperations.get_log_analytics_metrics": null, + "azure.mgmt.cdn.aio.operations.LogAnalyticsOperations.get_log_analytics_metrics": null, + "azure.mgmt.cdn.operations.LogAnalyticsOperations.get_log_analytics_rankings": null, + "azure.mgmt.cdn.aio.operations.LogAnalyticsOperations.get_log_analytics_rankings": null, + "azure.mgmt.cdn.operations.LogAnalyticsOperations.get_log_analytics_locations": null, + "azure.mgmt.cdn.aio.operations.LogAnalyticsOperations.get_log_analytics_locations": null, + "azure.mgmt.cdn.operations.LogAnalyticsOperations.get_log_analytics_resources": null, + "azure.mgmt.cdn.aio.operations.LogAnalyticsOperations.get_log_analytics_resources": null, + "azure.mgmt.cdn.operations.LogAnalyticsOperations.get_waf_log_analytics_metrics": null, + "azure.mgmt.cdn.aio.operations.LogAnalyticsOperations.get_waf_log_analytics_metrics": null, + "azure.mgmt.cdn.operations.LogAnalyticsOperations.get_waf_log_analytics_rankings": null, + "azure.mgmt.cdn.aio.operations.LogAnalyticsOperations.get_waf_log_analytics_rankings": null, + "azure.mgmt.cdn.operations.ProfilesOperations.list": null, + "azure.mgmt.cdn.aio.operations.ProfilesOperations.list": null, + "azure.mgmt.cdn.operations.ProfilesOperations.list_by_resource_group": null, + "azure.mgmt.cdn.aio.operations.ProfilesOperations.list_by_resource_group": null, + "azure.mgmt.cdn.operations.ProfilesOperations.get": null, + "azure.mgmt.cdn.aio.operations.ProfilesOperations.get": null, + "azure.mgmt.cdn.operations.ProfilesOperations.begin_create": null, + "azure.mgmt.cdn.aio.operations.ProfilesOperations.begin_create": null, + "azure.mgmt.cdn.operations.ProfilesOperations.begin_update": null, + "azure.mgmt.cdn.aio.operations.ProfilesOperations.begin_update": null, + "azure.mgmt.cdn.operations.ProfilesOperations.begin_delete": null, + "azure.mgmt.cdn.aio.operations.ProfilesOperations.begin_delete": null, + "azure.mgmt.cdn.operations.ProfilesOperations.begin_can_migrate": null, + "azure.mgmt.cdn.aio.operations.ProfilesOperations.begin_can_migrate": null, + "azure.mgmt.cdn.operations.ProfilesOperations.begin_migrate": null, + "azure.mgmt.cdn.aio.operations.ProfilesOperations.begin_migrate": null, + "azure.mgmt.cdn.operations.ProfilesOperations.begin_migration_commit": null, + "azure.mgmt.cdn.aio.operations.ProfilesOperations.begin_migration_commit": null, + "azure.mgmt.cdn.operations.ProfilesOperations.generate_sso_uri": null, + "azure.mgmt.cdn.aio.operations.ProfilesOperations.generate_sso_uri": null, + "azure.mgmt.cdn.operations.ProfilesOperations.list_supported_optimization_types": null, + "azure.mgmt.cdn.aio.operations.ProfilesOperations.list_supported_optimization_types": null, + "azure.mgmt.cdn.operations.ProfilesOperations.list_resource_usage": null, + "azure.mgmt.cdn.aio.operations.ProfilesOperations.list_resource_usage": null, + "azure.mgmt.cdn.operations.ProfilesOperations.begin_cdn_can_migrate_to_afd": null, + "azure.mgmt.cdn.aio.operations.ProfilesOperations.begin_cdn_can_migrate_to_afd": null, + "azure.mgmt.cdn.operations.ProfilesOperations.begin_cdn_migrate_to_afd": null, + "azure.mgmt.cdn.aio.operations.ProfilesOperations.begin_cdn_migrate_to_afd": null, + "azure.mgmt.cdn.operations.ProfilesOperations.begin_migration_abort": null, + "azure.mgmt.cdn.aio.operations.ProfilesOperations.begin_migration_abort": null, + "azure.mgmt.cdn.operations.EndpointsOperations.list_by_profile": null, + "azure.mgmt.cdn.aio.operations.EndpointsOperations.list_by_profile": null, + "azure.mgmt.cdn.operations.EndpointsOperations.get": null, + "azure.mgmt.cdn.aio.operations.EndpointsOperations.get": null, + "azure.mgmt.cdn.operations.EndpointsOperations.begin_create": null, + "azure.mgmt.cdn.aio.operations.EndpointsOperations.begin_create": null, + "azure.mgmt.cdn.operations.EndpointsOperations.begin_update": null, + "azure.mgmt.cdn.aio.operations.EndpointsOperations.begin_update": null, + "azure.mgmt.cdn.operations.EndpointsOperations.begin_delete": null, + "azure.mgmt.cdn.aio.operations.EndpointsOperations.begin_delete": null, + "azure.mgmt.cdn.operations.EndpointsOperations.begin_start": null, + "azure.mgmt.cdn.aio.operations.EndpointsOperations.begin_start": null, + "azure.mgmt.cdn.operations.EndpointsOperations.begin_stop": null, + "azure.mgmt.cdn.aio.operations.EndpointsOperations.begin_stop": null, + "azure.mgmt.cdn.operations.EndpointsOperations.begin_purge_content": null, + "azure.mgmt.cdn.aio.operations.EndpointsOperations.begin_purge_content": null, + "azure.mgmt.cdn.operations.EndpointsOperations.begin_load_content": null, + "azure.mgmt.cdn.aio.operations.EndpointsOperations.begin_load_content": null, + "azure.mgmt.cdn.operations.EndpointsOperations.validate_custom_domain": null, + "azure.mgmt.cdn.aio.operations.EndpointsOperations.validate_custom_domain": null, + "azure.mgmt.cdn.operations.EndpointsOperations.list_resource_usage": null, + "azure.mgmt.cdn.aio.operations.EndpointsOperations.list_resource_usage": null, + "azure.mgmt.cdn.operations.OriginsOperations.list_by_endpoint": null, + "azure.mgmt.cdn.aio.operations.OriginsOperations.list_by_endpoint": null, + "azure.mgmt.cdn.operations.OriginsOperations.get": null, + "azure.mgmt.cdn.aio.operations.OriginsOperations.get": null, + "azure.mgmt.cdn.operations.OriginsOperations.begin_create": null, + "azure.mgmt.cdn.aio.operations.OriginsOperations.begin_create": null, + "azure.mgmt.cdn.operations.OriginsOperations.begin_update": null, + "azure.mgmt.cdn.aio.operations.OriginsOperations.begin_update": null, + "azure.mgmt.cdn.operations.OriginsOperations.begin_delete": null, + "azure.mgmt.cdn.aio.operations.OriginsOperations.begin_delete": null, + "azure.mgmt.cdn.operations.OriginGroupsOperations.list_by_endpoint": null, + "azure.mgmt.cdn.aio.operations.OriginGroupsOperations.list_by_endpoint": null, + "azure.mgmt.cdn.operations.OriginGroupsOperations.get": null, + "azure.mgmt.cdn.aio.operations.OriginGroupsOperations.get": null, + "azure.mgmt.cdn.operations.OriginGroupsOperations.begin_create": null, + "azure.mgmt.cdn.aio.operations.OriginGroupsOperations.begin_create": null, + "azure.mgmt.cdn.operations.OriginGroupsOperations.begin_update": null, + "azure.mgmt.cdn.aio.operations.OriginGroupsOperations.begin_update": null, + "azure.mgmt.cdn.operations.OriginGroupsOperations.begin_delete": null, + "azure.mgmt.cdn.aio.operations.OriginGroupsOperations.begin_delete": null, + "azure.mgmt.cdn.operations.CustomDomainsOperations.list_by_endpoint": null, + "azure.mgmt.cdn.aio.operations.CustomDomainsOperations.list_by_endpoint": null, + "azure.mgmt.cdn.operations.CustomDomainsOperations.get": null, + "azure.mgmt.cdn.aio.operations.CustomDomainsOperations.get": null, + "azure.mgmt.cdn.operations.CustomDomainsOperations.begin_create": null, + "azure.mgmt.cdn.aio.operations.CustomDomainsOperations.begin_create": null, + "azure.mgmt.cdn.operations.CustomDomainsOperations.begin_delete": null, + "azure.mgmt.cdn.aio.operations.CustomDomainsOperations.begin_delete": null, + "azure.mgmt.cdn.operations.CustomDomainsOperations.begin_disable_custom_https": null, + "azure.mgmt.cdn.aio.operations.CustomDomainsOperations.begin_disable_custom_https": null, + "azure.mgmt.cdn.operations.CustomDomainsOperations.begin_enable_custom_https": null, + "azure.mgmt.cdn.aio.operations.CustomDomainsOperations.begin_enable_custom_https": null, + "azure.mgmt.cdn.operations.ResourceUsageOperations.list": null, + "azure.mgmt.cdn.aio.operations.ResourceUsageOperations.list": null, + "azure.mgmt.cdn.operations.Operations.list": null, + "azure.mgmt.cdn.aio.operations.Operations.list": null, + "azure.mgmt.cdn.operations.EdgeNodesOperations.list": null, + "azure.mgmt.cdn.aio.operations.EdgeNodesOperations.list": null, + "azure.mgmt.cdn.operations.PoliciesOperations.list": null, + "azure.mgmt.cdn.aio.operations.PoliciesOperations.list": null, + "azure.mgmt.cdn.operations.PoliciesOperations.get": null, + "azure.mgmt.cdn.aio.operations.PoliciesOperations.get": null, + "azure.mgmt.cdn.operations.PoliciesOperations.begin_create_or_update": null, + "azure.mgmt.cdn.aio.operations.PoliciesOperations.begin_create_or_update": null, + "azure.mgmt.cdn.operations.PoliciesOperations.begin_update": null, + "azure.mgmt.cdn.aio.operations.PoliciesOperations.begin_update": null, + "azure.mgmt.cdn.operations.PoliciesOperations.delete": null, + "azure.mgmt.cdn.aio.operations.PoliciesOperations.delete": null, + "azure.mgmt.cdn.operations.ManagedRuleSetsOperations.list": null, + "azure.mgmt.cdn.aio.operations.ManagedRuleSetsOperations.list": null + } +} \ No newline at end of file diff --git a/sdk/cdn/azure-mgmt-cdn/azure/__init__.py b/sdk/cdn/azure-mgmt-cdn/azure/__init__.py index 8db66d3d0f0f..d55ccad1f573 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/__init__.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/__init__.py @@ -1 +1 @@ -__path__ = __import__("pkgutil").extend_path(__path__, __name__) +__path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/__init__.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/__init__.py index 8db66d3d0f0f..d55ccad1f573 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/__init__.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/__init__.py @@ -1 +1 @@ -__path__ = __import__("pkgutil").extend_path(__path__, __name__) +__path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/__init__.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/__init__.py index be3eb8d20d1d..333e59422592 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/__init__.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/__init__.py @@ -5,15 +5,21 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._cdn_management_client import CdnManagementClient +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._cdn_management_client import CdnManagementClient # type: ignore from ._version import VERSION __version__ = VERSION try: from ._patch import __all__ as _patch_all - from ._patch import * # pylint: disable=unused-wildcard-import + from ._patch import * except ImportError: _patch_all = [] from ._patch import patch_sdk as _patch_sdk @@ -21,6 +27,6 @@ __all__ = [ "CdnManagementClient", ] -__all__.extend([p for p in _patch_all if p not in __all__]) +__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/_cdn_management_client.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/_cdn_management_client.py index 99307737ccda..1abaecf3ec76 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/_cdn_management_client.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/_cdn_management_client.py @@ -7,23 +7,25 @@ # -------------------------------------------------------------------------- from copy import deepcopy -from typing import Any, TYPE_CHECKING +from typing import Any, Optional, TYPE_CHECKING, cast +from typing_extensions import Self from azure.core.pipeline import policies from azure.core.rest import HttpRequest, HttpResponse +from azure.core.settings import settings from azure.mgmt.core import ARMPipelineClient from azure.mgmt.core.policies import ARMAutoResourceProviderRegistrationPolicy +from azure.mgmt.core.tools import get_arm_endpoints from . import models as _models from ._configuration import CdnManagementClientConfiguration -from ._serialization import Deserializer, Serializer +from ._utils.serialization import Deserializer, Serializer from .operations import ( AFDCustomDomainsOperations, AFDEndpointsOperations, AFDOriginGroupsOperations, AFDOriginsOperations, AFDProfilesOperations, - CdnManagementClientOperationsMixin, CustomDomainsOperations, EdgeNodesOperations, EndpointsOperations, @@ -40,16 +42,15 @@ RulesOperations, SecretsOperations, SecurityPoliciesOperations, + _CdnManagementClientOperationsMixin, ) if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports + from azure.core import AzureClouds from azure.core.credentials import TokenCredential -class CdnManagementClient( - CdnManagementClientOperationsMixin -): # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes +class CdnManagementClient(_CdnManagementClientOperationsMixin): # pylint: disable=too-many-instance-attributes """Cdn Management Client. :ivar afd_profiles: AFDProfilesOperations operations @@ -96,11 +97,14 @@ class CdnManagementClient( :vartype managed_rule_sets: azure.mgmt.cdn.operations.ManagedRuleSetsOperations :param credential: Credential needed for the client to connect to Azure. Required. :type credential: ~azure.core.credentials.TokenCredential - :param subscription_id: Azure Subscription ID. Required. + :param subscription_id: The ID of the target subscription. The value must be an UUID. Required. :type subscription_id: str - :param base_url: Service URL. Default value is "https://management.azure.com". + :param base_url: Service URL. Default value is None. :type base_url: str - :keyword api_version: Api Version. Default value is "2024-02-01". Note that overriding this + :keyword cloud_setting: The cloud setting for which to get the ARM endpoint. Default value is + None. + :paramtype cloud_setting: ~azure.core.AzureClouds + :keyword api_version: Api Version. Default value is "2025-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 @@ -111,12 +115,24 @@ def __init__( self, credential: "TokenCredential", subscription_id: str, - base_url: str = "https://management.azure.com", + base_url: Optional[str] = None, + *, + cloud_setting: Optional["AzureClouds"] = None, **kwargs: Any ) -> None: + _cloud = cloud_setting or settings.current.azure_cloud # type: ignore + _endpoints = get_arm_endpoints(_cloud) + if not base_url: + base_url = _endpoints["resource_manager"] + credential_scopes = kwargs.pop("credential_scopes", _endpoints["credential_scopes"]) self._config = CdnManagementClientConfiguration( - credential=credential, subscription_id=subscription_id, **kwargs + credential=credential, + subscription_id=subscription_id, + cloud_setting=cloud_setting, + credential_scopes=credential_scopes, + **kwargs ) + _policies = kwargs.pop("policies", None) if _policies is None: _policies = [ @@ -135,7 +151,7 @@ def __init__( policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None, self._config.http_logging_policy, ] - self._client: ARMPipelineClient = ARMPipelineClient(base_url=base_url, policies=_policies, **kwargs) + self._client: ARMPipelineClient = ARMPipelineClient(base_url=cast(str, base_url), policies=_policies, **kwargs) client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)} self._serialize = Serializer(client_models) @@ -196,7 +212,7 @@ def _send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: def close(self) -> None: self._client.close() - def __enter__(self) -> "CdnManagementClient": + def __enter__(self) -> Self: self._client.__enter__() return self diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/_configuration.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/_configuration.py index 42db4d3db8e6..5dc5306ae4e8 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/_configuration.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/_configuration.py @@ -6,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, TYPE_CHECKING +from typing import Any, Optional, TYPE_CHECKING from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy @@ -14,11 +14,11 @@ from ._version import VERSION if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports + from azure.core import AzureClouds from azure.core.credentials import TokenCredential -class CdnManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class CdnManagementClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for CdnManagementClient. Note that all parameters used to create this instance are saved as instance @@ -26,15 +26,24 @@ class CdnManagementClientConfiguration: # pylint: disable=too-many-instance-att :param credential: Credential needed for the client to connect to Azure. Required. :type credential: ~azure.core.credentials.TokenCredential - :param subscription_id: Azure Subscription ID. Required. + :param subscription_id: The ID of the target subscription. The value must be an UUID. Required. :type subscription_id: str - :keyword api_version: Api Version. Default value is "2024-02-01". Note that overriding this + :param cloud_setting: The cloud setting for which to get the ARM endpoint. Default value is + None. + :type cloud_setting: ~azure.core.AzureClouds + :keyword api_version: Api Version. Default value is "2025-06-01". Note that overriding this default value may result in unsupported behavior. :paramtype api_version: str """ - def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None: - api_version: str = kwargs.pop("api_version", "2024-02-01") + def __init__( + self, + credential: "TokenCredential", + subscription_id: str, + cloud_setting: Optional["AzureClouds"] = None, + **kwargs: Any + ) -> None: + api_version: str = kwargs.pop("api_version", "2025-06-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") @@ -43,6 +52,7 @@ def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs self.credential = credential self.subscription_id = subscription_id + self.cloud_setting = cloud_setting self.api_version = api_version self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"]) kwargs.setdefault("sdk_moniker", "mgmt-cdn/{}".format(VERSION)) diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/_patch.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/_patch.py index 17dbc073e01b..d3be7c117232 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/_patch.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/_patch.py @@ -28,5 +28,7 @@ # This file is used for handwritten extensions to the generated code. Example: # https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md + + def patch_sdk(): pass diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/_utils/__init__.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/_utils/__init__.py new file mode 100644 index 000000000000..0af9b28f6607 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/_utils/__init__.py @@ -0,0 +1,6 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/_serialization.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/_utils/serialization.py similarity index 81% rename from sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/_serialization.py rename to sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/_utils/serialization.py index f0c6180722c8..6da830e0cf4a 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/_serialization.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/_utils/serialization.py @@ -1,30 +1,12 @@ +# pylint: disable=line-too-long,useless-suppression,too-many-lines +# coding=utf-8 # -------------------------------------------------------------------------- -# # Copyright (c) Microsoft Corporation. All rights reserved. -# -# The MIT License (MIT) -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the ""Software""), to -# deal in the Software without restriction, including without limitation the -# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -# sell copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -# IN THE SOFTWARE. -# +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -# pylint: skip-file # pyright: reportUnnecessaryTypeIgnoreComment=false from base64 import b64decode, b64encode @@ -39,7 +21,6 @@ import sys import codecs from typing import ( - Dict, Any, cast, Optional, @@ -48,11 +29,7 @@ IO, Mapping, Callable, - TypeVar, MutableMapping, - Type, - List, - Mapping, ) try: @@ -62,13 +39,13 @@ import xml.etree.ElementTree as ET import isodate # type: ignore +from typing_extensions import Self from azure.core.exceptions import DeserializationError, SerializationError from azure.core.serialization import NULL as CoreNull _BOM = codecs.BOM_UTF8.decode(encoding="utf-8") -ModelType = TypeVar("ModelType", bound="Model") JSON = MutableMapping[str, Any] @@ -91,6 +68,8 @@ def deserialize_from_text(cls, data: Optional[Union[AnyStr, IO]], content_type: :param data: Input, could be bytes or stream (will be decoded with UTF8) or text :type data: str or bytes or IO :param str content_type: The content type. + :return: The deserialized data. + :rtype: object """ if hasattr(data, "read"): # Assume a stream @@ -112,7 +91,7 @@ def deserialize_from_text(cls, data: Optional[Union[AnyStr, IO]], content_type: try: return json.loads(data_as_str) except ValueError as err: - raise DeserializationError("JSON is invalid: {}".format(err), err) + raise DeserializationError("JSON is invalid: {}".format(err), err) from err elif "xml" in (content_type or []): try: @@ -144,6 +123,8 @@ def _json_attemp(data): # context otherwise. _LOGGER.critical("Wasn't XML not JSON, failing") raise DeserializationError("XML is invalid") from err + elif content_type.startswith("text/"): + return data_as_str raise DeserializationError("Cannot deserialize content-type: {}".format(content_type)) @classmethod @@ -153,6 +134,11 @@ def deserialize_from_http_generics(cls, body_bytes: Optional[Union[AnyStr, IO]], Use bytes and headers to NOT use any requests/aiohttp or whatever specific implementation. Headers will tested for "content-type" + + :param bytes body_bytes: The body of the response. + :param dict headers: The headers of the response. + :returns: The deserialized data. + :rtype: object """ # Try to use content-type from headers if available content_type = None @@ -177,80 +163,31 @@ def deserialize_from_http_generics(cls, body_bytes: Optional[Union[AnyStr, IO]], except NameError: _long_type = int - -class UTC(datetime.tzinfo): - """Time Zone info for handling UTC""" - - def utcoffset(self, dt): - """UTF offset for UTC is 0.""" - return datetime.timedelta(0) - - def tzname(self, dt): - """Timestamp representation.""" - return "Z" - - def dst(self, dt): - """No daylight saving for UTC.""" - return datetime.timedelta(hours=1) - - -try: - from datetime import timezone as _FixedOffset # type: ignore -except ImportError: # Python 2.7 - - class _FixedOffset(datetime.tzinfo): # type: ignore - """Fixed offset in minutes east from UTC. - Copy/pasted from Python doc - :param datetime.timedelta offset: offset in timedelta format - """ - - def __init__(self, offset): - self.__offset = offset - - def utcoffset(self, dt): - return self.__offset - - def tzname(self, dt): - return str(self.__offset.total_seconds() / 3600) - - def __repr__(self): - return "".format(self.tzname(None)) - - def dst(self, dt): - return datetime.timedelta(0) - - def __getinitargs__(self): - return (self.__offset,) - - -try: - from datetime import timezone - - TZ_UTC = timezone.utc -except ImportError: - TZ_UTC = UTC() # type: ignore +TZ_UTC = datetime.timezone.utc _FLATTEN = re.compile(r"(? None: - self.additional_properties: Optional[Dict[str, Any]] = {} - for k in kwargs: + self.additional_properties: Optional[dict[str, Any]] = {} + for k in kwargs: # pylint: disable=consider-using-dict-items if k not in self._attribute_map: _LOGGER.warning("%s is not a known attribute of class %s and will be ignored", k, self.__class__) elif k in self._validation and self._validation[k].get("readonly", False): @@ -298,13 +242,23 @@ def __init__(self, **kwargs: Any) -> None: setattr(self, k, kwargs[k]) def __eq__(self, other: Any) -> bool: - """Compare objects by comparing all attributes.""" + """Compare objects by comparing all attributes. + + :param object other: The object to compare + :returns: True if objects are equal + :rtype: bool + """ if isinstance(other, self.__class__): return self.__dict__ == other.__dict__ return False def __ne__(self, other: Any) -> bool: - """Compare objects by comparing all attributes.""" + """Compare objects by comparing all attributes. + + :param object other: The object to compare + :returns: True if objects are not equal + :rtype: bool + """ return not self.__eq__(other) def __str__(self) -> str: @@ -324,7 +278,11 @@ def is_xml_model(cls) -> bool: @classmethod def _create_xml_node(cls): - """Create XML node.""" + """Create XML node. + + :returns: The XML node + :rtype: xml.etree.ElementTree.Element + """ try: xml_map = cls._xml_map # type: ignore except AttributeError: @@ -344,12 +302,14 @@ def serialize(self, keep_readonly: bool = False, **kwargs: Any) -> JSON: :rtype: dict """ serializer = Serializer(self._infer_class_models()) - return serializer._serialize(self, keep_readonly=keep_readonly, **kwargs) # type: ignore + return serializer._serialize( # type: ignore # pylint: disable=protected-access + self, keep_readonly=keep_readonly, **kwargs + ) def as_dict( self, keep_readonly: bool = True, - key_transformer: Callable[[str, Dict[str, Any], Any], Any] = attribute_transformer, + key_transformer: Callable[[str, dict[str, Any], Any], Any] = attribute_transformer, **kwargs: Any ) -> JSON: """Return a dict that can be serialized using json.dump. @@ -378,12 +338,15 @@ def my_key_transformer(key, attr_desc, value): If you want XML serialization, you can pass the kwargs is_xml=True. + :param bool keep_readonly: If you want to serialize the readonly attributes :param function key_transformer: A key transformer function. :returns: A dict JSON compatible object :rtype: dict """ serializer = Serializer(self._infer_class_models()) - return serializer._serialize(self, key_transformer=key_transformer, keep_readonly=keep_readonly, **kwargs) # type: ignore + return serializer._serialize( # type: ignore # pylint: disable=protected-access + self, key_transformer=key_transformer, keep_readonly=keep_readonly, **kwargs + ) @classmethod def _infer_class_models(cls): @@ -393,30 +356,31 @@ def _infer_class_models(cls): client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} if cls.__name__ not in client_models: raise ValueError("Not Autorest generated code") - except Exception: + except Exception: # pylint: disable=broad-exception-caught # Assume it's not Autorest generated (tests?). Add ourselves as dependencies. client_models = {cls.__name__: cls} return client_models @classmethod - def deserialize(cls: Type[ModelType], data: Any, content_type: Optional[str] = None) -> ModelType: + def deserialize(cls, data: Any, content_type: Optional[str] = None) -> Self: """Parse a str using the RestAPI syntax and return a model. :param str data: A str using RestAPI structure. JSON by default. :param str content_type: JSON by default, set application/xml if XML. :returns: An instance of this model - :raises: DeserializationError if something went wrong + :raises DeserializationError: if something went wrong + :rtype: Self """ deserializer = Deserializer(cls._infer_class_models()) return deserializer(cls.__name__, data, content_type=content_type) # type: ignore @classmethod def from_dict( - cls: Type[ModelType], + cls, data: Any, - key_extractors: Optional[Callable[[str, Dict[str, Any], Any], Any]] = None, + key_extractors: Optional[Callable[[str, dict[str, Any], Any], Any]] = None, content_type: Optional[str] = None, - ) -> ModelType: + ) -> Self: """Parse a dict using given key extractor return a model. By default consider key @@ -424,9 +388,11 @@ def from_dict( and last_rest_key_case_insensitive_extractor) :param dict data: A dict using RestAPI structure + :param function key_extractors: A key extractor function. :param str content_type: JSON by default, set application/xml if XML. :returns: An instance of this model - :raises: DeserializationError if something went wrong + :raises DeserializationError: if something went wrong + :rtype: Self """ deserializer = Deserializer(cls._infer_class_models()) deserializer.key_extractors = ( # type: ignore @@ -446,21 +412,25 @@ def _flatten_subtype(cls, key, objects): return {} result = dict(cls._subtype_map[key]) for valuetype in cls._subtype_map[key].values(): - result.update(objects[valuetype]._flatten_subtype(key, objects)) + result |= objects[valuetype]._flatten_subtype(key, objects) # pylint: disable=protected-access return result @classmethod def _classify(cls, response, objects): """Check the class _subtype_map for any child classes. We want to ignore any inherited _subtype_maps. - Remove the polymorphic key from the initial data. + + :param dict response: The initial data + :param dict objects: The class objects + :returns: The class to be used + :rtype: class """ for subtype_key in cls.__dict__.get("_subtype_map", {}).keys(): subtype_value = None if not isinstance(response, ET.Element): rest_api_response_key = cls._get_rest_key_parts(subtype_key)[-1] - subtype_value = response.pop(rest_api_response_key, None) or response.pop(subtype_key, None) + subtype_value = response.get(rest_api_response_key, None) or response.get(subtype_key, None) else: subtype_value = xml_key_extractor(subtype_key, cls._attribute_map[subtype_key], response) if subtype_value: @@ -499,11 +469,13 @@ def _decode_attribute_map_key(key): inside the received data. :param str key: A key string from the generated code + :returns: The decoded key + :rtype: str """ return key.replace("\\.", ".") -class Serializer(object): +class Serializer: # pylint: disable=too-many-public-methods """Request object model serializer.""" basic_types = {str: "str", int: "int", bool: "bool", float: "float"} @@ -538,7 +510,7 @@ class Serializer(object): "multiple": lambda x, y: x % y != 0, } - def __init__(self, classes: Optional[Mapping[str, type]] = None): + def __init__(self, classes: Optional[Mapping[str, type]] = None) -> None: self.serialize_type = { "iso-8601": Serializer.serialize_iso, "rfc-1123": Serializer.serialize_rfc, @@ -554,17 +526,20 @@ def __init__(self, classes: Optional[Mapping[str, type]] = None): "[]": self.serialize_iter, "{}": self.serialize_dict, } - self.dependencies: Dict[str, type] = dict(classes) if classes else {} + self.dependencies: dict[str, type] = dict(classes) if classes else {} self.key_transformer = full_restapi_key_transformer self.client_side_validation = True - def _serialize(self, target_obj, data_type=None, **kwargs): + def _serialize( # pylint: disable=too-many-nested-blocks, too-many-branches, too-many-statements, too-many-locals + self, target_obj, data_type=None, **kwargs + ): """Serialize data into a string according to type. - :param target_obj: The data to be serialized. + :param object target_obj: The data to be serialized. :param str data_type: The type to be serialized from. :rtype: str, dict - :raises: SerializationError if serialization fails. + :raises SerializationError: if serialization fails. + :returns: The serialized data. """ key_transformer = kwargs.get("key_transformer", self.key_transformer) keep_readonly = kwargs.get("keep_readonly", False) @@ -590,17 +565,19 @@ def _serialize(self, target_obj, data_type=None, **kwargs): serialized = {} if is_xml_model_serialization: - serialized = target_obj._create_xml_node() + serialized = target_obj._create_xml_node() # pylint: disable=protected-access try: - attributes = target_obj._attribute_map + attributes = target_obj._attribute_map # pylint: disable=protected-access for attr, attr_desc in attributes.items(): attr_name = attr - if not keep_readonly and target_obj._validation.get(attr_name, {}).get("readonly", False): + if not keep_readonly and target_obj._validation.get( # pylint: disable=protected-access + attr_name, {} + ).get("readonly", False): continue if attr_name == "additional_properties" and attr_desc["key"] == "": if target_obj.additional_properties is not None: - serialized.update(target_obj.additional_properties) + serialized |= target_obj.additional_properties continue try: @@ -631,7 +608,8 @@ def _serialize(self, target_obj, data_type=None, **kwargs): if isinstance(new_attr, list): serialized.extend(new_attr) # type: ignore elif isinstance(new_attr, ET.Element): - # If the down XML has no XML/Name, we MUST replace the tag with the local tag. But keeping the namespaces. + # If the down XML has no XML/Name, + # we MUST replace the tag with the local tag. But keeping the namespaces. if "name" not in getattr(orig_attr, "_xml_map", {}): splitted_tag = new_attr.tag.split("}") if len(splitted_tag) == 2: # Namespace @@ -662,17 +640,17 @@ def _serialize(self, target_obj, data_type=None, **kwargs): except (AttributeError, KeyError, TypeError) as err: msg = "Attribute {} in object {} cannot be serialized.\n{}".format(attr_name, class_name, str(target_obj)) raise SerializationError(msg) from err - else: - return serialized + return serialized def body(self, data, data_type, **kwargs): """Serialize data intended for a request body. - :param data: The data to be serialized. + :param object data: The data to be serialized. :param str data_type: The type to be serialized from. :rtype: dict - :raises: SerializationError if serialization fails. - :raises: ValueError if data is None + :raises SerializationError: if serialization fails. + :raises ValueError: if data is None + :returns: The serialized request body """ # Just in case this is a dict @@ -701,7 +679,7 @@ def body(self, data, data_type, **kwargs): attribute_key_case_insensitive_extractor, last_rest_key_case_insensitive_extractor, ] - data = deserializer._deserialize(data_type, data) + data = deserializer._deserialize(data_type, data) # pylint: disable=protected-access except DeserializationError as err: raise SerializationError("Unable to build a model: " + str(err)) from err @@ -710,11 +688,13 @@ def body(self, data, data_type, **kwargs): def url(self, name, data, data_type, **kwargs): """Serialize data intended for a URL path. - :param data: The data to be serialized. + :param str name: The name of the URL path parameter. + :param object data: The data to be serialized. :param str data_type: The type to be serialized from. :rtype: str - :raises: TypeError if serialization fails. - :raises: ValueError if data is None + :returns: The serialized URL path + :raises TypeError: if serialization fails. + :raises ValueError: if data is None """ try: output = self.serialize_data(data, data_type, **kwargs) @@ -726,21 +706,20 @@ def url(self, name, data, data_type, **kwargs): output = output.replace("{", quote("{")).replace("}", quote("}")) else: output = quote(str(output), safe="") - except SerializationError: - raise TypeError("{} must be type {}.".format(name, data_type)) - else: - return output + except SerializationError as exc: + raise TypeError("{} must be type {}.".format(name, data_type)) from exc + return output def query(self, name, data, data_type, **kwargs): """Serialize data intended for a URL query. - :param data: The data to be serialized. + :param str name: The name of the query parameter. + :param object data: The data to be serialized. :param str data_type: The type to be serialized from. - :keyword bool skip_quote: Whether to skip quote the serialized result. - Defaults to False. :rtype: str, list - :raises: TypeError if serialization fails. - :raises: ValueError if data is None + :raises TypeError: if serialization fails. + :raises ValueError: if data is None + :returns: The serialized query parameter """ try: # Treat the list aside, since we don't want to encode the div separator @@ -757,19 +736,20 @@ def query(self, name, data, data_type, **kwargs): output = str(output) else: output = quote(str(output), safe="") - except SerializationError: - raise TypeError("{} must be type {}.".format(name, data_type)) - else: - return str(output) + except SerializationError as exc: + raise TypeError("{} must be type {}.".format(name, data_type)) from exc + return str(output) def header(self, name, data, data_type, **kwargs): """Serialize data intended for a request header. - :param data: The data to be serialized. + :param str name: The name of the header. + :param object data: The data to be serialized. :param str data_type: The type to be serialized from. :rtype: str - :raises: TypeError if serialization fails. - :raises: ValueError if data is None + :raises TypeError: if serialization fails. + :raises ValueError: if data is None + :returns: The serialized header """ try: if data_type in ["[str]"]: @@ -778,21 +758,20 @@ def header(self, name, data, data_type, **kwargs): output = self.serialize_data(data, data_type, **kwargs) if data_type == "bool": output = json.dumps(output) - except SerializationError: - raise TypeError("{} must be type {}.".format(name, data_type)) - else: - return str(output) + except SerializationError as exc: + raise TypeError("{} must be type {}.".format(name, data_type)) from exc + return str(output) def serialize_data(self, data, data_type, **kwargs): """Serialize generic data according to supplied data type. - :param data: The data to be serialized. + :param object data: The data to be serialized. :param str data_type: The type to be serialized from. - :param bool required: Whether it's essential that the data not be - empty or None - :raises: AttributeError if required data is None. - :raises: ValueError if data is None - :raises: SerializationError if serialization fails. + :raises AttributeError: if required data is None. + :raises ValueError: if data is None + :raises SerializationError: if serialization fails. + :returns: The serialized data. + :rtype: str, int, float, bool, dict, list """ if data is None: raise ValueError("No value for given attribute") @@ -803,12 +782,12 @@ def serialize_data(self, data, data_type, **kwargs): if data_type in self.basic_types.values(): return self.serialize_basic(data, data_type, **kwargs) - elif data_type in self.serialize_type: + if data_type in self.serialize_type: return self.serialize_type[data_type](data, **kwargs) # If dependencies is empty, try with current data class # It has to be a subclass of Enum anyway - enum_type = self.dependencies.get(data_type, data.__class__) + enum_type = self.dependencies.get(data_type, cast(type, data.__class__)) if issubclass(enum_type, Enum): return Serializer.serialize_enum(data, enum_obj=enum_type) @@ -819,11 +798,10 @@ def serialize_data(self, data, data_type, **kwargs): except (ValueError, TypeError) as err: msg = "Unable to serialize value: {!r} as type: {!r}." raise SerializationError(msg.format(data, data_type)) from err - else: - return self._serialize(data, **kwargs) + return self._serialize(data, **kwargs) @classmethod - def _get_custom_serializers(cls, data_type, **kwargs): + def _get_custom_serializers(cls, data_type, **kwargs): # pylint: disable=inconsistent-return-statements custom_serializer = kwargs.get("basic_types_serializers", {}).get(data_type) if custom_serializer: return custom_serializer @@ -839,23 +817,33 @@ def serialize_basic(cls, data, data_type, **kwargs): - basic_types_serializers dict[str, callable] : If set, use the callable as serializer - is_xml bool : If set, use xml_basic_types_serializers - :param data: Object to be serialized. + :param obj data: Object to be serialized. :param str data_type: Type of object in the iterable. + :rtype: str, int, float, bool + :return: serialized object + :raises TypeError: raise if data_type is not one of str, int, float, bool. """ custom_serializer = cls._get_custom_serializers(data_type, **kwargs) if custom_serializer: return custom_serializer(data) if data_type == "str": return cls.serialize_unicode(data) - return eval(data_type)(data) # nosec + if data_type == "int": + return int(data) + if data_type == "float": + return float(data) + if data_type == "bool": + return bool(data) + raise TypeError("Unknown basic data type: {}".format(data_type)) @classmethod def serialize_unicode(cls, data): """Special handling for serializing unicode strings in Py2. Encode to UTF-8 if unicode, otherwise handle as a str. - :param data: Object to be serialized. + :param str data: Object to be serialized. :rtype: str + :return: serialized object """ try: # If I received an enum, return its value return data.value @@ -869,8 +857,7 @@ def serialize_unicode(cls, data): return data except NameError: return str(data) - else: - return str(data) + return str(data) def serialize_iter(self, data, iter_type, div=None, **kwargs): """Serialize iterable. @@ -880,15 +867,13 @@ def serialize_iter(self, data, iter_type, div=None, **kwargs): serialization_ctxt['type'] should be same as data_type. - is_xml bool : If set, serialize as XML - :param list attr: Object to be serialized. + :param list data: Object to be serialized. :param str iter_type: Type of object in the iterable. - :param bool required: Whether the objects in the iterable must - not be None or empty. :param str div: If set, this str will be used to combine the elements in the iterable into a combined string. Default is 'None'. - :keyword bool do_quote: Whether to quote the serialized result of each iterable element. Defaults to False. :rtype: list, str + :return: serialized iterable """ if isinstance(data, str): raise SerializationError("Refuse str type as a valid iter type.") @@ -943,9 +928,8 @@ def serialize_dict(self, attr, dict_type, **kwargs): :param dict attr: Object to be serialized. :param str dict_type: Type of object in the dictionary. - :param bool required: Whether the objects in the dictionary must - not be None or empty. :rtype: dict + :return: serialized dictionary """ serialization_ctxt = kwargs.get("serialization_ctxt", {}) serialized = {} @@ -969,7 +953,7 @@ def serialize_dict(self, attr, dict_type, **kwargs): return serialized - def serialize_object(self, attr, **kwargs): + def serialize_object(self, attr, **kwargs): # pylint: disable=too-many-return-statements """Serialize a generic object. This will be handled as a dictionary. If object passed in is not a basic type (str, int, float, dict, list) it will simply be @@ -977,6 +961,7 @@ def serialize_object(self, attr, **kwargs): :param dict attr: Object to be serialized. :rtype: dict or str + :return: serialized object """ if attr is None: return None @@ -1001,7 +986,7 @@ def serialize_object(self, attr, **kwargs): return self.serialize_decimal(attr) # If it's a model or I know this dependency, serialize as a Model - elif obj_type in self.dependencies.values() or isinstance(attr, Model): + if obj_type in self.dependencies.values() or isinstance(attr, Model): return self._serialize(attr) if obj_type == dict: @@ -1032,56 +1017,61 @@ def serialize_enum(attr, enum_obj=None): try: enum_obj(result) # type: ignore return result - except ValueError: + except ValueError as exc: for enum_value in enum_obj: # type: ignore if enum_value.value.lower() == str(attr).lower(): return enum_value.value error = "{!r} is not valid value for enum {!r}" - raise SerializationError(error.format(attr, enum_obj)) + raise SerializationError(error.format(attr, enum_obj)) from exc @staticmethod - def serialize_bytearray(attr, **kwargs): + def serialize_bytearray(attr, **kwargs): # pylint: disable=unused-argument """Serialize bytearray into base-64 string. - :param attr: Object to be serialized. + :param str attr: Object to be serialized. :rtype: str + :return: serialized base64 """ return b64encode(attr).decode() @staticmethod - def serialize_base64(attr, **kwargs): + def serialize_base64(attr, **kwargs): # pylint: disable=unused-argument """Serialize str into base-64 string. - :param attr: Object to be serialized. + :param str attr: Object to be serialized. :rtype: str + :return: serialized base64 """ encoded = b64encode(attr).decode("ascii") return encoded.strip("=").replace("+", "-").replace("/", "_") @staticmethod - def serialize_decimal(attr, **kwargs): + def serialize_decimal(attr, **kwargs): # pylint: disable=unused-argument """Serialize Decimal object to float. - :param attr: Object to be serialized. + :param decimal attr: Object to be serialized. :rtype: float + :return: serialized decimal """ return float(attr) @staticmethod - def serialize_long(attr, **kwargs): + def serialize_long(attr, **kwargs): # pylint: disable=unused-argument """Serialize long (Py2) or int (Py3). - :param attr: Object to be serialized. + :param int attr: Object to be serialized. :rtype: int/long + :return: serialized long """ return _long_type(attr) @staticmethod - def serialize_date(attr, **kwargs): + def serialize_date(attr, **kwargs): # pylint: disable=unused-argument """Serialize Date object into ISO-8601 formatted string. :param Date attr: Object to be serialized. :rtype: str + :return: serialized date """ if isinstance(attr, str): attr = isodate.parse_date(attr) @@ -1089,11 +1079,12 @@ def serialize_date(attr, **kwargs): return t @staticmethod - def serialize_time(attr, **kwargs): + def serialize_time(attr, **kwargs): # pylint: disable=unused-argument """Serialize Time object into ISO-8601 formatted string. :param datetime.time attr: Object to be serialized. :rtype: str + :return: serialized time """ if isinstance(attr, str): attr = isodate.parse_time(attr) @@ -1103,30 +1094,32 @@ def serialize_time(attr, **kwargs): return t @staticmethod - def serialize_duration(attr, **kwargs): + def serialize_duration(attr, **kwargs): # pylint: disable=unused-argument """Serialize TimeDelta object into ISO-8601 formatted string. :param TimeDelta attr: Object to be serialized. :rtype: str + :return: serialized duration """ if isinstance(attr, str): attr = isodate.parse_duration(attr) return isodate.duration_isoformat(attr) @staticmethod - def serialize_rfc(attr, **kwargs): + def serialize_rfc(attr, **kwargs): # pylint: disable=unused-argument """Serialize Datetime object into RFC-1123 formatted string. :param Datetime attr: Object to be serialized. :rtype: str - :raises: TypeError if format invalid. + :raises TypeError: if format invalid. + :return: serialized rfc """ try: if not attr.tzinfo: _LOGGER.warning("Datetime with no tzinfo will be considered UTC.") utc = attr.utctimetuple() - except AttributeError: - raise TypeError("RFC1123 object must be valid Datetime object.") + except AttributeError as exc: + raise TypeError("RFC1123 object must be valid Datetime object.") from exc return "{}, {:02} {} {:04} {:02}:{:02}:{:02} GMT".format( Serializer.days[utc.tm_wday], @@ -1139,12 +1132,13 @@ def serialize_rfc(attr, **kwargs): ) @staticmethod - def serialize_iso(attr, **kwargs): + def serialize_iso(attr, **kwargs): # pylint: disable=unused-argument """Serialize Datetime object into ISO-8601 formatted string. :param Datetime attr: Object to be serialized. :rtype: str - :raises: SerializationError if format invalid. + :raises SerializationError: if format invalid. + :return: serialized iso """ if isinstance(attr, str): attr = isodate.parse_datetime(attr) @@ -1170,13 +1164,14 @@ def serialize_iso(attr, **kwargs): raise TypeError(msg) from err @staticmethod - def serialize_unix(attr, **kwargs): + def serialize_unix(attr, **kwargs): # pylint: disable=unused-argument """Serialize Datetime object into IntTime format. This is represented as seconds. :param Datetime attr: Object to be serialized. :rtype: int - :raises: SerializationError if format invalid + :raises SerializationError: if format invalid + :return: serialied unix """ if isinstance(attr, int): return attr @@ -1184,17 +1179,17 @@ def serialize_unix(attr, **kwargs): if not attr.tzinfo: _LOGGER.warning("Datetime with no tzinfo will be considered UTC.") return int(calendar.timegm(attr.utctimetuple())) - except AttributeError: - raise TypeError("Unix time object must be valid Datetime object.") + except AttributeError as exc: + raise TypeError("Unix time object must be valid Datetime object.") from exc -def rest_key_extractor(attr, attr_desc, data): +def rest_key_extractor(attr, attr_desc, data): # pylint: disable=unused-argument key = attr_desc["key"] working_data = data while "." in key: # Need the cast, as for some reasons "split" is typed as list[str | Any] - dict_keys = cast(List[str], _FLATTEN.split(key)) + dict_keys = cast(list[str], _FLATTEN.split(key)) if len(dict_keys) == 1: key = _decode_attribute_map_key(dict_keys[0]) break @@ -1209,7 +1204,9 @@ def rest_key_extractor(attr, attr_desc, data): return working_data.get(key) -def rest_key_case_insensitive_extractor(attr, attr_desc, data): +def rest_key_case_insensitive_extractor( # pylint: disable=unused-argument, inconsistent-return-statements + attr, attr_desc, data +): key = attr_desc["key"] working_data = data @@ -1230,17 +1227,29 @@ def rest_key_case_insensitive_extractor(attr, attr_desc, data): return attribute_key_case_insensitive_extractor(key, None, working_data) -def last_rest_key_extractor(attr, attr_desc, data): - """Extract the attribute in "data" based on the last part of the JSON path key.""" +def last_rest_key_extractor(attr, attr_desc, data): # pylint: disable=unused-argument + """Extract the attribute in "data" based on the last part of the JSON path key. + + :param str attr: The attribute to extract + :param dict attr_desc: The attribute description + :param dict data: The data to extract from + :rtype: object + :returns: The extracted attribute + """ key = attr_desc["key"] dict_keys = _FLATTEN.split(key) return attribute_key_extractor(dict_keys[-1], None, data) -def last_rest_key_case_insensitive_extractor(attr, attr_desc, data): +def last_rest_key_case_insensitive_extractor(attr, attr_desc, data): # pylint: disable=unused-argument """Extract the attribute in "data" based on the last part of the JSON path key. This is the case insensitive version of "last_rest_key_extractor" + :param str attr: The attribute to extract + :param dict attr_desc: The attribute description + :param dict data: The data to extract from + :rtype: object + :returns: The extracted attribute """ key = attr_desc["key"] dict_keys = _FLATTEN.split(key) @@ -1277,7 +1286,7 @@ def _extract_name_from_internal_type(internal_type): return xml_name -def xml_key_extractor(attr, attr_desc, data): +def xml_key_extractor(attr, attr_desc, data): # pylint: disable=unused-argument,too-many-return-statements if isinstance(data, dict): return None @@ -1329,22 +1338,21 @@ def xml_key_extractor(attr, attr_desc, data): if is_iter_type: if is_wrapped: return None # is_wrapped no node, we want None - else: - return [] # not wrapped, assume empty list + return [] # not wrapped, assume empty list return None # Assume it's not there, maybe an optional node. # If is_iter_type and not wrapped, return all found children if is_iter_type: if not is_wrapped: return children - else: # Iter and wrapped, should have found one node only (the wrap one) - if len(children) != 1: - raise DeserializationError( - "Tried to deserialize an array not wrapped, and found several nodes '{}'. Maybe you should declare this array as wrapped?".format( - xml_name - ) + # Iter and wrapped, should have found one node only (the wrap one) + if len(children) != 1: + raise DeserializationError( + "Tried to deserialize an array not wrapped, and found several nodes '{}'. Maybe you should declare this array as wrapped?".format( + xml_name ) - return list(children[0]) # Might be empty list and that's ok. + ) + return list(children[0]) # Might be empty list and that's ok. # Here it's not a itertype, we should have found one element only or empty if len(children) > 1: @@ -1352,7 +1360,7 @@ def xml_key_extractor(attr, attr_desc, data): return children[0] -class Deserializer(object): +class Deserializer: """Response object model deserializer. :param dict classes: Class type dictionary for deserializing complex types. @@ -1361,9 +1369,9 @@ class Deserializer(object): basic_types = {str: "str", int: "int", bool: "bool", float: "float"} - valid_date = re.compile(r"\d{4}[-]\d{2}[-]\d{2}T\d{2}:\d{2}:\d{2}" r"\.?\d*Z?[-+]?[\d{2}]?:?[\d{2}]?") + valid_date = re.compile(r"\d{4}[-]\d{2}[-]\d{2}T\d{2}:\d{2}:\d{2}\.?\d*Z?[-+]?[\d{2}]?:?[\d{2}]?") - def __init__(self, classes: Optional[Mapping[str, type]] = None): + def __init__(self, classes: Optional[Mapping[str, type]] = None) -> None: self.deserialize_type = { "iso-8601": Deserializer.deserialize_iso, "rfc-1123": Deserializer.deserialize_rfc, @@ -1383,7 +1391,7 @@ def __init__(self, classes: Optional[Mapping[str, type]] = None): "duration": (isodate.Duration, datetime.timedelta), "iso-8601": (datetime.datetime), } - self.dependencies: Dict[str, type] = dict(classes) if classes else {} + self.dependencies: dict[str, type] = dict(classes) if classes else {} self.key_extractors = [rest_key_extractor, xml_key_extractor] # Additional properties only works if the "rest_key_extractor" is used to # extract the keys. Making it to work whatever the key extractor is too much @@ -1399,27 +1407,29 @@ def __call__(self, target_obj, response_data, content_type=None): :param str target_obj: Target data type to deserialize to. :param requests.Response response_data: REST response object. :param str content_type: Swagger "produces" if available. - :raises: DeserializationError if deserialization fails. + :raises DeserializationError: if deserialization fails. :return: Deserialized object. + :rtype: object """ data = self._unpack_content(response_data, content_type) return self._deserialize(target_obj, data) - def _deserialize(self, target_obj, data): + def _deserialize(self, target_obj, data): # pylint: disable=inconsistent-return-statements """Call the deserializer on a model. Data needs to be already deserialized as JSON or XML ElementTree :param str target_obj: Target data type to deserialize to. :param object data: Object to deserialize. - :raises: DeserializationError if deserialization fails. + :raises DeserializationError: if deserialization fails. :return: Deserialized object. + :rtype: object """ # This is already a model, go recursive just in case if hasattr(data, "_attribute_map"): constants = [name for name, config in getattr(data, "_validation", {}).items() if config.get("constant")] try: - for attr, mapconfig in data._attribute_map.items(): + for attr, mapconfig in data._attribute_map.items(): # pylint: disable=protected-access if attr in constants: continue value = getattr(data, attr) @@ -1438,13 +1448,13 @@ def _deserialize(self, target_obj, data): if isinstance(response, str): return self.deserialize_data(data, response) - elif isinstance(response, type) and issubclass(response, Enum): + if isinstance(response, type) and issubclass(response, Enum): return self.deserialize_enum(data, response) if data is None or data is CoreNull: return data try: - attributes = response._attribute_map # type: ignore + attributes = response._attribute_map # type: ignore # pylint: disable=protected-access d_attrs = {} for attr, attr_desc in attributes.items(): # Check empty string. If it's not empty, someone has a real "additionalProperties"... @@ -1474,9 +1484,8 @@ def _deserialize(self, target_obj, data): except (AttributeError, TypeError, KeyError) as err: msg = "Unable to deserialize to object: " + class_name # type: ignore raise DeserializationError(msg) from err - else: - additional_properties = self._build_additional_properties(attributes, data) - return self._instantiate_model(response, d_attrs, additional_properties) + additional_properties = self._build_additional_properties(attributes, data) + return self._instantiate_model(response, d_attrs, additional_properties) def _build_additional_properties(self, attribute_map, data): if not self.additional_properties_detection: @@ -1503,6 +1512,8 @@ def _classify_target(self, target, data): :param str target: The target object type to deserialize to. :param str/dict data: The response data to deserialize. + :return: The classified target object and its class name. + :rtype: tuple """ if target is None: return None, None @@ -1514,7 +1525,7 @@ def _classify_target(self, target, data): return target, target try: - target = target._classify(data, self.dependencies) # type: ignore + target = target._classify(data, self.dependencies) # type: ignore # pylint: disable=protected-access except AttributeError: pass # Target is not a Model, no classify return target, target.__class__.__name__ # type: ignore @@ -1529,10 +1540,12 @@ def failsafe_deserialize(self, target_obj, data, content_type=None): :param str target_obj: The target object type to deserialize to. :param str/dict data: The response data to deserialize. :param str content_type: Swagger "produces" if available. + :return: Deserialized object. + :rtype: object """ try: return self(target_obj, data, content_type=content_type) - except: + except: # pylint: disable=bare-except _LOGGER.debug( "Ran into a deserialization error. Ignoring since this is failsafe deserialization", exc_info=True ) @@ -1550,10 +1563,12 @@ def _unpack_content(raw_data, content_type=None): If raw_data is something else, bypass all logic and return it directly. - :param raw_data: Data to be processed. - :param content_type: How to parse if raw_data is a string/bytes. + :param obj raw_data: Data to be processed. + :param str content_type: How to parse if raw_data is a string/bytes. :raises JSONDecodeError: If JSON is requested and parsing is impossible. :raises UnicodeDecodeError: If bytes is not UTF8 + :rtype: object + :return: Unpacked content. """ # Assume this is enough to detect a Pipeline Response without importing it context = getattr(raw_data, "context", {}) @@ -1577,24 +1592,35 @@ def _unpack_content(raw_data, content_type=None): def _instantiate_model(self, response, attrs, additional_properties=None): """Instantiate a response model passing in deserialized args. - :param response: The response model class. - :param d_attrs: The deserialized response attributes. + :param Response response: The response model class. + :param dict attrs: The deserialized response attributes. + :param dict additional_properties: Additional properties to be set. + :rtype: Response + :return: The instantiated response model. """ if callable(response): subtype = getattr(response, "_subtype_map", {}) try: - readonly = [k for k, v in response._validation.items() if v.get("readonly")] - const = [k for k, v in response._validation.items() if v.get("constant")] + readonly = [ + k + for k, v in response._validation.items() # pylint: disable=protected-access # type: ignore + if v.get("readonly") + ] + const = [ + k + for k, v in response._validation.items() # pylint: disable=protected-access # type: ignore + if v.get("constant") + ] kwargs = {k: v for k, v in attrs.items() if k not in subtype and k not in readonly + const} response_obj = response(**kwargs) for attr in readonly: setattr(response_obj, attr, attrs.get(attr)) if additional_properties: - response_obj.additional_properties = additional_properties + response_obj.additional_properties = additional_properties # type: ignore return response_obj except TypeError as err: msg = "Unable to deserialize {} into model {}. ".format(kwargs, response) # type: ignore - raise DeserializationError(msg + str(err)) + raise DeserializationError(msg + str(err)) from err else: try: for attr, value in attrs.items(): @@ -1603,15 +1629,16 @@ def _instantiate_model(self, response, attrs, additional_properties=None): except Exception as exp: msg = "Unable to populate response model. " msg += "Type: {}, Error: {}".format(type(response), exp) - raise DeserializationError(msg) + raise DeserializationError(msg) from exp - def deserialize_data(self, data, data_type): + def deserialize_data(self, data, data_type): # pylint: disable=too-many-return-statements """Process data for deserialization according to data type. :param str data: The response string to be deserialized. :param str data_type: The type to deserialize to. - :raises: DeserializationError if deserialization fails. + :raises DeserializationError: if deserialization fails. :return: Deserialized object. + :rtype: object """ if data is None: return data @@ -1625,7 +1652,11 @@ def deserialize_data(self, data, data_type): if isinstance(data, self.deserialize_expected_types.get(data_type, tuple())): return data - is_a_text_parsing_type = lambda x: x not in ["object", "[]", r"{}"] + is_a_text_parsing_type = lambda x: x not in [ # pylint: disable=unnecessary-lambda-assignment + "object", + "[]", + r"{}", + ] if isinstance(data, ET.Element) and is_a_text_parsing_type(data_type) and not data.text: return None data_val = self.deserialize_type[data_type](data) @@ -1645,14 +1676,14 @@ def deserialize_data(self, data, data_type): msg = "Unable to deserialize response data." msg += " Data: {}, {}".format(data, data_type) raise DeserializationError(msg) from err - else: - return self._deserialize(obj_type, data) + return self._deserialize(obj_type, data) def deserialize_iter(self, attr, iter_type): """Deserialize an iterable. :param list attr: Iterable to be deserialized. :param str iter_type: The type of object in the iterable. + :return: Deserialized iterable. :rtype: list """ if attr is None: @@ -1669,6 +1700,7 @@ def deserialize_dict(self, attr, dict_type): :param dict/list attr: Dictionary to be deserialized. Also accepts a list of key, value pairs. :param str dict_type: The object type of the items in the dictionary. + :return: Deserialized dictionary. :rtype: dict """ if isinstance(attr, list): @@ -1679,13 +1711,14 @@ def deserialize_dict(self, attr, dict_type): attr = {el.tag: el.text for el in attr} return {k: self.deserialize_data(v, dict_type) for k, v in attr.items()} - def deserialize_object(self, attr, **kwargs): + def deserialize_object(self, attr, **kwargs): # pylint: disable=too-many-return-statements """Deserialize a generic object. This will be handled as a dictionary. :param dict attr: Dictionary to be deserialized. + :return: Deserialized object. :rtype: dict - :raises: TypeError if non-builtin datatype encountered. + :raises TypeError: if non-builtin datatype encountered. """ if attr is None: return None @@ -1718,11 +1751,10 @@ def deserialize_object(self, attr, **kwargs): pass return deserialized - else: - error = "Cannot deserialize generic object with type: " - raise TypeError(error + str(obj_type)) + error = "Cannot deserialize generic object with type: " + raise TypeError(error + str(obj_type)) - def deserialize_basic(self, attr, data_type): + def deserialize_basic(self, attr, data_type): # pylint: disable=too-many-return-statements """Deserialize basic builtin data type from string. Will attempt to convert to str, int, float and bool. This function will also accept '1', '0', 'true' and 'false' as @@ -1730,8 +1762,9 @@ def deserialize_basic(self, attr, data_type): :param str attr: response string to be deserialized. :param str data_type: deserialization data type. + :return: Deserialized basic type. :rtype: str, int, float or bool - :raises: TypeError if string format is not valid. + :raises TypeError: if string format is not valid or data_type is not one of str, int, float, bool. """ # If we're here, data is supposed to be a basic type. # If it's still an XML node, take the text @@ -1741,24 +1774,27 @@ def deserialize_basic(self, attr, data_type): if data_type == "str": # None or '', node is empty string. return "" - else: - # None or '', node with a strong type is None. - # Don't try to model "empty bool" or "empty int" - return None + # None or '', node with a strong type is None. + # Don't try to model "empty bool" or "empty int" + return None if data_type == "bool": if attr in [True, False, 1, 0]: return bool(attr) - elif isinstance(attr, str): + if isinstance(attr, str): if attr.lower() in ["true", "1"]: return True - elif attr.lower() in ["false", "0"]: + if attr.lower() in ["false", "0"]: return False raise TypeError("Invalid boolean value: {}".format(attr)) if data_type == "str": return self.deserialize_unicode(attr) - return eval(data_type)(attr) # nosec + if data_type == "int": + return int(attr) + if data_type == "float": + return float(attr) + raise TypeError("Unknown basic data type: {}".format(data_type)) @staticmethod def deserialize_unicode(data): @@ -1766,6 +1802,7 @@ def deserialize_unicode(data): as a string. :param str data: response string to be deserialized. + :return: Deserialized string. :rtype: str or unicode """ # We might be here because we have an enum modeled as string, @@ -1779,8 +1816,7 @@ def deserialize_unicode(data): return data except NameError: return str(data) - else: - return str(data) + return str(data) @staticmethod def deserialize_enum(data, enum_obj): @@ -1792,6 +1828,7 @@ def deserialize_enum(data, enum_obj): :param str data: Response string to be deserialized. If this value is None or invalid it will be returned as-is. :param Enum enum_obj: Enum object to deserialize to. + :return: Deserialized enum object. :rtype: Enum """ if isinstance(data, enum_obj) or data is None: @@ -1802,9 +1839,9 @@ def deserialize_enum(data, enum_obj): # Workaround. We might consider remove it in the future. try: return list(enum_obj.__members__.values())[data] - except IndexError: + except IndexError as exc: error = "{!r} is not a valid index for enum {!r}" - raise DeserializationError(error.format(data, enum_obj)) + raise DeserializationError(error.format(data, enum_obj)) from exc try: return enum_obj(str(data)) except ValueError: @@ -1820,8 +1857,9 @@ def deserialize_bytearray(attr): """Deserialize string into bytearray. :param str attr: response string to be deserialized. + :return: Deserialized bytearray :rtype: bytearray - :raises: TypeError if string format invalid. + :raises TypeError: if string format invalid. """ if isinstance(attr, ET.Element): attr = attr.text @@ -1832,8 +1870,9 @@ def deserialize_base64(attr): """Deserialize base64 encoded string into string. :param str attr: response string to be deserialized. + :return: Deserialized base64 string :rtype: bytearray - :raises: TypeError if string format invalid. + :raises TypeError: if string format invalid. """ if isinstance(attr, ET.Element): attr = attr.text @@ -1847,8 +1886,9 @@ def deserialize_decimal(attr): """Deserialize string into Decimal object. :param str attr: response string to be deserialized. - :rtype: Decimal - :raises: DeserializationError if string format invalid. + :return: Deserialized decimal + :raises DeserializationError: if string format invalid. + :rtype: decimal """ if isinstance(attr, ET.Element): attr = attr.text @@ -1863,8 +1903,9 @@ def deserialize_long(attr): """Deserialize string into long (Py2) or int (Py3). :param str attr: response string to be deserialized. + :return: Deserialized int :rtype: long or int - :raises: ValueError if string format invalid. + :raises ValueError: if string format invalid. """ if isinstance(attr, ET.Element): attr = attr.text @@ -1875,8 +1916,9 @@ def deserialize_duration(attr): """Deserialize ISO-8601 formatted string into TimeDelta object. :param str attr: response string to be deserialized. + :return: Deserialized duration :rtype: TimeDelta - :raises: DeserializationError if string format invalid. + :raises DeserializationError: if string format invalid. """ if isinstance(attr, ET.Element): attr = attr.text @@ -1885,16 +1927,16 @@ def deserialize_duration(attr): except (ValueError, OverflowError, AttributeError) as err: msg = "Cannot deserialize duration object." raise DeserializationError(msg) from err - else: - return duration + return duration @staticmethod def deserialize_date(attr): """Deserialize ISO-8601 formatted string into Date object. :param str attr: response string to be deserialized. + :return: Deserialized date :rtype: Date - :raises: DeserializationError if string format invalid. + :raises DeserializationError: if string format invalid. """ if isinstance(attr, ET.Element): attr = attr.text @@ -1908,8 +1950,9 @@ def deserialize_time(attr): """Deserialize ISO-8601 formatted string into time object. :param str attr: response string to be deserialized. + :return: Deserialized time :rtype: datetime.time - :raises: DeserializationError if string format invalid. + :raises DeserializationError: if string format invalid. """ if isinstance(attr, ET.Element): attr = attr.text @@ -1922,31 +1965,32 @@ def deserialize_rfc(attr): """Deserialize RFC-1123 formatted string into Datetime object. :param str attr: response string to be deserialized. + :return: Deserialized RFC datetime :rtype: Datetime - :raises: DeserializationError if string format invalid. + :raises DeserializationError: if string format invalid. """ if isinstance(attr, ET.Element): attr = attr.text try: parsed_date = email.utils.parsedate_tz(attr) # type: ignore date_obj = datetime.datetime( - *parsed_date[:6], tzinfo=_FixedOffset(datetime.timedelta(minutes=(parsed_date[9] or 0) / 60)) + *parsed_date[:6], tzinfo=datetime.timezone(datetime.timedelta(minutes=(parsed_date[9] or 0) / 60)) ) if not date_obj.tzinfo: date_obj = date_obj.astimezone(tz=TZ_UTC) except ValueError as err: msg = "Cannot deserialize to rfc datetime object." raise DeserializationError(msg) from err - else: - return date_obj + return date_obj @staticmethod def deserialize_iso(attr): """Deserialize ISO-8601 formatted string into Datetime object. :param str attr: response string to be deserialized. + :return: Deserialized ISO datetime :rtype: Datetime - :raises: DeserializationError if string format invalid. + :raises DeserializationError: if string format invalid. """ if isinstance(attr, ET.Element): attr = attr.text @@ -1974,8 +2018,7 @@ def deserialize_iso(attr): except (ValueError, OverflowError, AttributeError) as err: msg = "Cannot deserialize datetime object." raise DeserializationError(msg) from err - else: - return date_obj + return date_obj @staticmethod def deserialize_unix(attr): @@ -1983,8 +2026,9 @@ def deserialize_unix(attr): This is represented as seconds. :param int attr: Object to be serialized. + :return: Deserialized datetime :rtype: Datetime - :raises: DeserializationError if format invalid + :raises DeserializationError: if format invalid """ if isinstance(attr, ET.Element): attr = int(attr.text) # type: ignore @@ -1994,5 +2038,4 @@ def deserialize_unix(attr): except ValueError as err: msg = "Cannot deserialize to unix datetime object." raise DeserializationError(msg) from err - else: - return date_obj + return date_obj diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/_vendor.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/_utils/utils.py similarity index 59% rename from sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/_vendor.py rename to sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/_utils/utils.py index 2fc2afd41b44..39b612f39a9b 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/_vendor.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/_utils/utils.py @@ -6,23 +6,20 @@ # -------------------------------------------------------------------------- from abc import ABC -from typing import TYPE_CHECKING - -from azure.core.pipeline.transport import HttpRequest - -from ._configuration import CdnManagementClientConfiguration +from typing import Generic, TYPE_CHECKING, TypeVar if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from azure.core import AsyncPipelineClient + from .serialization import Deserializer, Serializer + - from .._serialization import Deserializer, Serializer +TClient = TypeVar("TClient") +TConfig = TypeVar("TConfig") -class CdnManagementClientMixinABC(ABC): +class ClientMixinABC(ABC, Generic[TClient, TConfig]): """DO NOT use this class. It is for internal typing use only.""" - _client: "AsyncPipelineClient" - _config: CdnManagementClientConfiguration + _client: TClient + _config: TConfig _serialize: "Serializer" _deserialize: "Deserializer" diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/_vendor.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/_vendor.py deleted file mode 100644 index 7f38712a5635..000000000000 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/_vendor.py +++ /dev/null @@ -1,36 +0,0 @@ -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from abc import ABC -from typing import TYPE_CHECKING - -from azure.core.pipeline.transport import HttpRequest - -from ._configuration import CdnManagementClientConfiguration - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from azure.core import PipelineClient - - from ._serialization import Deserializer, Serializer - - -def _convert_request(request, files=None): - data = request.content if not files else None - request = HttpRequest(method=request.method, url=request.url, headers=request.headers, data=data) - if files: - request.set_formdata_body(files) - return request - - -class CdnManagementClientMixinABC(ABC): - """DO NOT use this class. It is for internal typing use only.""" - - _client: "PipelineClient" - _config: CdnManagementClientConfiguration - _serialize: "Serializer" - _deserialize: "Deserializer" diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/_version.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/_version.py index ac7454afbab4..d382b630900a 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/_version.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/_version.py @@ -6,4 +6,5 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "13.1.1" + +VERSION = "13.2.0" diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/__init__.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/__init__.py index ca0d8662c45f..e1b8503a3b09 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/__init__.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/__init__.py @@ -5,12 +5,18 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._cdn_management_client import CdnManagementClient +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._cdn_management_client import CdnManagementClient # type: ignore try: from ._patch import __all__ as _patch_all - from ._patch import * # pylint: disable=unused-wildcard-import + from ._patch import * except ImportError: _patch_all = [] from ._patch import patch_sdk as _patch_sdk @@ -18,6 +24,6 @@ __all__ = [ "CdnManagementClient", ] -__all__.extend([p for p in _patch_all if p not in __all__]) +__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/_cdn_management_client.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/_cdn_management_client.py index d0f896981425..d714daaafdbd 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/_cdn_management_client.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/_cdn_management_client.py @@ -7,15 +7,18 @@ # -------------------------------------------------------------------------- from copy import deepcopy -from typing import Any, Awaitable, TYPE_CHECKING +from typing import Any, Awaitable, Optional, TYPE_CHECKING, cast +from typing_extensions import Self from azure.core.pipeline import policies from azure.core.rest import AsyncHttpResponse, HttpRequest +from azure.core.settings import settings from azure.mgmt.core import AsyncARMPipelineClient from azure.mgmt.core.policies import AsyncARMAutoResourceProviderRegistrationPolicy +from azure.mgmt.core.tools import get_arm_endpoints from .. import models as _models -from .._serialization import Deserializer, Serializer +from .._utils.serialization import Deserializer, Serializer from ._configuration import CdnManagementClientConfiguration from .operations import ( AFDCustomDomainsOperations, @@ -23,7 +26,6 @@ AFDOriginGroupsOperations, AFDOriginsOperations, AFDProfilesOperations, - CdnManagementClientOperationsMixin, CustomDomainsOperations, EdgeNodesOperations, EndpointsOperations, @@ -40,16 +42,15 @@ RulesOperations, SecretsOperations, SecurityPoliciesOperations, + _CdnManagementClientOperationsMixin, ) if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports + from azure.core import AzureClouds from azure.core.credentials_async import AsyncTokenCredential -class CdnManagementClient( - CdnManagementClientOperationsMixin -): # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes +class CdnManagementClient(_CdnManagementClientOperationsMixin): # pylint: disable=too-many-instance-attributes """Cdn Management Client. :ivar afd_profiles: AFDProfilesOperations operations @@ -96,11 +97,14 @@ class CdnManagementClient( :vartype managed_rule_sets: azure.mgmt.cdn.aio.operations.ManagedRuleSetsOperations :param credential: Credential needed for the client to connect to Azure. Required. :type credential: ~azure.core.credentials_async.AsyncTokenCredential - :param subscription_id: Azure Subscription ID. Required. + :param subscription_id: The ID of the target subscription. The value must be an UUID. Required. :type subscription_id: str - :param base_url: Service URL. Default value is "https://management.azure.com". + :param base_url: Service URL. Default value is None. :type base_url: str - :keyword api_version: Api Version. Default value is "2024-02-01". Note that overriding this + :keyword cloud_setting: The cloud setting for which to get the ARM endpoint. Default value is + None. + :paramtype cloud_setting: ~azure.core.AzureClouds + :keyword api_version: Api Version. Default value is "2025-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 @@ -111,12 +115,24 @@ def __init__( self, credential: "AsyncTokenCredential", subscription_id: str, - base_url: str = "https://management.azure.com", + base_url: Optional[str] = None, + *, + cloud_setting: Optional["AzureClouds"] = None, **kwargs: Any ) -> None: + _cloud = cloud_setting or settings.current.azure_cloud # type: ignore + _endpoints = get_arm_endpoints(_cloud) + if not base_url: + base_url = _endpoints["resource_manager"] + credential_scopes = kwargs.pop("credential_scopes", _endpoints["credential_scopes"]) self._config = CdnManagementClientConfiguration( - credential=credential, subscription_id=subscription_id, **kwargs + credential=credential, + subscription_id=subscription_id, + cloud_setting=cloud_setting, + credential_scopes=credential_scopes, + **kwargs ) + _policies = kwargs.pop("policies", None) if _policies is None: _policies = [ @@ -135,7 +151,9 @@ def __init__( policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None, self._config.http_logging_policy, ] - self._client: AsyncARMPipelineClient = AsyncARMPipelineClient(base_url=base_url, policies=_policies, **kwargs) + self._client: AsyncARMPipelineClient = AsyncARMPipelineClient( + base_url=cast(str, base_url), policies=_policies, **kwargs + ) client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)} self._serialize = Serializer(client_models) @@ -198,7 +216,7 @@ def _send_request( async def close(self) -> None: await self._client.close() - async def __aenter__(self) -> "CdnManagementClient": + async def __aenter__(self) -> Self: await self._client.__aenter__() return self diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/_configuration.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/_configuration.py index 7c40851bb371..8598c3b27a38 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/_configuration.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/_configuration.py @@ -6,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, TYPE_CHECKING +from typing import Any, Optional, TYPE_CHECKING from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMHttpLoggingPolicy, AsyncARMChallengeAuthenticationPolicy @@ -14,11 +14,11 @@ from .._version import VERSION if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports + from azure.core import AzureClouds from azure.core.credentials_async import AsyncTokenCredential -class CdnManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class CdnManagementClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for CdnManagementClient. Note that all parameters used to create this instance are saved as instance @@ -26,15 +26,24 @@ class CdnManagementClientConfiguration: # pylint: disable=too-many-instance-att :param credential: Credential needed for the client to connect to Azure. Required. :type credential: ~azure.core.credentials_async.AsyncTokenCredential - :param subscription_id: Azure Subscription ID. Required. + :param subscription_id: The ID of the target subscription. The value must be an UUID. Required. :type subscription_id: str - :keyword api_version: Api Version. Default value is "2024-02-01". Note that overriding this + :param cloud_setting: The cloud setting for which to get the ARM endpoint. Default value is + None. + :type cloud_setting: ~azure.core.AzureClouds + :keyword api_version: Api Version. Default value is "2025-06-01". Note that overriding this default value may result in unsupported behavior. :paramtype api_version: str """ - def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None: - api_version: str = kwargs.pop("api_version", "2024-02-01") + def __init__( + self, + credential: "AsyncTokenCredential", + subscription_id: str, + cloud_setting: Optional["AzureClouds"] = None, + **kwargs: Any + ) -> None: + api_version: str = kwargs.pop("api_version", "2025-06-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") @@ -43,6 +52,7 @@ def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **k self.credential = credential self.subscription_id = subscription_id + self.cloud_setting = cloud_setting self.api_version = api_version self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"]) kwargs.setdefault("sdk_moniker", "mgmt-cdn/{}".format(VERSION)) diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/_patch.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/_patch.py index 17dbc073e01b..d3be7c117232 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/_patch.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/_patch.py @@ -28,5 +28,7 @@ # This file is used for handwritten extensions to the generated code. Example: # https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md + + def patch_sdk(): pass diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/__init__.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/__init__.py index ebcf7eb37437..8fc333a2c406 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/__init__.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/__init__.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,36 +6,41 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._cdn_management_client_operations import CdnManagementClientOperationsMixin -from ._afd_profiles_operations import AFDProfilesOperations -from ._afd_custom_domains_operations import AFDCustomDomainsOperations -from ._afd_endpoints_operations import AFDEndpointsOperations -from ._afd_origin_groups_operations import AFDOriginGroupsOperations -from ._afd_origins_operations import AFDOriginsOperations -from ._routes_operations import RoutesOperations -from ._rule_sets_operations import RuleSetsOperations -from ._rules_operations import RulesOperations -from ._security_policies_operations import SecurityPoliciesOperations -from ._secrets_operations import SecretsOperations -from ._log_analytics_operations import LogAnalyticsOperations -from ._profiles_operations import ProfilesOperations -from ._endpoints_operations import EndpointsOperations -from ._origins_operations import OriginsOperations -from ._origin_groups_operations import OriginGroupsOperations -from ._custom_domains_operations import CustomDomainsOperations -from ._resource_usage_operations import ResourceUsageOperations -from ._operations import Operations -from ._edge_nodes_operations import EdgeNodesOperations -from ._policies_operations import PoliciesOperations -from ._managed_rule_sets_operations import ManagedRuleSetsOperations +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._cdn_management_client_operations import _CdnManagementClientOperationsMixin # type: ignore # pylint: disable=unused-import +from ._afd_profiles_operations import AFDProfilesOperations # type: ignore +from ._afd_custom_domains_operations import AFDCustomDomainsOperations # type: ignore +from ._afd_endpoints_operations import AFDEndpointsOperations # type: ignore +from ._afd_origin_groups_operations import AFDOriginGroupsOperations # type: ignore +from ._afd_origins_operations import AFDOriginsOperations # type: ignore +from ._routes_operations import RoutesOperations # type: ignore +from ._rule_sets_operations import RuleSetsOperations # type: ignore +from ._rules_operations import RulesOperations # type: ignore +from ._security_policies_operations import SecurityPoliciesOperations # type: ignore +from ._secrets_operations import SecretsOperations # type: ignore +from ._log_analytics_operations import LogAnalyticsOperations # type: ignore +from ._profiles_operations import ProfilesOperations # type: ignore +from ._endpoints_operations import EndpointsOperations # type: ignore +from ._origins_operations import OriginsOperations # type: ignore +from ._origin_groups_operations import OriginGroupsOperations # type: ignore +from ._custom_domains_operations import CustomDomainsOperations # type: ignore +from ._resource_usage_operations import ResourceUsageOperations # type: ignore +from ._operations import Operations # type: ignore +from ._edge_nodes_operations import EdgeNodesOperations # type: ignore +from ._policies_operations import PoliciesOperations # type: ignore +from ._managed_rule_sets_operations import ManagedRuleSetsOperations # type: ignore from ._patch import __all__ as _patch_all -from ._patch import * # pylint: disable=unused-wildcard-import +from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "CdnManagementClientOperationsMixin", "AFDProfilesOperations", "AFDCustomDomainsOperations", "AFDEndpointsOperations", @@ -57,5 +63,5 @@ "PoliciesOperations", "ManagedRuleSetsOperations", ] -__all__.extend([p for p in _patch_all if p not in __all__]) +__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_afd_custom_domains_operations.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_afd_custom_domains_operations.py index 92e5deeb37d6..44a67a4a92b9 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_afd_custom_domains_operations.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_afd_custom_domains_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,11 +5,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -18,12 +18,13 @@ ResourceExistsError, ResourceNotFoundError, ResourceNotModifiedError, + StreamClosedError, + StreamConsumedError, map_error, ) from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import HttpRequest +from azure.core.rest import AsyncHttpResponse, HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.core.tracing.decorator_async import distributed_trace_async from azure.core.utils import case_insensitive_dict @@ -31,7 +32,7 @@ from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models -from ..._vendor import _convert_request +from ..._utils.serialization import Deserializer, Serializer from ...operations._afd_custom_domains_operations import ( build_create_request, build_delete_request, @@ -40,14 +41,11 @@ build_refresh_validation_token_request, build_update_request, ) -from .._vendor import CdnManagementClientMixinABC +from .._configuration import CdnManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class AFDCustomDomainsOperations: @@ -64,21 +62,22 @@ class AFDCustomDomainsOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CdnManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_profile( self, resource_group_name: str, profile_name: str, **kwargs: Any - ) -> AsyncIterable["_models.AFDDomain"]: + ) -> AsyncItemPaged["_models.AFDDomain"]: """Lists existing AzureFrontDoor domains. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :return: An iterator like instance of either AFDDomain or the result of cls(response) :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cdn.models.AFDDomain] @@ -90,7 +89,7 @@ def list_by_profile( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.AFDDomainListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -109,7 +108,6 @@ def prepare_request(next_link=None): headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) else: @@ -125,7 +123,6 @@ def prepare_request(next_link=None): _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _request.method = "GET" return _request @@ -148,7 +145,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -162,10 +162,11 @@ async def get( """Gets an existing AzureFrontDoor domain with the specified domain name under the specified subscription, resource group and profile. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param custom_domain_name: Name of the domain under the profile which is unique globally. Required. @@ -174,7 +175,7 @@ async def get( :rtype: ~azure.mgmt.cdn.models.AFDDomain :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -197,7 +198,6 @@ async def get( headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False @@ -209,10 +209,13 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("AFDDomain", pipeline_response) + deserialized = self._deserialize("AFDDomain", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -226,8 +229,8 @@ async def _create_initial( custom_domain_name: str, custom_domain: Union[_models.AFDDomain, IO[bytes]], **kwargs: Any - ) -> _models.AFDDomain: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -240,7 +243,7 @@ async def _create_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.AFDDomain] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -262,10 +265,10 @@ async def _create_initial( headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) @@ -273,21 +276,22 @@ async def _create_initial( response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("AFDDomain", pipeline_response) - if response.status_code == 201: response_headers["location"] = self._deserialize("str", response.headers.get("location")) - deserialized = self._deserialize("AFDDomain", pipeline_response) - - if response.status_code == 202: - deserialized = self._deserialize("AFDDomain", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore @@ -307,10 +311,11 @@ async def begin_create( ) -> AsyncLROPoller[_models.AFDDomain]: """Creates a new domain within the specified profile. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param custom_domain_name: Name of the domain under the profile which is unique globally. Required. @@ -339,10 +344,11 @@ async def begin_create( ) -> AsyncLROPoller[_models.AFDDomain]: """Creates a new domain within the specified profile. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param custom_domain_name: Name of the domain under the profile which is unique globally. Required. @@ -369,10 +375,11 @@ async def begin_create( ) -> AsyncLROPoller[_models.AFDDomain]: """Creates a new domain within the specified profile. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param custom_domain_name: Name of the domain under the profile which is unique globally. Required. @@ -407,10 +414,11 @@ async def begin_create( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("AFDDomain", pipeline_response) + deserialized = self._deserialize("AFDDomain", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized @@ -442,8 +450,8 @@ async def _update_initial( custom_domain_name: str, custom_domain_update_properties: Union[_models.AFDDomainUpdateParameters, IO[bytes]], **kwargs: Any - ) -> _models.AFDDomain: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -456,7 +464,7 @@ async def _update_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.AFDDomain] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -478,10 +486,10 @@ async def _update_initial( headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) @@ -489,18 +497,22 @@ async def _update_initial( response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("AFDDomain", pipeline_response) - if response.status_code == 202: response_headers["location"] = self._deserialize("str", response.headers.get("location")) - deserialized = self._deserialize("AFDDomain", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore @@ -520,10 +532,11 @@ async def begin_update( ) -> AsyncLROPoller[_models.AFDDomain]: """Updates an existing domain within a profile. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param custom_domain_name: Name of the domain under the profile which is unique globally. Required. @@ -552,10 +565,11 @@ async def begin_update( ) -> AsyncLROPoller[_models.AFDDomain]: """Updates an existing domain within a profile. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param custom_domain_name: Name of the domain under the profile which is unique globally. Required. @@ -582,10 +596,11 @@ async def begin_update( ) -> AsyncLROPoller[_models.AFDDomain]: """Updates an existing domain within a profile. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param custom_domain_name: Name of the domain under the profile which is unique globally. Required. @@ -621,10 +636,11 @@ async def begin_update( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("AFDDomain", pipeline_response) + deserialized = self._deserialize("AFDDomain", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized @@ -649,10 +665,10 @@ def get_long_running_output(pipeline_response): self._client, raw_result, get_long_running_output, polling_method # type: ignore ) - async def _delete_initial( # pylint: disable=inconsistent-return-statements + async def _delete_initial( self, resource_group_name: str, profile_name: str, custom_domain_name: str, **kwargs: Any - ) -> None: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -664,7 +680,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_delete_request( resource_group_name=resource_group_name, @@ -675,10 +691,10 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) @@ -686,16 +702,27 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} if response.status_code == 202: response_headers["location"] = self._deserialize("str", response.headers.get("location")) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + if cls: - return cls(pipeline_response, None, response_headers) # type: ignore + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore @distributed_trace_async async def begin_delete( @@ -704,10 +731,11 @@ async def begin_delete( """Deletes an existing AzureFrontDoor domain with the specified domain name under the specified subscription, resource group and profile. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param custom_domain_name: Name of the domain under the profile which is unique globally. Required. @@ -725,7 +753,7 @@ async def begin_delete( lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: - raw_result = await self._delete_initial( # type: ignore + raw_result = await self._delete_initial( resource_group_name=resource_group_name, profile_name=profile_name, custom_domain_name=custom_domain_name, @@ -735,6 +763,7 @@ async def begin_delete( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements @@ -759,10 +788,10 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- ) return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - async def _refresh_validation_token_initial( # pylint: disable=inconsistent-return-statements + async def _refresh_validation_token_initial( self, resource_group_name: str, profile_name: str, custom_domain_name: str, **kwargs: Any - ) -> None: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -774,7 +803,7 @@ async def _refresh_validation_token_initial( # pylint: disable=inconsistent-ret _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_refresh_validation_token_request( resource_group_name=resource_group_name, @@ -785,10 +814,10 @@ async def _refresh_validation_token_initial( # pylint: disable=inconsistent-ret headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) @@ -796,16 +825,27 @@ async def _refresh_validation_token_initial( # pylint: disable=inconsistent-ret response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} if response.status_code == 202: response_headers["location"] = self._deserialize("str", response.headers.get("location")) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + if cls: - return cls(pipeline_response, None, response_headers) # type: ignore + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore @distributed_trace_async async def begin_refresh_validation_token( @@ -813,10 +853,11 @@ async def begin_refresh_validation_token( ) -> AsyncLROPoller[None]: """Updates the domain validation token. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param custom_domain_name: Name of the domain under the profile which is unique globally. Required. @@ -834,7 +875,7 @@ async def begin_refresh_validation_token( lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: - raw_result = await self._refresh_validation_token_initial( # type: ignore + raw_result = await self._refresh_validation_token_initial( resource_group_name=resource_group_name, profile_name=profile_name, custom_domain_name=custom_domain_name, @@ -844,6 +885,7 @@ async def begin_refresh_validation_token( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_afd_endpoints_operations.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_afd_endpoints_operations.py index d9fde2ce9580..1ad4a4c5c7ed 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_afd_endpoints_operations.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_afd_endpoints_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,11 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -18,12 +19,13 @@ ResourceExistsError, ResourceNotFoundError, ResourceNotModifiedError, + StreamClosedError, + StreamConsumedError, map_error, ) from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import HttpRequest +from azure.core.rest import AsyncHttpResponse, HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.core.tracing.decorator_async import distributed_trace_async from azure.core.utils import case_insensitive_dict @@ -31,7 +33,7 @@ from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models -from ..._vendor import _convert_request +from ..._utils.serialization import Deserializer, Serializer from ...operations._afd_endpoints_operations import ( build_create_request, build_delete_request, @@ -42,14 +44,11 @@ build_update_request, build_validate_custom_domain_request, ) -from .._vendor import CdnManagementClientMixinABC +from .._configuration import CdnManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class AFDEndpointsOperations: @@ -66,21 +65,22 @@ class AFDEndpointsOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CdnManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_profile( self, resource_group_name: str, profile_name: str, **kwargs: Any - ) -> AsyncIterable["_models.AFDEndpoint"]: + ) -> AsyncItemPaged["_models.AFDEndpoint"]: """Lists existing AzureFrontDoor endpoints. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :return: An iterator like instance of either AFDEndpoint or the result of cls(response) :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cdn.models.AFDEndpoint] @@ -92,7 +92,7 @@ def list_by_profile( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.AFDEndpointListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -111,7 +111,6 @@ def prepare_request(next_link=None): headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) else: @@ -127,7 +126,6 @@ def prepare_request(next_link=None): _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _request.method = "GET" return _request @@ -150,7 +148,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -164,10 +165,11 @@ async def get( """Gets an existing AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, resource group and profile. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param endpoint_name: Name of the endpoint under the profile which is unique globally. Required. @@ -176,7 +178,7 @@ async def get( :rtype: ~azure.mgmt.cdn.models.AFDEndpoint :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -199,7 +201,6 @@ async def get( headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False @@ -211,10 +212,13 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("AFDEndpoint", pipeline_response) + deserialized = self._deserialize("AFDEndpoint", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -228,8 +232,8 @@ async def _create_initial( endpoint_name: str, endpoint: Union[_models.AFDEndpoint, IO[bytes]], **kwargs: Any - ) -> _models.AFDEndpoint: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -242,7 +246,7 @@ async def _create_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.AFDEndpoint] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -264,10 +268,10 @@ async def _create_initial( headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) @@ -275,21 +279,22 @@ async def _create_initial( response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("AFDEndpoint", pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize("AFDEndpoint", pipeline_response) - if response.status_code == 202: response_headers["location"] = self._deserialize("str", response.headers.get("location")) - deserialized = self._deserialize("AFDEndpoint", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore @@ -310,10 +315,11 @@ async def begin_create( """Creates a new AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, resource group and profile. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param endpoint_name: Name of the endpoint under the profile which is unique globally. Required. @@ -343,10 +349,11 @@ async def begin_create( """Creates a new AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, resource group and profile. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param endpoint_name: Name of the endpoint under the profile which is unique globally. Required. @@ -374,10 +381,11 @@ async def begin_create( """Creates a new AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, resource group and profile. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param endpoint_name: Name of the endpoint under the profile which is unique globally. Required. @@ -412,10 +420,11 @@ async def begin_create( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("AFDEndpoint", pipeline_response) + deserialized = self._deserialize("AFDEndpoint", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized @@ -447,8 +456,8 @@ async def _update_initial( endpoint_name: str, endpoint_update_properties: Union[_models.AFDEndpointUpdateParameters, IO[bytes]], **kwargs: Any - ) -> _models.AFDEndpoint: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -461,7 +470,7 @@ async def _update_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.AFDEndpoint] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -483,10 +492,10 @@ async def _update_initial( headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) @@ -494,18 +503,22 @@ async def _update_initial( response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("AFDEndpoint", pipeline_response) - if response.status_code == 202: response_headers["location"] = self._deserialize("str", response.headers.get("location")) - deserialized = self._deserialize("AFDEndpoint", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore @@ -528,10 +541,11 @@ async def begin_update( endpoint. To update origins, use the Update Origin operation. To update origin groups, use the Update Origin group operation. To update domains, use the Update Custom Domain operation. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param endpoint_name: Name of the endpoint under the profile which is unique globally. Required. @@ -563,10 +577,11 @@ async def begin_update( endpoint. To update origins, use the Update Origin operation. To update origin groups, use the Update Origin group operation. To update domains, use the Update Custom Domain operation. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param endpoint_name: Name of the endpoint under the profile which is unique globally. Required. @@ -596,10 +611,11 @@ async def begin_update( endpoint. To update origins, use the Update Origin operation. To update origin groups, use the Update Origin group operation. To update domains, use the Update Custom Domain operation. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param endpoint_name: Name of the endpoint under the profile which is unique globally. Required. @@ -635,10 +651,11 @@ async def begin_update( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("AFDEndpoint", pipeline_response) + deserialized = self._deserialize("AFDEndpoint", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized @@ -663,10 +680,10 @@ def get_long_running_output(pipeline_response): self._client, raw_result, get_long_running_output, polling_method # type: ignore ) - async def _delete_initial( # pylint: disable=inconsistent-return-statements + async def _delete_initial( self, resource_group_name: str, profile_name: str, endpoint_name: str, **kwargs: Any - ) -> None: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -678,7 +695,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_delete_request( resource_group_name=resource_group_name, @@ -689,10 +706,10 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) @@ -700,16 +717,27 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} if response.status_code == 202: response_headers["location"] = self._deserialize("str", response.headers.get("location")) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + if cls: - return cls(pipeline_response, None, response_headers) # type: ignore + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore @distributed_trace_async async def begin_delete( @@ -718,10 +746,11 @@ async def begin_delete( """Deletes an existing AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, resource group and profile. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param endpoint_name: Name of the endpoint under the profile which is unique globally. Required. @@ -739,7 +768,7 @@ async def begin_delete( lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: - raw_result = await self._delete_initial( # type: ignore + raw_result = await self._delete_initial( resource_group_name=resource_group_name, profile_name=profile_name, endpoint_name=endpoint_name, @@ -749,6 +778,7 @@ async def begin_delete( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements @@ -773,15 +803,15 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- ) return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - async def _purge_content_initial( # pylint: disable=inconsistent-return-statements + async def _purge_content_initial( self, resource_group_name: str, profile_name: str, endpoint_name: str, contents: Union[_models.AfdPurgeParameters, IO[bytes]], **kwargs: Any - ) -> None: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -794,7 +824,7 @@ async def _purge_content_initial( # pylint: disable=inconsistent-return-stateme api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[None] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -816,10 +846,10 @@ async def _purge_content_initial( # pylint: disable=inconsistent-return-stateme headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) @@ -827,16 +857,27 @@ async def _purge_content_initial( # pylint: disable=inconsistent-return-stateme response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} if response.status_code == 202: response_headers["location"] = self._deserialize("str", response.headers.get("location")) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + if cls: - return cls(pipeline_response, None, response_headers) # type: ignore + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore @overload async def begin_purge_content( @@ -851,10 +892,11 @@ async def begin_purge_content( ) -> AsyncLROPoller[None]: """Removes a content from AzureFrontDoor. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param endpoint_name: Name of the endpoint under the profile which is unique globally. Required. @@ -885,10 +927,11 @@ async def begin_purge_content( ) -> AsyncLROPoller[None]: """Removes a content from AzureFrontDoor. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param endpoint_name: Name of the endpoint under the profile which is unique globally. Required. @@ -917,10 +960,11 @@ async def begin_purge_content( ) -> AsyncLROPoller[None]: """Removes a content from AzureFrontDoor. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param endpoint_name: Name of the endpoint under the profile which is unique globally. Required. @@ -944,7 +988,7 @@ async def begin_purge_content( lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: - raw_result = await self._purge_content_initial( # type: ignore + raw_result = await self._purge_content_initial( resource_group_name=resource_group_name, profile_name=profile_name, endpoint_name=endpoint_name, @@ -956,6 +1000,7 @@ async def begin_purge_content( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements @@ -983,13 +1028,14 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- @distributed_trace def list_resource_usage( self, resource_group_name: str, profile_name: str, endpoint_name: str, **kwargs: Any - ) -> AsyncIterable["_models.Usage"]: + ) -> AsyncItemPaged["_models.Usage"]: """Checks the quota and actual usage of endpoints under the given Azure Front Door profile. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param endpoint_name: Name of the endpoint under the profile which is unique globally. Required. @@ -1004,7 +1050,7 @@ def list_resource_usage( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.UsagesListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1024,7 +1070,6 @@ def prepare_request(next_link=None): headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) else: @@ -1040,7 +1085,6 @@ def prepare_request(next_link=None): _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _request.method = "GET" return _request @@ -1063,7 +1107,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -1084,10 +1131,11 @@ async def validate_custom_domain( """Validates the custom domain mapping to ensure it maps to the correct Azure Front Door endpoint in DNS. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param endpoint_name: Name of the endpoint under the profile which is unique globally. Required. @@ -1116,10 +1164,11 @@ async def validate_custom_domain( """Validates the custom domain mapping to ensure it maps to the correct Azure Front Door endpoint in DNS. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param endpoint_name: Name of the endpoint under the profile which is unique globally. Required. @@ -1146,10 +1195,11 @@ async def validate_custom_domain( """Validates the custom domain mapping to ensure it maps to the correct Azure Front Door endpoint in DNS. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param endpoint_name: Name of the endpoint under the profile which is unique globally. Required. @@ -1161,7 +1211,7 @@ async def validate_custom_domain( :rtype: ~azure.mgmt.cdn.models.ValidateCustomDomainOutput :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1196,7 +1246,6 @@ async def validate_custom_domain( headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False @@ -1208,10 +1257,13 @@ async def validate_custom_domain( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("ValidateCustomDomainOutput", pipeline_response) + deserialized = self._deserialize("ValidateCustomDomainOutput", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_afd_origin_groups_operations.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_afd_origin_groups_operations.py index c40286f25555..4bb2b6d41ec5 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_afd_origin_groups_operations.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_afd_origin_groups_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,11 +5,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -18,12 +18,13 @@ ResourceExistsError, ResourceNotFoundError, ResourceNotModifiedError, + StreamClosedError, + StreamConsumedError, map_error, ) from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import HttpRequest +from azure.core.rest import AsyncHttpResponse, HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.core.tracing.decorator_async import distributed_trace_async from azure.core.utils import case_insensitive_dict @@ -31,7 +32,7 @@ from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models -from ..._vendor import _convert_request +from ..._utils.serialization import Deserializer, Serializer from ...operations._afd_origin_groups_operations import ( build_create_request, build_delete_request, @@ -40,14 +41,11 @@ build_list_resource_usage_request, build_update_request, ) -from .._vendor import CdnManagementClientMixinABC +from .._configuration import CdnManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class AFDOriginGroupsOperations: @@ -64,21 +62,22 @@ class AFDOriginGroupsOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CdnManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_profile( self, resource_group_name: str, profile_name: str, **kwargs: Any - ) -> AsyncIterable["_models.AFDOriginGroup"]: + ) -> AsyncItemPaged["_models.AFDOriginGroup"]: """Lists all of the existing origin groups within a profile. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :return: An iterator like instance of either AFDOriginGroup or the result of cls(response) :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cdn.models.AFDOriginGroup] @@ -90,7 +89,7 @@ def list_by_profile( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.AFDOriginGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -109,7 +108,6 @@ def prepare_request(next_link=None): headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) else: @@ -125,7 +123,6 @@ def prepare_request(next_link=None): _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _request.method = "GET" return _request @@ -148,7 +145,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -161,10 +161,11 @@ async def get( ) -> _models.AFDOriginGroup: """Gets an existing origin group within a profile. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param origin_group_name: Name of the origin group which is unique within the endpoint. Required. @@ -173,7 +174,7 @@ async def get( :rtype: ~azure.mgmt.cdn.models.AFDOriginGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -196,7 +197,6 @@ async def get( headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False @@ -208,10 +208,13 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("AFDOriginGroup", pipeline_response) + deserialized = self._deserialize("AFDOriginGroup", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -225,8 +228,8 @@ async def _create_initial( origin_group_name: str, origin_group: Union[_models.AFDOriginGroup, IO[bytes]], **kwargs: Any - ) -> _models.AFDOriginGroup: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -239,7 +242,7 @@ async def _create_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.AFDOriginGroup] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -261,10 +264,10 @@ async def _create_initial( headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) @@ -272,21 +275,22 @@ async def _create_initial( response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("AFDOriginGroup", pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize("AFDOriginGroup", pipeline_response) - if response.status_code == 202: response_headers["location"] = self._deserialize("str", response.headers.get("location")) - deserialized = self._deserialize("AFDOriginGroup", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore @@ -306,10 +310,11 @@ async def begin_create( ) -> AsyncLROPoller[_models.AFDOriginGroup]: """Creates a new origin group within the specified profile. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param origin_group_name: Name of the origin group which is unique within the endpoint. Required. @@ -338,10 +343,11 @@ async def begin_create( ) -> AsyncLROPoller[_models.AFDOriginGroup]: """Creates a new origin group within the specified profile. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param origin_group_name: Name of the origin group which is unique within the endpoint. Required. @@ -368,10 +374,11 @@ async def begin_create( ) -> AsyncLROPoller[_models.AFDOriginGroup]: """Creates a new origin group within the specified profile. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param origin_group_name: Name of the origin group which is unique within the endpoint. Required. @@ -406,10 +413,11 @@ async def begin_create( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("AFDOriginGroup", pipeline_response) + deserialized = self._deserialize("AFDOriginGroup", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized @@ -441,8 +449,8 @@ async def _update_initial( origin_group_name: str, origin_group_update_properties: Union[_models.AFDOriginGroupUpdateParameters, IO[bytes]], **kwargs: Any - ) -> _models.AFDOriginGroup: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -455,7 +463,7 @@ async def _update_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.AFDOriginGroup] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -477,10 +485,10 @@ async def _update_initial( headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) @@ -488,18 +496,22 @@ async def _update_initial( response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("AFDOriginGroup", pipeline_response) - if response.status_code == 202: response_headers["location"] = self._deserialize("str", response.headers.get("location")) - deserialized = self._deserialize("AFDOriginGroup", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore @@ -519,10 +531,11 @@ async def begin_update( ) -> AsyncLROPoller[_models.AFDOriginGroup]: """Updates an existing origin group within a profile. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param origin_group_name: Name of the origin group which is unique within the profile. Required. @@ -551,10 +564,11 @@ async def begin_update( ) -> AsyncLROPoller[_models.AFDOriginGroup]: """Updates an existing origin group within a profile. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param origin_group_name: Name of the origin group which is unique within the profile. Required. @@ -581,10 +595,11 @@ async def begin_update( ) -> AsyncLROPoller[_models.AFDOriginGroup]: """Updates an existing origin group within a profile. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param origin_group_name: Name of the origin group which is unique within the profile. Required. @@ -620,10 +635,11 @@ async def begin_update( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("AFDOriginGroup", pipeline_response) + deserialized = self._deserialize("AFDOriginGroup", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized @@ -648,10 +664,10 @@ def get_long_running_output(pipeline_response): self._client, raw_result, get_long_running_output, polling_method # type: ignore ) - async def _delete_initial( # pylint: disable=inconsistent-return-statements + async def _delete_initial( self, resource_group_name: str, profile_name: str, origin_group_name: str, **kwargs: Any - ) -> None: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -663,7 +679,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_delete_request( resource_group_name=resource_group_name, @@ -674,10 +690,10 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) @@ -685,16 +701,27 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} if response.status_code == 202: response_headers["location"] = self._deserialize("str", response.headers.get("location")) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + if cls: - return cls(pipeline_response, None, response_headers) # type: ignore + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore @distributed_trace_async async def begin_delete( @@ -702,10 +729,11 @@ async def begin_delete( ) -> AsyncLROPoller[None]: """Deletes an existing origin group within a profile. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param origin_group_name: Name of the origin group which is unique within the profile. Required. @@ -723,7 +751,7 @@ async def begin_delete( lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: - raw_result = await self._delete_initial( # type: ignore + raw_result = await self._delete_initial( resource_group_name=resource_group_name, profile_name=profile_name, origin_group_name=origin_group_name, @@ -733,6 +761,7 @@ async def begin_delete( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements @@ -760,13 +789,14 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- @distributed_trace def list_resource_usage( self, resource_group_name: str, profile_name: str, origin_group_name: str, **kwargs: Any - ) -> AsyncIterable["_models.Usage"]: + ) -> AsyncItemPaged["_models.Usage"]: """Checks the quota and actual usage of endpoints under the given Azure Front Door profile.. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param origin_group_name: Name of the origin group which is unique within the endpoint. Required. @@ -781,7 +811,7 @@ def list_resource_usage( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.UsagesListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -801,7 +831,6 @@ def prepare_request(next_link=None): headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) else: @@ -817,7 +846,6 @@ def prepare_request(next_link=None): _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _request.method = "GET" return _request @@ -840,7 +868,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_afd_origins_operations.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_afd_origins_operations.py index 49f79d669942..36a29d94b474 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_afd_origins_operations.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_afd_origins_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,11 +5,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -18,12 +18,13 @@ ResourceExistsError, ResourceNotFoundError, ResourceNotModifiedError, + StreamClosedError, + StreamConsumedError, map_error, ) from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import HttpRequest +from azure.core.rest import AsyncHttpResponse, HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.core.tracing.decorator_async import distributed_trace_async from azure.core.utils import case_insensitive_dict @@ -31,7 +32,7 @@ from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models -from ..._vendor import _convert_request +from ..._utils.serialization import Deserializer, Serializer from ...operations._afd_origins_operations import ( build_create_request, build_delete_request, @@ -39,14 +40,11 @@ build_list_by_origin_group_request, build_update_request, ) -from .._vendor import CdnManagementClientMixinABC +from .._configuration import CdnManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class AFDOriginsOperations: @@ -63,21 +61,22 @@ class AFDOriginsOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CdnManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_origin_group( self, resource_group_name: str, profile_name: str, origin_group_name: str, **kwargs: Any - ) -> AsyncIterable["_models.AFDOrigin"]: + ) -> AsyncItemPaged["_models.AFDOrigin"]: """Lists all of the existing origins within an origin group. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param origin_group_name: Name of the origin group which is unique within the profile. Required. @@ -92,7 +91,7 @@ def list_by_origin_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.AFDOriginListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -112,7 +111,6 @@ def prepare_request(next_link=None): headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) else: @@ -128,7 +126,6 @@ def prepare_request(next_link=None): _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _request.method = "GET" return _request @@ -151,7 +148,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -164,10 +164,11 @@ async def get( ) -> _models.AFDOrigin: """Gets an existing origin within an origin group. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param origin_group_name: Name of the origin group which is unique within the profile. Required. @@ -178,7 +179,7 @@ async def get( :rtype: ~azure.mgmt.cdn.models.AFDOrigin :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -202,7 +203,6 @@ async def get( headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False @@ -214,10 +214,13 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("AFDOrigin", pipeline_response) + deserialized = self._deserialize("AFDOrigin", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -232,8 +235,8 @@ async def _create_initial( origin_name: str, origin: Union[_models.AFDOrigin, IO[bytes]], **kwargs: Any - ) -> _models.AFDOrigin: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -246,7 +249,7 @@ async def _create_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.AFDOrigin] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -269,10 +272,10 @@ async def _create_initial( headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) @@ -280,21 +283,22 @@ async def _create_initial( response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("AFDOrigin", pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize("AFDOrigin", pipeline_response) - if response.status_code == 202: response_headers["location"] = self._deserialize("str", response.headers.get("location")) - deserialized = self._deserialize("AFDOrigin", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore @@ -315,10 +319,11 @@ async def begin_create( ) -> AsyncLROPoller[_models.AFDOrigin]: """Creates a new origin within the specified origin group. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param origin_group_name: Name of the origin group which is unique within the profile. Required. @@ -350,10 +355,11 @@ async def begin_create( ) -> AsyncLROPoller[_models.AFDOrigin]: """Creates a new origin within the specified origin group. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param origin_group_name: Name of the origin group which is unique within the profile. Required. @@ -383,10 +389,11 @@ async def begin_create( ) -> AsyncLROPoller[_models.AFDOrigin]: """Creates a new origin within the specified origin group. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param origin_group_name: Name of the origin group which is unique within the profile. Required. @@ -423,10 +430,11 @@ async def begin_create( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("AFDOrigin", pipeline_response) + deserialized = self._deserialize("AFDOrigin", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized @@ -459,8 +467,8 @@ async def _update_initial( origin_name: str, origin_update_properties: Union[_models.AFDOriginUpdateParameters, IO[bytes]], **kwargs: Any - ) -> _models.AFDOrigin: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -473,7 +481,7 @@ async def _update_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.AFDOrigin] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -496,10 +504,10 @@ async def _update_initial( headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) @@ -507,18 +515,22 @@ async def _update_initial( response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("AFDOrigin", pipeline_response) - if response.status_code == 202: response_headers["location"] = self._deserialize("str", response.headers.get("location")) - deserialized = self._deserialize("AFDOrigin", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore @@ -539,10 +551,11 @@ async def begin_update( ) -> AsyncLROPoller[_models.AFDOrigin]: """Updates an existing origin within an origin group. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param origin_group_name: Name of the origin group which is unique within the profile. Required. @@ -574,10 +587,11 @@ async def begin_update( ) -> AsyncLROPoller[_models.AFDOrigin]: """Updates an existing origin within an origin group. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param origin_group_name: Name of the origin group which is unique within the profile. Required. @@ -607,10 +621,11 @@ async def begin_update( ) -> AsyncLROPoller[_models.AFDOrigin]: """Updates an existing origin within an origin group. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param origin_group_name: Name of the origin group which is unique within the profile. Required. @@ -648,10 +663,11 @@ async def begin_update( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("AFDOrigin", pipeline_response) + deserialized = self._deserialize("AFDOrigin", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized @@ -676,10 +692,10 @@ def get_long_running_output(pipeline_response): self._client, raw_result, get_long_running_output, polling_method # type: ignore ) - async def _delete_initial( # pylint: disable=inconsistent-return-statements + async def _delete_initial( self, resource_group_name: str, profile_name: str, origin_group_name: str, origin_name: str, **kwargs: Any - ) -> None: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -691,7 +707,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_delete_request( resource_group_name=resource_group_name, @@ -703,10 +719,10 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) @@ -714,16 +730,27 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} if response.status_code == 202: response_headers["location"] = self._deserialize("str", response.headers.get("location")) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + if cls: - return cls(pipeline_response, None, response_headers) # type: ignore + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore @distributed_trace_async async def begin_delete( @@ -731,10 +758,11 @@ async def begin_delete( ) -> AsyncLROPoller[None]: """Deletes an existing origin within an origin group. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param origin_group_name: Name of the origin group which is unique within the profile. Required. @@ -754,7 +782,7 @@ async def begin_delete( lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: - raw_result = await self._delete_initial( # type: ignore + raw_result = await self._delete_initial( resource_group_name=resource_group_name, profile_name=profile_name, origin_group_name=origin_group_name, @@ -765,6 +793,7 @@ async def begin_delete( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_afd_profiles_operations.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_afd_profiles_operations.py index 169e0eca6ed8..922c6a11625b 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_afd_profiles_operations.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_afd_profiles_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,11 +5,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -18,12 +18,13 @@ ResourceExistsError, ResourceNotFoundError, ResourceNotModifiedError, + StreamClosedError, + StreamConsumedError, map_error, ) from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import HttpRequest +from azure.core.rest import AsyncHttpResponse, HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.core.tracing.decorator_async import distributed_trace_async from azure.core.utils import case_insensitive_dict @@ -31,7 +32,7 @@ from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models -from ..._vendor import _convert_request +from ..._utils.serialization import Deserializer, Serializer from ...operations._afd_profiles_operations import ( build_check_endpoint_name_availability_request, build_check_host_name_availability_request, @@ -39,14 +40,11 @@ build_upgrade_request, build_validate_secret_request, ) -from .._vendor import CdnManagementClientMixinABC +from .._configuration import CdnManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class AFDProfilesOperations: @@ -63,10 +61,10 @@ class AFDProfilesOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CdnManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @overload async def check_endpoint_name_availability( @@ -81,7 +79,8 @@ async def check_endpoint_name_availability( """Check the availability of an afdx endpoint name, and return the globally unique endpoint host name. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. Required. @@ -110,7 +109,8 @@ async def check_endpoint_name_availability( """Check the availability of an afdx endpoint name, and return the globally unique endpoint host name. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. Required. @@ -136,7 +136,8 @@ async def check_endpoint_name_availability( """Check the availability of an afdx endpoint name, and return the globally unique endpoint host name. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. Required. @@ -149,7 +150,7 @@ async def check_endpoint_name_availability( :rtype: ~azure.mgmt.cdn.models.CheckEndpointNameAvailabilityOutput :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -183,7 +184,6 @@ async def check_endpoint_name_availability( headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False @@ -195,10 +195,13 @@ async def check_endpoint_name_availability( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("CheckEndpointNameAvailabilityOutput", pipeline_response) + deserialized = self._deserialize("CheckEndpointNameAvailabilityOutput", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -208,13 +211,14 @@ async def check_endpoint_name_availability( @distributed_trace def list_resource_usage( self, resource_group_name: str, profile_name: str, **kwargs: Any - ) -> AsyncIterable["_models.Usage"]: + ) -> AsyncItemPaged["_models.Usage"]: """Checks the quota and actual usage of endpoints under the given Azure Front Door profile. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :return: An iterator like instance of either Usage or the result of cls(response) :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cdn.models.Usage] @@ -226,7 +230,7 @@ def list_resource_usage( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.UsagesListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -245,7 +249,6 @@ def prepare_request(next_link=None): headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) else: @@ -261,7 +264,6 @@ def prepare_request(next_link=None): _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _request.method = "GET" return _request @@ -284,7 +286,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -304,10 +309,11 @@ async def check_host_name_availability( """Validates the custom domain mapping to ensure it maps to the correct Azure Front Door endpoint in DNS. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param check_host_name_availability_input: Custom domain to be validated. Required. :type check_host_name_availability_input: ~azure.mgmt.cdn.models.CheckHostNameAvailabilityInput @@ -332,10 +338,11 @@ async def check_host_name_availability( """Validates the custom domain mapping to ensure it maps to the correct Azure Front Door endpoint in DNS. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param check_host_name_availability_input: Custom domain to be validated. Required. :type check_host_name_availability_input: IO[bytes] @@ -358,10 +365,11 @@ async def check_host_name_availability( """Validates the custom domain mapping to ensure it maps to the correct Azure Front Door endpoint in DNS. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param check_host_name_availability_input: Custom domain to be validated. Is either a CheckHostNameAvailabilityInput type or a IO[bytes] type. Required. @@ -371,7 +379,7 @@ async def check_host_name_availability( :rtype: ~azure.mgmt.cdn.models.CheckNameAvailabilityOutput :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -405,7 +413,6 @@ async def check_host_name_availability( headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False @@ -417,10 +424,13 @@ async def check_host_name_availability( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("CheckNameAvailabilityOutput", pipeline_response) + deserialized = self._deserialize("CheckNameAvailabilityOutput", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -439,7 +449,8 @@ async def validate_secret( ) -> _models.ValidateSecretOutput: """Validate a Secret in the profile. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. Required. @@ -466,7 +477,8 @@ async def validate_secret( ) -> _models.ValidateSecretOutput: """Validate a Secret in the profile. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. Required. @@ -491,7 +503,8 @@ async def validate_secret( ) -> _models.ValidateSecretOutput: """Validate a Secret in the profile. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. Required. @@ -503,7 +516,7 @@ async def validate_secret( :rtype: ~azure.mgmt.cdn.models.ValidateSecretOutput :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -537,7 +550,6 @@ async def validate_secret( headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False @@ -549,10 +561,13 @@ async def validate_secret( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("ValidateSecretOutput", pipeline_response) + deserialized = self._deserialize("ValidateSecretOutput", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -565,8 +580,8 @@ async def _upgrade_initial( profile_name: str, profile_upgrade_parameters: Union[_models.ProfileUpgradeParameters, IO[bytes]], **kwargs: Any - ) -> _models.Profile: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -579,7 +594,7 @@ async def _upgrade_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.Profile] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -600,10 +615,10 @@ async def _upgrade_initial( headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) @@ -611,18 +626,22 @@ async def _upgrade_initial( response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("Profile", pipeline_response) - if response.status_code == 202: response_headers["location"] = self._deserialize("str", response.headers.get("location")) - deserialized = self._deserialize("Profile", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore @@ -641,7 +660,8 @@ async def begin_upgrade( ) -> AsyncLROPoller[_models.Profile]: """Upgrade a profile from Standard_AzureFrontDoor to Premium_AzureFrontDoor. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. Required. @@ -669,7 +689,8 @@ async def begin_upgrade( ) -> AsyncLROPoller[_models.Profile]: """Upgrade a profile from Standard_AzureFrontDoor to Premium_AzureFrontDoor. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. Required. @@ -695,7 +716,8 @@ async def begin_upgrade( ) -> AsyncLROPoller[_models.Profile]: """Upgrade a profile from Standard_AzureFrontDoor to Premium_AzureFrontDoor. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. Required. @@ -729,10 +751,11 @@ async def begin_upgrade( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("Profile", pipeline_response) + deserialized = self._deserialize("Profile", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_cdn_management_client_operations.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_cdn_management_client_operations.py index adef934cf76f..e6785e5628e2 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_cdn_management_client_operations.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_cdn_management_client_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,10 +6,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload +from azure.core import AsyncPipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -19,31 +20,29 @@ map_error, ) from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse -from azure.core.rest import HttpRequest +from azure.core.rest import AsyncHttpResponse, HttpRequest from azure.core.tracing.decorator_async import distributed_trace_async from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models -from ..._vendor import _convert_request +from ..._utils.utils import ClientMixinABC from ...operations._cdn_management_client_operations import ( build_check_endpoint_name_availability_request, build_check_name_availability_request, build_check_name_availability_with_subscription_request, build_validate_probe_request, ) -from .._vendor import CdnManagementClientMixinABC +from .._configuration import CdnManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list -class CdnManagementClientOperationsMixin(CdnManagementClientMixinABC): +class _CdnManagementClientOperationsMixin( + ClientMixinABC[AsyncPipelineClient[HttpRequest, AsyncHttpResponse], CdnManagementClientConfiguration] +): @overload async def check_endpoint_name_availability( @@ -57,7 +56,8 @@ async def check_endpoint_name_availability( """Check the availability of a resource name. This is needed for resources where name is globally unique, such as a afdx endpoint. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param check_endpoint_name_availability_input: Input to check. Required. :type check_endpoint_name_availability_input: @@ -82,7 +82,8 @@ async def check_endpoint_name_availability( """Check the availability of a resource name. This is needed for resources where name is globally unique, such as a afdx endpoint. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param check_endpoint_name_availability_input: Input to check. Required. :type check_endpoint_name_availability_input: IO[bytes] @@ -104,7 +105,8 @@ async def check_endpoint_name_availability( """Check the availability of a resource name. This is needed for resources where name is globally unique, such as a afdx endpoint. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param check_endpoint_name_availability_input: Input to check. Is either a CheckEndpointNameAvailabilityInput type or a IO[bytes] type. Required. @@ -114,7 +116,7 @@ async def check_endpoint_name_availability( :rtype: ~azure.mgmt.cdn.models.CheckEndpointNameAvailabilityOutput :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -147,7 +149,6 @@ async def check_endpoint_name_availability( headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False @@ -159,10 +160,13 @@ async def check_endpoint_name_availability( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("CheckEndpointNameAvailabilityOutput", pipeline_response) + deserialized = self._deserialize("CheckEndpointNameAvailabilityOutput", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -222,7 +226,7 @@ async def check_name_availability( :rtype: ~azure.mgmt.cdn.models.CheckNameAvailabilityOutput :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -253,7 +257,6 @@ async def check_name_availability( headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False @@ -265,10 +268,13 @@ async def check_name_availability( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("CheckNameAvailabilityOutput", pipeline_response) + deserialized = self._deserialize("CheckNameAvailabilityOutput", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -328,7 +334,7 @@ async def check_name_availability_with_subscription( # pylint: disable=name-too :rtype: ~azure.mgmt.cdn.models.CheckNameAvailabilityOutput :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -360,7 +366,6 @@ async def check_name_availability_with_subscription( # pylint: disable=name-too headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False @@ -372,10 +377,13 @@ async def check_name_availability_with_subscription( # pylint: disable=name-too if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("CheckNameAvailabilityOutput", pipeline_response) + deserialized = self._deserialize("CheckNameAvailabilityOutput", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -433,7 +441,7 @@ async def validate_probe( :rtype: ~azure.mgmt.cdn.models.ValidateProbeOutput :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -465,7 +473,6 @@ async def validate_probe( headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False @@ -477,10 +484,13 @@ async def validate_probe( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("ValidateProbeOutput", pipeline_response) + deserialized = self._deserialize("ValidateProbeOutput", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_custom_domains_operations.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_custom_domains_operations.py index 52a4b04d3882..ba14159eef78 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_custom_domains_operations.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_custom_domains_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,11 +5,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -18,12 +18,13 @@ ResourceExistsError, ResourceNotFoundError, ResourceNotModifiedError, + StreamClosedError, + StreamConsumedError, map_error, ) from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import HttpRequest +from azure.core.rest import AsyncHttpResponse, HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.core.tracing.decorator_async import distributed_trace_async from azure.core.utils import case_insensitive_dict @@ -31,7 +32,7 @@ from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models -from ..._vendor import _convert_request +from ..._utils.serialization import Deserializer, Serializer from ...operations._custom_domains_operations import ( build_create_request, build_delete_request, @@ -40,14 +41,11 @@ build_get_request, build_list_by_endpoint_request, ) -from .._vendor import CdnManagementClientMixinABC +from .._configuration import CdnManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class CustomDomainsOperations: @@ -64,18 +62,19 @@ class CustomDomainsOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CdnManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_endpoint( self, resource_group_name: str, profile_name: str, endpoint_name: str, **kwargs: Any - ) -> AsyncIterable["_models.CustomDomain"]: + ) -> AsyncItemPaged["_models.CustomDomain"]: """Lists all of the existing custom domains within an endpoint. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the CDN profile which is unique within the resource group. Required. @@ -93,7 +92,7 @@ def list_by_endpoint( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.CustomDomainListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -113,7 +112,6 @@ def prepare_request(next_link=None): headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) else: @@ -129,7 +127,6 @@ def prepare_request(next_link=None): _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _request.method = "GET" return _request @@ -152,7 +149,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -165,7 +165,8 @@ async def get( ) -> _models.CustomDomain: """Gets an existing custom domain within an endpoint. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the CDN profile which is unique within the resource group. Required. @@ -179,7 +180,7 @@ async def get( :rtype: ~azure.mgmt.cdn.models.CustomDomain :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -203,7 +204,6 @@ async def get( headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False @@ -215,10 +215,13 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("CustomDomain", pipeline_response) + deserialized = self._deserialize("CustomDomain", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -233,8 +236,8 @@ async def _create_initial( custom_domain_name: str, custom_domain_properties: Union[_models.CustomDomainParameters, IO[bytes]], **kwargs: Any - ) -> _models.CustomDomain: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -247,7 +250,7 @@ async def _create_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CustomDomain] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -270,10 +273,10 @@ async def _create_initial( headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) @@ -281,21 +284,22 @@ async def _create_initial( response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("CustomDomain", pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize("CustomDomain", pipeline_response) - if response.status_code == 202: response_headers["location"] = self._deserialize("str", response.headers.get("location")) - deserialized = self._deserialize("CustomDomain", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore @@ -316,7 +320,8 @@ async def begin_create( ) -> AsyncLROPoller[_models.CustomDomain]: """Creates a new custom domain within an endpoint. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the CDN profile which is unique within the resource group. Required. @@ -351,7 +356,8 @@ async def begin_create( ) -> AsyncLROPoller[_models.CustomDomain]: """Creates a new custom domain within an endpoint. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the CDN profile which is unique within the resource group. Required. @@ -384,7 +390,8 @@ async def begin_create( ) -> AsyncLROPoller[_models.CustomDomain]: """Creates a new custom domain within an endpoint. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the CDN profile which is unique within the resource group. Required. @@ -425,10 +432,11 @@ async def begin_create( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CustomDomain", pipeline_response) + deserialized = self._deserialize("CustomDomain", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized @@ -452,8 +460,8 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, profile_name: str, endpoint_name: str, custom_domain_name: str, **kwargs: Any - ) -> Optional[_models.CustomDomain]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -465,7 +473,7 @@ async def _delete_initial( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Optional[_models.CustomDomain]] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_delete_request( resource_group_name=resource_group_name, @@ -477,10 +485,10 @@ async def _delete_initial( headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) @@ -488,16 +496,22 @@ async def _delete_initial( response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = None response_headers = {} if response.status_code == 202: response_headers["location"] = self._deserialize("str", response.headers.get("location")) - deserialized = self._deserialize("CustomDomain", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore @@ -510,7 +524,8 @@ async def begin_delete( ) -> AsyncLROPoller[_models.CustomDomain]: """Deletes an existing custom domain within an endpoint. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the CDN profile which is unique within the resource group. Required. @@ -545,6 +560,7 @@ async def begin_delete( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): @@ -552,7 +568,7 @@ def get_long_running_output(pipeline_response): response = pipeline_response.http_response response_headers["location"] = self._deserialize("str", response.headers.get("location")) - deserialized = self._deserialize("CustomDomain", pipeline_response) + deserialized = self._deserialize("CustomDomain", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized @@ -576,8 +592,8 @@ def get_long_running_output(pipeline_response): async def _disable_custom_https_initial( self, resource_group_name: str, profile_name: str, endpoint_name: str, custom_domain_name: str, **kwargs: Any - ) -> _models.CustomDomain: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -589,7 +605,7 @@ async def _disable_custom_https_initial( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.CustomDomain] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_disable_custom_https_request( resource_group_name=resource_group_name, @@ -601,10 +617,10 @@ async def _disable_custom_https_initial( headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) @@ -612,18 +628,22 @@ async def _disable_custom_https_initial( response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("CustomDomain", pipeline_response) - if response.status_code == 202: response_headers["location"] = self._deserialize("str", response.headers.get("location")) - deserialized = self._deserialize("CustomDomain", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore @@ -636,7 +656,8 @@ async def begin_disable_custom_https( ) -> AsyncLROPoller[_models.CustomDomain]: """Disable https delivery of the custom domain. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the CDN profile which is unique within the resource group. Required. @@ -671,10 +692,11 @@ async def begin_disable_custom_https( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CustomDomain", pipeline_response) + deserialized = self._deserialize("CustomDomain", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized @@ -704,8 +726,8 @@ async def _enable_custom_https_initial( custom_domain_name: str, custom_domain_https_parameters: Optional[Union[_models.CustomDomainHttpsParameters, IO[bytes]]] = None, **kwargs: Any - ) -> _models.CustomDomain: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -718,9 +740,10 @@ async def _enable_custom_https_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CustomDomain] = kwargs.pop("cls", None) + content_type = content_type if custom_domain_https_parameters else None + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - content_type = content_type or "application/json" + content_type = content_type or "application/json" if custom_domain_https_parameters else None _json = None _content = None if isinstance(custom_domain_https_parameters, (IOBase, bytes)): @@ -744,10 +767,10 @@ async def _enable_custom_https_initial( headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) @@ -755,18 +778,22 @@ async def _enable_custom_https_initial( response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("CustomDomain", pipeline_response) - if response.status_code == 202: response_headers["location"] = self._deserialize("str", response.headers.get("location")) - deserialized = self._deserialize("CustomDomain", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore @@ -787,7 +814,8 @@ async def begin_enable_custom_https( ) -> AsyncLROPoller[_models.CustomDomain]: """Enable https delivery of the custom domain. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the CDN profile which is unique within the resource group. Required. @@ -824,7 +852,8 @@ async def begin_enable_custom_https( ) -> AsyncLROPoller[_models.CustomDomain]: """Enable https delivery of the custom domain. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the CDN profile which is unique within the resource group. Required. @@ -859,7 +888,8 @@ async def begin_enable_custom_https( ) -> AsyncLROPoller[_models.CustomDomain]: """Enable https delivery of the custom domain. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the CDN profile which is unique within the resource group. Required. @@ -885,6 +915,7 @@ async def begin_enable_custom_https( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + content_type = content_type if custom_domain_https_parameters else None cls: ClsType[_models.CustomDomain] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -903,10 +934,11 @@ async def begin_enable_custom_https( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CustomDomain", pipeline_response) + deserialized = self._deserialize("CustomDomain", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_edge_nodes_operations.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_edge_nodes_operations.py index 4cb0f22ba810..6255889900f8 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_edge_nodes_operations.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_edge_nodes_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,10 +5,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys -from typing import Any, AsyncIterable, Callable, Dict, Optional, Type, TypeVar +from collections.abc import MutableMapping +from typing import Any, Callable, Optional, TypeVar import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -20,23 +20,19 @@ map_error, ) from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse -from azure.core.rest import HttpRequest +from azure.core.rest import AsyncHttpResponse, HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models -from ..._vendor import _convert_request +from ..._utils.serialization import Deserializer, Serializer from ...operations._edge_nodes_operations import build_list_request -from .._vendor import CdnManagementClientMixinABC +from .._configuration import CdnManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class EdgeNodesOperations: @@ -53,13 +49,13 @@ class EdgeNodesOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CdnManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace - def list(self, **kwargs: Any) -> AsyncIterable["_models.EdgeNode"]: + def list(self, **kwargs: Any) -> AsyncItemPaged["_models.EdgeNode"]: """Edgenodes are the global Point of Presence (POP) locations used to deliver CDN content to end users. @@ -73,7 +69,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.EdgeNode"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.EdgenodeResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -89,7 +85,6 @@ def prepare_request(next_link=None): headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) else: @@ -105,7 +100,6 @@ def prepare_request(next_link=None): _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _request.method = "GET" return _request @@ -128,7 +122,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_endpoints_operations.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_endpoints_operations.py index 3e51c9b51c27..6373f55c9d8c 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_endpoints_operations.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_endpoints_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,11 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -18,12 +19,13 @@ ResourceExistsError, ResourceNotFoundError, ResourceNotModifiedError, + StreamClosedError, + StreamConsumedError, map_error, ) from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import HttpRequest +from azure.core.rest import AsyncHttpResponse, HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.core.tracing.decorator_async import distributed_trace_async from azure.core.utils import case_insensitive_dict @@ -31,7 +33,7 @@ from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models -from ..._vendor import _convert_request +from ..._utils.serialization import Deserializer, Serializer from ...operations._endpoints_operations import ( build_create_request, build_delete_request, @@ -45,14 +47,11 @@ build_update_request, build_validate_custom_domain_request, ) -from .._vendor import CdnManagementClientMixinABC +from .._configuration import CdnManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class EndpointsOperations: @@ -69,18 +68,19 @@ class EndpointsOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CdnManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_profile( self, resource_group_name: str, profile_name: str, **kwargs: Any - ) -> AsyncIterable["_models.Endpoint"]: + ) -> AsyncItemPaged["_models.Endpoint"]: """Lists existing CDN endpoints. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the CDN profile which is unique within the resource group. Required. @@ -95,7 +95,7 @@ def list_by_profile( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.EndpointListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -114,7 +114,6 @@ def prepare_request(next_link=None): headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) else: @@ -130,7 +129,6 @@ def prepare_request(next_link=None): _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _request.method = "GET" return _request @@ -153,7 +151,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -167,7 +168,8 @@ async def get( """Gets an existing CDN endpoint with the specified endpoint name under the specified subscription, resource group and profile. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the CDN profile which is unique within the resource group. Required. @@ -179,7 +181,7 @@ async def get( :rtype: ~azure.mgmt.cdn.models.Endpoint :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -202,7 +204,6 @@ async def get( headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False @@ -214,10 +215,13 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("Endpoint", pipeline_response) + deserialized = self._deserialize("Endpoint", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -231,8 +235,8 @@ async def _create_initial( endpoint_name: str, endpoint: Union[_models.Endpoint, IO[bytes]], **kwargs: Any - ) -> _models.Endpoint: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -245,7 +249,7 @@ async def _create_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.Endpoint] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -267,10 +271,10 @@ async def _create_initial( headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) @@ -278,21 +282,22 @@ async def _create_initial( response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("Endpoint", pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize("Endpoint", pipeline_response) - if response.status_code == 202: response_headers["location"] = self._deserialize("str", response.headers.get("location")) - deserialized = self._deserialize("Endpoint", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore @@ -313,7 +318,8 @@ async def begin_create( """Creates a new CDN endpoint with the specified endpoint name under the specified subscription, resource group and profile. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the CDN profile which is unique within the resource group. Required. @@ -346,7 +352,8 @@ async def begin_create( """Creates a new CDN endpoint with the specified endpoint name under the specified subscription, resource group and profile. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the CDN profile which is unique within the resource group. Required. @@ -377,7 +384,8 @@ async def begin_create( """Creates a new CDN endpoint with the specified endpoint name under the specified subscription, resource group and profile. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the CDN profile which is unique within the resource group. Required. @@ -414,10 +422,11 @@ async def begin_create( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("Endpoint", pipeline_response) + deserialized = self._deserialize("Endpoint", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized @@ -446,8 +455,8 @@ async def _update_initial( endpoint_name: str, endpoint_update_properties: Union[_models.EndpointUpdateParameters, IO[bytes]], **kwargs: Any - ) -> _models.Endpoint: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -460,7 +469,7 @@ async def _update_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.Endpoint] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -482,10 +491,10 @@ async def _update_initial( headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) @@ -493,18 +502,22 @@ async def _update_initial( response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("Endpoint", pipeline_response) - if response.status_code == 202: response_headers["location"] = self._deserialize("str", response.headers.get("location")) - deserialized = self._deserialize("Endpoint", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore @@ -527,7 +540,8 @@ async def begin_update( To update origins, use the Update Origin operation. To update origin groups, use the Update Origin group operation. To update custom domains, use the Update Custom Domain operation. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the CDN profile which is unique within the resource group. Required. @@ -562,7 +576,8 @@ async def begin_update( To update origins, use the Update Origin operation. To update origin groups, use the Update Origin group operation. To update custom domains, use the Update Custom Domain operation. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the CDN profile which is unique within the resource group. Required. @@ -595,7 +610,8 @@ async def begin_update( To update origins, use the Update Origin operation. To update origin groups, use the Update Origin group operation. To update custom domains, use the Update Custom Domain operation. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the CDN profile which is unique within the resource group. Required. @@ -633,10 +649,11 @@ async def begin_update( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("Endpoint", pipeline_response) + deserialized = self._deserialize("Endpoint", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized @@ -658,10 +675,10 @@ def get_long_running_output(pipeline_response): self._client, raw_result, get_long_running_output, polling_method # type: ignore ) - async def _delete_initial( # pylint: disable=inconsistent-return-statements + async def _delete_initial( self, resource_group_name: str, profile_name: str, endpoint_name: str, **kwargs: Any - ) -> None: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -673,7 +690,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_delete_request( resource_group_name=resource_group_name, @@ -684,10 +701,10 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) @@ -695,16 +712,27 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} if response.status_code == 202: response_headers["location"] = self._deserialize("str", response.headers.get("location")) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + if cls: - return cls(pipeline_response, None, response_headers) # type: ignore + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore @distributed_trace_async async def begin_delete( @@ -713,7 +741,8 @@ async def begin_delete( """Deletes an existing CDN endpoint with the specified endpoint name under the specified subscription, resource group and profile. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the CDN profile which is unique within the resource group. Required. @@ -734,7 +763,7 @@ async def begin_delete( lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: - raw_result = await self._delete_initial( # type: ignore + raw_result = await self._delete_initial( resource_group_name=resource_group_name, profile_name=profile_name, endpoint_name=endpoint_name, @@ -744,6 +773,7 @@ async def begin_delete( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements @@ -767,8 +797,8 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_initial( self, resource_group_name: str, profile_name: str, endpoint_name: str, **kwargs: Any - ) -> _models.Endpoint: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -780,7 +810,7 @@ async def _start_initial( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.Endpoint] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_start_request( resource_group_name=resource_group_name, @@ -791,10 +821,10 @@ async def _start_initial( headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) @@ -802,18 +832,22 @@ async def _start_initial( response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("Endpoint", pipeline_response) - if response.status_code == 202: response_headers["location"] = self._deserialize("str", response.headers.get("location")) - deserialized = self._deserialize("Endpoint", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore @@ -826,7 +860,8 @@ async def begin_start( ) -> AsyncLROPoller[_models.Endpoint]: """Starts an existing CDN endpoint that is on a stopped state. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the CDN profile which is unique within the resource group. Required. @@ -858,10 +893,11 @@ async def begin_start( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("Endpoint", pipeline_response) + deserialized = self._deserialize("Endpoint", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized @@ -885,8 +921,8 @@ def get_long_running_output(pipeline_response): async def _stop_initial( self, resource_group_name: str, profile_name: str, endpoint_name: str, **kwargs: Any - ) -> _models.Endpoint: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -898,7 +934,7 @@ async def _stop_initial( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.Endpoint] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_stop_request( resource_group_name=resource_group_name, @@ -909,10 +945,10 @@ async def _stop_initial( headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) @@ -920,18 +956,22 @@ async def _stop_initial( response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("Endpoint", pipeline_response) - if response.status_code == 202: response_headers["location"] = self._deserialize("str", response.headers.get("location")) - deserialized = self._deserialize("Endpoint", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore @@ -944,7 +984,8 @@ async def begin_stop( ) -> AsyncLROPoller[_models.Endpoint]: """Stops an existing running CDN endpoint. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the CDN profile which is unique within the resource group. Required. @@ -976,10 +1017,11 @@ async def begin_stop( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("Endpoint", pipeline_response) + deserialized = self._deserialize("Endpoint", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized @@ -1001,15 +1043,15 @@ def get_long_running_output(pipeline_response): self._client, raw_result, get_long_running_output, polling_method # type: ignore ) - async def _purge_content_initial( # pylint: disable=inconsistent-return-statements + async def _purge_content_initial( self, resource_group_name: str, profile_name: str, endpoint_name: str, content_file_paths: Union[_models.PurgeParameters, IO[bytes]], **kwargs: Any - ) -> None: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1022,7 +1064,7 @@ async def _purge_content_initial( # pylint: disable=inconsistent-return-stateme api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[None] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -1044,10 +1086,10 @@ async def _purge_content_initial( # pylint: disable=inconsistent-return-stateme headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) @@ -1055,16 +1097,27 @@ async def _purge_content_initial( # pylint: disable=inconsistent-return-stateme response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} if response.status_code == 202: response_headers["location"] = self._deserialize("str", response.headers.get("location")) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + if cls: - return cls(pipeline_response, None, response_headers) # type: ignore + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore @overload async def begin_purge_content( @@ -1079,7 +1132,8 @@ async def begin_purge_content( ) -> AsyncLROPoller[None]: """Removes a content from CDN. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the CDN profile which is unique within the resource group. Required. @@ -1112,7 +1166,8 @@ async def begin_purge_content( ) -> AsyncLROPoller[None]: """Removes a content from CDN. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the CDN profile which is unique within the resource group. Required. @@ -1143,7 +1198,8 @@ async def begin_purge_content( ) -> AsyncLROPoller[None]: """Removes a content from CDN. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the CDN profile which is unique within the resource group. Required. @@ -1170,7 +1226,7 @@ async def begin_purge_content( lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: - raw_result = await self._purge_content_initial( # type: ignore + raw_result = await self._purge_content_initial( resource_group_name=resource_group_name, profile_name=profile_name, endpoint_name=endpoint_name, @@ -1182,6 +1238,7 @@ async def begin_purge_content( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements @@ -1203,15 +1260,15 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- ) return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - async def _load_content_initial( # pylint: disable=inconsistent-return-statements + async def _load_content_initial( self, resource_group_name: str, profile_name: str, endpoint_name: str, content_file_paths: Union[_models.LoadParameters, IO[bytes]], **kwargs: Any - ) -> None: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1224,7 +1281,7 @@ async def _load_content_initial( # pylint: disable=inconsistent-return-statemen api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[None] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -1246,10 +1303,10 @@ async def _load_content_initial( # pylint: disable=inconsistent-return-statemen headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) @@ -1257,16 +1314,27 @@ async def _load_content_initial( # pylint: disable=inconsistent-return-statemen response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} if response.status_code == 202: response_headers["location"] = self._deserialize("str", response.headers.get("location")) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + if cls: - return cls(pipeline_response, None, response_headers) # type: ignore + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore @overload async def begin_load_content( @@ -1281,7 +1349,8 @@ async def begin_load_content( ) -> AsyncLROPoller[None]: """Pre-loads a content to CDN. Available for Verizon Profiles. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the CDN profile which is unique within the resource group. Required. @@ -1313,7 +1382,8 @@ async def begin_load_content( ) -> AsyncLROPoller[None]: """Pre-loads a content to CDN. Available for Verizon Profiles. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the CDN profile which is unique within the resource group. Required. @@ -1343,7 +1413,8 @@ async def begin_load_content( ) -> AsyncLROPoller[None]: """Pre-loads a content to CDN. Available for Verizon Profiles. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the CDN profile which is unique within the resource group. Required. @@ -1369,7 +1440,7 @@ async def begin_load_content( lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: - raw_result = await self._load_content_initial( # type: ignore + raw_result = await self._load_content_initial( resource_group_name=resource_group_name, profile_name=profile_name, endpoint_name=endpoint_name, @@ -1381,6 +1452,7 @@ async def begin_load_content( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements @@ -1415,7 +1487,8 @@ async def validate_custom_domain( ) -> _models.ValidateCustomDomainOutput: """Validates the custom domain mapping to ensure it maps to the correct CDN endpoint in DNS. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the CDN profile which is unique within the resource group. Required. @@ -1446,7 +1519,8 @@ async def validate_custom_domain( ) -> _models.ValidateCustomDomainOutput: """Validates the custom domain mapping to ensure it maps to the correct CDN endpoint in DNS. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the CDN profile which is unique within the resource group. Required. @@ -1475,7 +1549,8 @@ async def validate_custom_domain( ) -> _models.ValidateCustomDomainOutput: """Validates the custom domain mapping to ensure it maps to the correct CDN endpoint in DNS. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the CDN profile which is unique within the resource group. Required. @@ -1490,7 +1565,7 @@ async def validate_custom_domain( :rtype: ~azure.mgmt.cdn.models.ValidateCustomDomainOutput :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1525,7 +1600,6 @@ async def validate_custom_domain( headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False @@ -1537,10 +1611,13 @@ async def validate_custom_domain( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("ValidateCustomDomainOutput", pipeline_response) + deserialized = self._deserialize("ValidateCustomDomainOutput", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -1550,10 +1627,11 @@ async def validate_custom_domain( @distributed_trace def list_resource_usage( self, resource_group_name: str, profile_name: str, endpoint_name: str, **kwargs: Any - ) -> AsyncIterable["_models.ResourceUsage"]: + ) -> AsyncItemPaged["_models.ResourceUsage"]: """Checks the quota and usage of geo filters and custom domains under the given endpoint. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the CDN profile which is unique within the resource group. Required. @@ -1571,7 +1649,7 @@ def list_resource_usage( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ResourceUsageListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1591,7 +1669,6 @@ def prepare_request(next_link=None): headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) else: @@ -1607,7 +1684,6 @@ def prepare_request(next_link=None): _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _request.method = "GET" return _request @@ -1630,7 +1706,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_log_analytics_operations.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_log_analytics_operations.py index a76b3c5219f4..ffaa9f52a5f9 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_log_analytics_operations.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_log_analytics_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,10 +5,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping import datetime -import sys -from typing import Any, Callable, Dict, List, Optional, Type, TypeVar, Union +from typing import Any, Callable, Optional, TypeVar, Union +from azure.core import AsyncPipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -19,14 +19,13 @@ map_error, ) from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse -from azure.core.rest import HttpRequest +from azure.core.rest import AsyncHttpResponse, HttpRequest from azure.core.tracing.decorator_async import distributed_trace_async from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models -from ..._vendor import _convert_request +from ..._utils.serialization import Deserializer, Serializer from ...operations._log_analytics_operations import ( build_get_log_analytics_locations_request, build_get_log_analytics_metrics_request, @@ -35,14 +34,11 @@ build_get_waf_log_analytics_metrics_request, build_get_waf_log_analytics_rankings_request, ) -from .._vendor import CdnManagementClientMixinABC +from .._configuration import CdnManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class LogAnalyticsOperations: @@ -59,13 +55,13 @@ class LogAnalyticsOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CdnManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async - async def get_log_analytics_metrics( + async def get_log_analytics_metrics( # pylint: disable=too-many-locals self, resource_group_name: str, profile_name: str, @@ -82,7 +78,8 @@ async def get_log_analytics_metrics( ) -> _models.MetricsResponse: """Get log report for AFD profile. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. which is unique within the resource group. Required. @@ -109,7 +106,7 @@ async def get_log_analytics_metrics( :rtype: ~azure.mgmt.cdn.models.MetricsResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -140,7 +137,6 @@ async def get_log_analytics_metrics( headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False @@ -152,10 +148,13 @@ async def get_log_analytics_metrics( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("MetricsResponse", pipeline_response) + deserialized = self._deserialize("MetricsResponse", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -177,7 +176,8 @@ async def get_log_analytics_rankings( ) -> _models.RankingsResponse: """Get log analytics ranking report for AFD profile. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. which is unique within the resource group. Required. @@ -198,7 +198,7 @@ async def get_log_analytics_rankings( :rtype: ~azure.mgmt.cdn.models.RankingsResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -226,7 +226,6 @@ async def get_log_analytics_rankings( headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False @@ -238,10 +237,13 @@ async def get_log_analytics_rankings( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("RankingsResponse", pipeline_response) + deserialized = self._deserialize("RankingsResponse", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -254,7 +256,8 @@ async def get_log_analytics_locations( ) -> _models.ContinentsResponse: """Get all available location names for AFD log analytics report. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. which is unique within the resource group. Required. @@ -263,7 +266,7 @@ async def get_log_analytics_locations( :rtype: ~azure.mgmt.cdn.models.ContinentsResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -285,7 +288,6 @@ async def get_log_analytics_locations( headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False @@ -297,10 +299,13 @@ async def get_log_analytics_locations( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("ContinentsResponse", pipeline_response) + deserialized = self._deserialize("ContinentsResponse", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -313,7 +318,8 @@ async def get_log_analytics_resources( ) -> _models.ResourcesResponse: """Get all endpoints and custom domains available for AFD log report. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. which is unique within the resource group. Required. @@ -322,7 +328,7 @@ async def get_log_analytics_resources( :rtype: ~azure.mgmt.cdn.models.ResourcesResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -344,7 +350,6 @@ async def get_log_analytics_resources( headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False @@ -356,10 +361,13 @@ async def get_log_analytics_resources( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("ResourcesResponse", pipeline_response) + deserialized = self._deserialize("ResourcesResponse", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -382,7 +390,8 @@ async def get_waf_log_analytics_metrics( ) -> _models.WafMetricsResponse: """Get Waf related log analytics report for AFD profile. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. which is unique within the resource group. Required. @@ -405,7 +414,7 @@ async def get_waf_log_analytics_metrics( :rtype: ~azure.mgmt.cdn.models.WafMetricsResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -434,7 +443,6 @@ async def get_waf_log_analytics_metrics( headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False @@ -446,10 +454,13 @@ async def get_waf_log_analytics_metrics( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("WafMetricsResponse", pipeline_response) + deserialized = self._deserialize("WafMetricsResponse", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -472,7 +483,8 @@ async def get_waf_log_analytics_rankings( ) -> _models.WafRankingsResponse: """Get WAF log analytics charts for AFD profile. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. which is unique within the resource group. Required. @@ -495,7 +507,7 @@ async def get_waf_log_analytics_rankings( :rtype: ~azure.mgmt.cdn.models.WafRankingsResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -524,7 +536,6 @@ async def get_waf_log_analytics_rankings( headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False @@ -536,10 +547,13 @@ async def get_waf_log_analytics_rankings( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("WafRankingsResponse", pipeline_response) + deserialized = self._deserialize("WafRankingsResponse", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_managed_rule_sets_operations.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_managed_rule_sets_operations.py index 2e8eb598ea06..3845558fea88 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_managed_rule_sets_operations.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_managed_rule_sets_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,10 +5,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys -from typing import Any, AsyncIterable, Callable, Dict, Optional, Type, TypeVar +from collections.abc import MutableMapping +from typing import Any, Callable, Optional, TypeVar import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -20,23 +20,19 @@ map_error, ) from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse -from azure.core.rest import HttpRequest +from azure.core.rest import AsyncHttpResponse, HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models -from ..._vendor import _convert_request +from ..._utils.serialization import Deserializer, Serializer from ...operations._managed_rule_sets_operations import build_list_request -from .._vendor import CdnManagementClientMixinABC +from .._configuration import CdnManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class ManagedRuleSetsOperations: @@ -53,13 +49,13 @@ class ManagedRuleSetsOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CdnManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace - def list(self, **kwargs: Any) -> AsyncIterable["_models.ManagedRuleSetDefinition"]: + def list(self, **kwargs: Any) -> AsyncItemPaged["_models.ManagedRuleSetDefinition"]: """Lists all available managed rule sets. :return: An iterator like instance of either ManagedRuleSetDefinition or the result of @@ -74,7 +70,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.ManagedRuleSetDefinition api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ManagedRuleSetDefinitionList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -91,7 +87,6 @@ def prepare_request(next_link=None): headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) else: @@ -107,7 +102,6 @@ def prepare_request(next_link=None): _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _request.method = "GET" return _request @@ -130,7 +124,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_operations.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_operations.py index cf1ad39ae373..5ec16bc445b6 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_operations.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,10 +5,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys -from typing import Any, AsyncIterable, Callable, Dict, Optional, Type, TypeVar +from collections.abc import MutableMapping +from typing import Any, Callable, Optional, TypeVar import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -20,23 +20,19 @@ map_error, ) from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse -from azure.core.rest import HttpRequest +from azure.core.rest import AsyncHttpResponse, HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models -from ..._vendor import _convert_request +from ..._utils.serialization import Deserializer, Serializer from ...operations._operations import build_list_request -from .._vendor import CdnManagementClientMixinABC +from .._configuration import CdnManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class Operations: @@ -53,13 +49,13 @@ class Operations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CdnManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace - def list(self, **kwargs: Any) -> AsyncIterable["_models.Operation"]: + def list(self, **kwargs: Any) -> AsyncItemPaged["_models.Operation"]: """Lists all of the available CDN REST API operations. :return: An iterator like instance of either Operation or the result of cls(response) @@ -72,7 +68,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Operation"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.OperationsListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -88,7 +84,6 @@ def prepare_request(next_link=None): headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) else: @@ -104,7 +99,6 @@ def prepare_request(next_link=None): _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _request.method = "GET" return _request @@ -127,7 +121,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_origin_groups_operations.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_origin_groups_operations.py index 3512194ddb18..60b0bc300df6 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_origin_groups_operations.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_origin_groups_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,11 +5,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -18,12 +18,13 @@ ResourceExistsError, ResourceNotFoundError, ResourceNotModifiedError, + StreamClosedError, + StreamConsumedError, map_error, ) from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import HttpRequest +from azure.core.rest import AsyncHttpResponse, HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.core.tracing.decorator_async import distributed_trace_async from azure.core.utils import case_insensitive_dict @@ -31,7 +32,7 @@ from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models -from ..._vendor import _convert_request +from ..._utils.serialization import Deserializer, Serializer from ...operations._origin_groups_operations import ( build_create_request, build_delete_request, @@ -39,14 +40,11 @@ build_list_by_endpoint_request, build_update_request, ) -from .._vendor import CdnManagementClientMixinABC +from .._configuration import CdnManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class OriginGroupsOperations: @@ -63,18 +61,19 @@ class OriginGroupsOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CdnManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_endpoint( self, resource_group_name: str, profile_name: str, endpoint_name: str, **kwargs: Any - ) -> AsyncIterable["_models.OriginGroup"]: + ) -> AsyncItemPaged["_models.OriginGroup"]: """Lists all of the existing origin groups within an endpoint. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the CDN profile which is unique within the resource group. Required. @@ -92,7 +91,7 @@ def list_by_endpoint( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.OriginGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -112,7 +111,6 @@ def prepare_request(next_link=None): headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) else: @@ -128,7 +126,6 @@ def prepare_request(next_link=None): _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _request.method = "GET" return _request @@ -151,7 +148,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -164,7 +164,8 @@ async def get( ) -> _models.OriginGroup: """Gets an existing origin group within an endpoint. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the CDN profile which is unique within the resource group. Required. @@ -179,7 +180,7 @@ async def get( :rtype: ~azure.mgmt.cdn.models.OriginGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -203,7 +204,6 @@ async def get( headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False @@ -215,10 +215,13 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("OriginGroup", pipeline_response) + deserialized = self._deserialize("OriginGroup", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -233,8 +236,8 @@ async def _create_initial( origin_group_name: str, origin_group: Union[_models.OriginGroup, IO[bytes]], **kwargs: Any - ) -> _models.OriginGroup: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -247,7 +250,7 @@ async def _create_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.OriginGroup] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -270,10 +273,10 @@ async def _create_initial( headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) @@ -281,21 +284,22 @@ async def _create_initial( response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("OriginGroup", pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize("OriginGroup", pipeline_response) - if response.status_code == 202: response_headers["location"] = self._deserialize("str", response.headers.get("location")) - deserialized = self._deserialize("OriginGroup", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore @@ -316,7 +320,8 @@ async def begin_create( ) -> AsyncLROPoller[_models.OriginGroup]: """Creates a new origin group within the specified endpoint. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the CDN profile which is unique within the resource group. Required. @@ -352,7 +357,8 @@ async def begin_create( ) -> AsyncLROPoller[_models.OriginGroup]: """Creates a new origin group within the specified endpoint. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the CDN profile which is unique within the resource group. Required. @@ -386,7 +392,8 @@ async def begin_create( ) -> AsyncLROPoller[_models.OriginGroup]: """Creates a new origin group within the specified endpoint. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the CDN profile which is unique within the resource group. Required. @@ -428,10 +435,11 @@ async def begin_create( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("OriginGroup", pipeline_response) + deserialized = self._deserialize("OriginGroup", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized @@ -461,8 +469,8 @@ async def _update_initial( origin_group_name: str, origin_group_update_properties: Union[_models.OriginGroupUpdateParameters, IO[bytes]], **kwargs: Any - ) -> _models.OriginGroup: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -475,7 +483,7 @@ async def _update_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.OriginGroup] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -498,10 +506,10 @@ async def _update_initial( headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) @@ -509,18 +517,22 @@ async def _update_initial( response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("OriginGroup", pipeline_response) - if response.status_code == 202: response_headers["location"] = self._deserialize("str", response.headers.get("location")) - deserialized = self._deserialize("OriginGroup", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore @@ -541,7 +553,8 @@ async def begin_update( ) -> AsyncLROPoller[_models.OriginGroup]: """Updates an existing origin group within an endpoint. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the CDN profile which is unique within the resource group. Required. @@ -577,7 +590,8 @@ async def begin_update( ) -> AsyncLROPoller[_models.OriginGroup]: """Updates an existing origin group within an endpoint. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the CDN profile which is unique within the resource group. Required. @@ -611,7 +625,8 @@ async def begin_update( ) -> AsyncLROPoller[_models.OriginGroup]: """Updates an existing origin group within an endpoint. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the CDN profile which is unique within the resource group. Required. @@ -654,10 +669,11 @@ async def begin_update( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("OriginGroup", pipeline_response) + deserialized = self._deserialize("OriginGroup", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized @@ -679,10 +695,10 @@ def get_long_running_output(pipeline_response): self._client, raw_result, get_long_running_output, polling_method # type: ignore ) - async def _delete_initial( # pylint: disable=inconsistent-return-statements + async def _delete_initial( self, resource_group_name: str, profile_name: str, endpoint_name: str, origin_group_name: str, **kwargs: Any - ) -> None: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -694,7 +710,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_delete_request( resource_group_name=resource_group_name, @@ -706,10 +722,10 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) @@ -717,16 +733,27 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} if response.status_code == 202: response_headers["location"] = self._deserialize("str", response.headers.get("location")) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + if cls: - return cls(pipeline_response, None, response_headers) # type: ignore + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore @distributed_trace_async async def begin_delete( @@ -734,7 +761,8 @@ async def begin_delete( ) -> AsyncLROPoller[None]: """Deletes an existing origin group within an endpoint. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the CDN profile which is unique within the resource group. Required. @@ -758,7 +786,7 @@ async def begin_delete( lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: - raw_result = await self._delete_initial( # type: ignore + raw_result = await self._delete_initial( resource_group_name=resource_group_name, profile_name=profile_name, endpoint_name=endpoint_name, @@ -769,6 +797,7 @@ async def begin_delete( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_origins_operations.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_origins_operations.py index 21192a6e9ad0..20d2b6f0aebd 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_origins_operations.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_origins_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,11 +5,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -18,12 +18,13 @@ ResourceExistsError, ResourceNotFoundError, ResourceNotModifiedError, + StreamClosedError, + StreamConsumedError, map_error, ) from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import HttpRequest +from azure.core.rest import AsyncHttpResponse, HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.core.tracing.decorator_async import distributed_trace_async from azure.core.utils import case_insensitive_dict @@ -31,7 +32,7 @@ from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models -from ..._vendor import _convert_request +from ..._utils.serialization import Deserializer, Serializer from ...operations._origins_operations import ( build_create_request, build_delete_request, @@ -39,14 +40,11 @@ build_list_by_endpoint_request, build_update_request, ) -from .._vendor import CdnManagementClientMixinABC +from .._configuration import CdnManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class OriginsOperations: @@ -63,18 +61,19 @@ class OriginsOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CdnManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_endpoint( self, resource_group_name: str, profile_name: str, endpoint_name: str, **kwargs: Any - ) -> AsyncIterable["_models.Origin"]: + ) -> AsyncItemPaged["_models.Origin"]: """Lists all of the existing origins within an endpoint. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the CDN profile which is unique within the resource group. Required. @@ -92,7 +91,7 @@ def list_by_endpoint( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.OriginListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -112,7 +111,6 @@ def prepare_request(next_link=None): headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) else: @@ -128,7 +126,6 @@ def prepare_request(next_link=None): _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _request.method = "GET" return _request @@ -151,7 +148,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -164,7 +164,8 @@ async def get( ) -> _models.Origin: """Gets an existing origin within an endpoint. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the CDN profile which is unique within the resource group. Required. @@ -178,7 +179,7 @@ async def get( :rtype: ~azure.mgmt.cdn.models.Origin :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -202,7 +203,6 @@ async def get( headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False @@ -214,10 +214,13 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("Origin", pipeline_response) + deserialized = self._deserialize("Origin", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -232,8 +235,8 @@ async def _create_initial( origin_name: str, origin: Union[_models.Origin, IO[bytes]], **kwargs: Any - ) -> _models.Origin: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -246,7 +249,7 @@ async def _create_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.Origin] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -269,10 +272,10 @@ async def _create_initial( headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) @@ -280,21 +283,22 @@ async def _create_initial( response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("Origin", pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize("Origin", pipeline_response) - if response.status_code == 202: response_headers["location"] = self._deserialize("str", response.headers.get("location")) - deserialized = self._deserialize("Origin", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore @@ -315,7 +319,8 @@ async def begin_create( ) -> AsyncLROPoller[_models.Origin]: """Creates a new origin within the specified endpoint. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the CDN profile which is unique within the resource group. Required. @@ -350,7 +355,8 @@ async def begin_create( ) -> AsyncLROPoller[_models.Origin]: """Creates a new origin within the specified endpoint. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the CDN profile which is unique within the resource group. Required. @@ -383,7 +389,8 @@ async def begin_create( ) -> AsyncLROPoller[_models.Origin]: """Creates a new origin within the specified endpoint. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the CDN profile which is unique within the resource group. Required. @@ -423,10 +430,11 @@ async def begin_create( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("Origin", pipeline_response) + deserialized = self._deserialize("Origin", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized @@ -456,8 +464,8 @@ async def _update_initial( origin_name: str, origin_update_properties: Union[_models.OriginUpdateParameters, IO[bytes]], **kwargs: Any - ) -> _models.Origin: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -470,7 +478,7 @@ async def _update_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.Origin] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -493,10 +501,10 @@ async def _update_initial( headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) @@ -504,18 +512,22 @@ async def _update_initial( response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("Origin", pipeline_response) - if response.status_code == 202: response_headers["location"] = self._deserialize("str", response.headers.get("location")) - deserialized = self._deserialize("Origin", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore @@ -536,7 +548,8 @@ async def begin_update( ) -> AsyncLROPoller[_models.Origin]: """Updates an existing origin within an endpoint. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the CDN profile which is unique within the resource group. Required. @@ -571,7 +584,8 @@ async def begin_update( ) -> AsyncLROPoller[_models.Origin]: """Updates an existing origin within an endpoint. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the CDN profile which is unique within the resource group. Required. @@ -604,7 +618,8 @@ async def begin_update( ) -> AsyncLROPoller[_models.Origin]: """Updates an existing origin within an endpoint. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the CDN profile which is unique within the resource group. Required. @@ -645,10 +660,11 @@ async def begin_update( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("Origin", pipeline_response) + deserialized = self._deserialize("Origin", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized @@ -670,10 +686,10 @@ def get_long_running_output(pipeline_response): self._client, raw_result, get_long_running_output, polling_method # type: ignore ) - async def _delete_initial( # pylint: disable=inconsistent-return-statements + async def _delete_initial( self, resource_group_name: str, profile_name: str, endpoint_name: str, origin_name: str, **kwargs: Any - ) -> None: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -685,7 +701,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_delete_request( resource_group_name=resource_group_name, @@ -697,10 +713,10 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) @@ -708,16 +724,27 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} if response.status_code == 202: response_headers["location"] = self._deserialize("str", response.headers.get("location")) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + if cls: - return cls(pipeline_response, None, response_headers) # type: ignore + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore @distributed_trace_async async def begin_delete( @@ -725,7 +752,8 @@ async def begin_delete( ) -> AsyncLROPoller[None]: """Deletes an existing origin within an endpoint. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the CDN profile which is unique within the resource group. Required. @@ -748,7 +776,7 @@ async def begin_delete( lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: - raw_result = await self._delete_initial( # type: ignore + raw_result = await self._delete_initial( resource_group_name=resource_group_name, profile_name=profile_name, endpoint_name=endpoint_name, @@ -759,6 +787,7 @@ async def begin_delete( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_patch.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_patch.py index f7dd32510333..49900f6ab120 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_patch.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_patch.py @@ -2,6 +2,7 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ + """Customize generated code here. Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_policies_operations.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_policies_operations.py index 7e6760ff2bf3..bbea5f4dd3a4 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_policies_operations.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_policies_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,11 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -18,12 +19,13 @@ ResourceExistsError, ResourceNotFoundError, ResourceNotModifiedError, + StreamClosedError, + StreamConsumedError, map_error, ) from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import HttpRequest +from azure.core.rest import AsyncHttpResponse, HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.core.tracing.decorator_async import distributed_trace_async from azure.core.utils import case_insensitive_dict @@ -31,7 +33,7 @@ from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models -from ..._vendor import _convert_request +from ..._utils.serialization import Deserializer, Serializer from ...operations._policies_operations import ( build_create_or_update_request, build_delete_request, @@ -39,14 +41,11 @@ build_list_request, build_update_request, ) -from .._vendor import CdnManagementClientMixinABC +from .._configuration import CdnManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class PoliciesOperations: @@ -63,16 +62,19 @@ class PoliciesOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CdnManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace - def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_models.CdnWebApplicationFirewallPolicy"]: + def list( + self, resource_group_name: str, **kwargs: Any + ) -> AsyncItemPaged["_models.CdnWebApplicationFirewallPolicy"]: """Lists all of the protection policies within a resource group. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :return: An iterator like instance of either CdnWebApplicationFirewallPolicy or the result of cls(response) @@ -86,7 +88,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.CdnWebApplicationFirewallPolicyList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -104,7 +106,6 @@ def prepare_request(next_link=None): headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) else: @@ -120,7 +121,6 @@ def prepare_request(next_link=None): _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _request.method = "GET" return _request @@ -143,7 +143,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -156,7 +159,8 @@ async def get( ) -> _models.CdnWebApplicationFirewallPolicy: """Retrieve protection policy with specified name within a resource group. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param policy_name: The name of the CdnWebApplicationFirewallPolicy. Required. :type policy_name: str @@ -164,7 +168,7 @@ async def get( :rtype: ~azure.mgmt.cdn.models.CdnWebApplicationFirewallPolicy :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -186,7 +190,6 @@ async def get( headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False @@ -198,10 +201,13 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("CdnWebApplicationFirewallPolicy", pipeline_response) + deserialized = self._deserialize("CdnWebApplicationFirewallPolicy", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -214,8 +220,8 @@ async def _create_or_update_initial( policy_name: str, cdn_web_application_firewall_policy: Union[_models.CdnWebApplicationFirewallPolicy, IO[bytes]], **kwargs: Any - ) -> _models.CdnWebApplicationFirewallPolicy: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -228,7 +234,7 @@ async def _create_or_update_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CdnWebApplicationFirewallPolicy] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -249,10 +255,10 @@ async def _create_or_update_initial( headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) @@ -260,21 +266,22 @@ async def _create_or_update_initial( response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("CdnWebApplicationFirewallPolicy", pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize("CdnWebApplicationFirewallPolicy", pipeline_response) - if response.status_code == 202: response_headers["location"] = self._deserialize("str", response.headers.get("location")) - deserialized = self._deserialize("CdnWebApplicationFirewallPolicy", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore @@ -293,7 +300,8 @@ async def begin_create_or_update( ) -> AsyncLROPoller[_models.CdnWebApplicationFirewallPolicy]: """Create or update policy with specified rule set name within a resource group. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param policy_name: The name of the CdnWebApplicationFirewallPolicy. Required. :type policy_name: str @@ -322,7 +330,8 @@ async def begin_create_or_update( ) -> AsyncLROPoller[_models.CdnWebApplicationFirewallPolicy]: """Create or update policy with specified rule set name within a resource group. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param policy_name: The name of the CdnWebApplicationFirewallPolicy. Required. :type policy_name: str @@ -348,7 +357,8 @@ async def begin_create_or_update( ) -> AsyncLROPoller[_models.CdnWebApplicationFirewallPolicy]: """Create or update policy with specified rule set name within a resource group. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param policy_name: The name of the CdnWebApplicationFirewallPolicy. Required. :type policy_name: str @@ -383,10 +393,11 @@ async def begin_create_or_update( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CdnWebApplicationFirewallPolicy", pipeline_response) + deserialized = self._deserialize("CdnWebApplicationFirewallPolicy", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized @@ -416,8 +427,8 @@ async def _update_initial( _models.CdnWebApplicationFirewallPolicyPatchParameters, IO[bytes] ], **kwargs: Any - ) -> _models.CdnWebApplicationFirewallPolicy: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -430,7 +441,7 @@ async def _update_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CdnWebApplicationFirewallPolicy] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -453,10 +464,10 @@ async def _update_initial( headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) @@ -464,18 +475,22 @@ async def _update_initial( response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("CdnWebApplicationFirewallPolicy", pipeline_response) - if response.status_code == 202: response_headers["location"] = self._deserialize("str", response.headers.get("location")) - deserialized = self._deserialize("CdnWebApplicationFirewallPolicy", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore @@ -495,7 +510,8 @@ async def begin_update( """Update an existing CdnWebApplicationFirewallPolicy with the specified policy name under the specified subscription and resource group. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param policy_name: The name of the CdnWebApplicationFirewallPolicy. Required. :type policy_name: str @@ -526,7 +542,8 @@ async def begin_update( """Update an existing CdnWebApplicationFirewallPolicy with the specified policy name under the specified subscription and resource group. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param policy_name: The name of the CdnWebApplicationFirewallPolicy. Required. :type policy_name: str @@ -556,7 +573,8 @@ async def begin_update( """Update an existing CdnWebApplicationFirewallPolicy with the specified policy name under the specified subscription and resource group. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param policy_name: The name of the CdnWebApplicationFirewallPolicy. Required. :type policy_name: str @@ -592,10 +610,11 @@ async def begin_update( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CdnWebApplicationFirewallPolicy", pipeline_response) + deserialized = self._deserialize("CdnWebApplicationFirewallPolicy", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized @@ -618,12 +637,11 @@ def get_long_running_output(pipeline_response): ) @distributed_trace_async - async def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, policy_name: str, **kwargs: Any - ) -> None: + async def delete(self, resource_group_name: str, policy_name: str, **kwargs: Any) -> None: """Deletes Policy. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param policy_name: The name of the CdnWebApplicationFirewallPolicy. Required. :type policy_name: str @@ -631,7 +649,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -653,7 +671,6 @@ async def delete( # pylint: disable=inconsistent-return-statements headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False @@ -665,7 +682,10 @@ async def delete( # pylint: disable=inconsistent-return-statements if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_profiles_operations.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_profiles_operations.py index 83eebbe330db..66bce8babbe5 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_profiles_operations.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_profiles_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,11 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -18,12 +19,13 @@ ResourceExistsError, ResourceNotFoundError, ResourceNotModifiedError, + StreamClosedError, + StreamConsumedError, map_error, ) from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import HttpRequest +from azure.core.rest import AsyncHttpResponse, HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.core.tracing.decorator_async import distributed_trace_async from azure.core.utils import case_insensitive_dict @@ -31,9 +33,11 @@ from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models -from ..._vendor import _convert_request +from ..._utils.serialization import Deserializer, Serializer from ...operations._profiles_operations import ( build_can_migrate_request, + build_cdn_can_migrate_to_afd_request, + build_cdn_migrate_to_afd_request, build_create_request, build_delete_request, build_generate_sso_uri_request, @@ -43,20 +47,18 @@ build_list_resource_usage_request, build_list_supported_optimization_types_request, build_migrate_request, + build_migration_abort_request, build_migration_commit_request, build_update_request, ) -from .._vendor import CdnManagementClientMixinABC +from .._configuration import CdnManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list -class ProfilesOperations: +class ProfilesOperations: # pylint: disable=too-many-public-methods """ .. warning:: **DO NOT** instantiate this class directly. @@ -70,13 +72,13 @@ class ProfilesOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CdnManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace - def list(self, **kwargs: Any) -> AsyncIterable["_models.Profile"]: + def list(self, **kwargs: Any) -> AsyncItemPaged["_models.Profile"]: """Lists all of the Azure Front Door Standard, Azure Front Door Premium, and CDN profiles within an Azure subscription. @@ -90,7 +92,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Profile"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ProfileListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -107,7 +109,6 @@ def prepare_request(next_link=None): headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) else: @@ -123,7 +124,6 @@ def prepare_request(next_link=None): _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _request.method = "GET" return _request @@ -146,7 +146,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -154,11 +157,12 @@ async def get_next(next_link=None): return AsyncItemPaged(get_next, extract_data) @distributed_trace - def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_models.Profile"]: + def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> AsyncItemPaged["_models.Profile"]: """Lists all of the Azure Front Door Standard, Azure Front Door Premium, and CDN profiles within a resource group. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :return: An iterator like instance of either Profile or the result of cls(response) :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cdn.models.Profile] @@ -170,7 +174,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ProfileListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -188,7 +192,6 @@ def prepare_request(next_link=None): headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) else: @@ -204,7 +207,6 @@ def prepare_request(next_link=None): _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _request.method = "GET" return _request @@ -227,7 +229,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -239,7 +244,8 @@ async def get(self, resource_group_name: str, profile_name: str, **kwargs: Any) """Gets an Azure Front Door Standard or Azure Front Door Premium or CDN profile with the specified profile name under the specified subscription and resource group. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the resource group. Required. @@ -248,7 +254,7 @@ async def get(self, resource_group_name: str, profile_name: str, **kwargs: Any) :rtype: ~azure.mgmt.cdn.models.Profile :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -270,7 +276,6 @@ async def get(self, resource_group_name: str, profile_name: str, **kwargs: Any) headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False @@ -282,10 +287,13 @@ async def get(self, resource_group_name: str, profile_name: str, **kwargs: Any) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("Profile", pipeline_response) + deserialized = self._deserialize("Profile", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -294,8 +302,8 @@ async def get(self, resource_group_name: str, profile_name: str, **kwargs: Any) async def _create_initial( self, resource_group_name: str, profile_name: str, profile: Union[_models.Profile, IO[bytes]], **kwargs: Any - ) -> _models.Profile: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -308,7 +316,7 @@ async def _create_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.Profile] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -329,10 +337,10 @@ async def _create_initial( headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) @@ -340,21 +348,22 @@ async def _create_initial( response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("Profile", pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize("Profile", pipeline_response) - if response.status_code == 202: response_headers["location"] = self._deserialize("str", response.headers.get("location")) - deserialized = self._deserialize("Profile", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore @@ -374,7 +383,8 @@ async def begin_create( """Creates a new Azure Front Door Standard or Azure Front Door Premium or CDN profile with a profile name under the specified subscription and resource group. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the resource group. Required. @@ -403,7 +413,8 @@ async def begin_create( """Creates a new Azure Front Door Standard or Azure Front Door Premium or CDN profile with a profile name under the specified subscription and resource group. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the resource group. Required. @@ -426,7 +437,8 @@ async def begin_create( """Creates a new Azure Front Door Standard or Azure Front Door Premium or CDN profile with a profile name under the specified subscription and resource group. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the resource group. Required. @@ -460,10 +472,11 @@ async def begin_create( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("Profile", pipeline_response) + deserialized = self._deserialize("Profile", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized @@ -491,8 +504,8 @@ async def _update_initial( profile_name: str, profile_update_parameters: Union[_models.ProfileUpdateParameters, IO[bytes]], **kwargs: Any - ) -> _models.Profile: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -505,7 +518,7 @@ async def _update_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.Profile] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -526,10 +539,10 @@ async def _update_initial( headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) @@ -537,18 +550,22 @@ async def _update_initial( response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("Profile", pipeline_response) - if response.status_code == 202: response_headers["location"] = self._deserialize("str", response.headers.get("location")) - deserialized = self._deserialize("Profile", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore @@ -568,7 +585,8 @@ async def begin_update( """Updates an existing Azure Front Door Standard or Azure Front Door Premium or CDN profile with the specified profile name under the specified subscription and resource group. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the resource group. Required. @@ -598,7 +616,8 @@ async def begin_update( """Updates an existing Azure Front Door Standard or Azure Front Door Premium or CDN profile with the specified profile name under the specified subscription and resource group. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the resource group. Required. @@ -626,7 +645,8 @@ async def begin_update( """Updates an existing Azure Front Door Standard or Azure Front Door Premium or CDN profile with the specified profile name under the specified subscription and resource group. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the resource group. Required. @@ -660,10 +680,11 @@ async def begin_update( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("Profile", pipeline_response) + deserialized = self._deserialize("Profile", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized @@ -685,10 +706,8 @@ def get_long_running_output(pipeline_response): self._client, raw_result, get_long_running_output, polling_method # type: ignore ) - async def _delete_initial( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, profile_name: str, **kwargs: Any - ) -> None: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + async def _delete_initial(self, resource_group_name: str, profile_name: str, **kwargs: Any) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -700,7 +719,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_delete_request( resource_group_name=resource_group_name, @@ -710,10 +729,10 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) @@ -721,16 +740,27 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} if response.status_code == 202: response_headers["location"] = self._deserialize("str", response.headers.get("location")) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + if cls: - return cls(pipeline_response, None, response_headers) # type: ignore + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore @distributed_trace_async async def begin_delete(self, resource_group_name: str, profile_name: str, **kwargs: Any) -> AsyncLROPoller[None]: @@ -738,7 +768,8 @@ async def begin_delete(self, resource_group_name: str, profile_name: str, **kwar the specified parameters. Deleting a profile will result in the deletion of all of the sub-resources including endpoints, origins and custom domains. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the resource group. Required. @@ -756,7 +787,7 @@ async def begin_delete(self, resource_group_name: str, profile_name: str, **kwar lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: - raw_result = await self._delete_initial( # type: ignore + raw_result = await self._delete_initial( resource_group_name=resource_group_name, profile_name=profile_name, api_version=api_version, @@ -765,6 +796,7 @@ async def begin_delete(self, resource_group_name: str, profile_name: str, **kwar params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements @@ -791,8 +823,8 @@ async def _can_migrate_initial( resource_group_name: str, can_migrate_parameters: Union[_models.CanMigrateParameters, IO[bytes]], **kwargs: Any - ) -> Optional[_models.CanMigrateResult]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -805,7 +837,7 @@ async def _can_migrate_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Optional[_models.CanMigrateResult]] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -825,10 +857,10 @@ async def _can_migrate_initial( headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) @@ -836,18 +868,23 @@ async def _can_migrate_initial( response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = None response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("CanMigrateResult", pipeline_response) - if response.status_code == 202: response_headers["location"] = self._deserialize("str", response.headers.get("location")) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore @@ -864,7 +901,8 @@ async def begin_can_migrate( ) -> AsyncLROPoller[_models.CanMigrateResult]: """Checks if CDN profile can be migrated to Azure Frontdoor(Standard/Premium) profile. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param can_migrate_parameters: Properties needed to check if cdn profile or classic frontdoor can be migrated. Required. @@ -889,7 +927,8 @@ async def begin_can_migrate( ) -> AsyncLROPoller[_models.CanMigrateResult]: """Checks if CDN profile can be migrated to Azure Frontdoor(Standard/Premium) profile. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param can_migrate_parameters: Properties needed to check if cdn profile or classic frontdoor can be migrated. Required. @@ -912,7 +951,8 @@ async def begin_can_migrate( ) -> AsyncLROPoller[_models.CanMigrateResult]: """Checks if CDN profile can be migrated to Azure Frontdoor(Standard/Premium) profile. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param can_migrate_parameters: Properties needed to check if cdn profile or classic frontdoor can be migrated. Is either a CanMigrateParameters type or a IO[bytes] type. Required. @@ -942,10 +982,11 @@ async def begin_can_migrate( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CanMigrateResult", pipeline_response) + deserialized = self._deserialize("CanMigrateResult", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized @@ -974,8 +1015,8 @@ async def _migrate_initial( resource_group_name: str, migration_parameters: Union[_models.MigrationParameters, IO[bytes]], **kwargs: Any - ) -> _models.MigrateResult: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -988,7 +1029,7 @@ async def _migrate_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.MigrateResult] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -1008,10 +1049,10 @@ async def _migrate_initial( headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) @@ -1019,18 +1060,22 @@ async def _migrate_initial( response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("MigrateResult", pipeline_response) - if response.status_code == 202: response_headers["location"] = self._deserialize("str", response.headers.get("location")) - deserialized = self._deserialize("MigrateResult", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore @@ -1049,7 +1094,8 @@ async def begin_migrate( """Migrate the CDN profile to Azure Frontdoor(Standard/Premium) profile. The change need to be committed after this. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param migration_parameters: Properties needed to migrate the profile. Required. :type migration_parameters: ~azure.mgmt.cdn.models.MigrationParameters @@ -1074,7 +1120,8 @@ async def begin_migrate( """Migrate the CDN profile to Azure Frontdoor(Standard/Premium) profile. The change need to be committed after this. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param migration_parameters: Properties needed to migrate the profile. Required. :type migration_parameters: IO[bytes] @@ -1097,7 +1144,8 @@ async def begin_migrate( """Migrate the CDN profile to Azure Frontdoor(Standard/Premium) profile. The change need to be committed after this. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param migration_parameters: Properties needed to migrate the profile. Is either a MigrationParameters type or a IO[bytes] type. Required. @@ -1127,10 +1175,11 @@ async def begin_migrate( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("MigrateResult", pipeline_response) + deserialized = self._deserialize("MigrateResult", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized @@ -1154,10 +1203,10 @@ def get_long_running_output(pipeline_response): self._client, raw_result, get_long_running_output, polling_method # type: ignore ) - async def _migration_commit_initial( # pylint: disable=inconsistent-return-statements + async def _migration_commit_initial( self, resource_group_name: str, profile_name: str, **kwargs: Any - ) -> None: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1169,7 +1218,7 @@ async def _migration_commit_initial( # pylint: disable=inconsistent-return-stat _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_migration_commit_request( resource_group_name=resource_group_name, @@ -1179,10 +1228,10 @@ async def _migration_commit_initial( # pylint: disable=inconsistent-return-stat headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) @@ -1190,16 +1239,27 @@ async def _migration_commit_initial( # pylint: disable=inconsistent-return-stat response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} if response.status_code == 202: response_headers["location"] = self._deserialize("str", response.headers.get("location")) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + if cls: - return cls(pipeline_response, None, response_headers) # type: ignore + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore @distributed_trace_async async def begin_migration_commit( @@ -1207,7 +1267,8 @@ async def begin_migration_commit( ) -> AsyncLROPoller[None]: """Commit the migrated Azure Frontdoor(Standard/Premium) profile. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the CDN profile which is unique within the resource group. Required. @@ -1225,7 +1286,7 @@ async def begin_migration_commit( lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: - raw_result = await self._migration_commit_initial( # type: ignore + raw_result = await self._migration_commit_initial( resource_group_name=resource_group_name, profile_name=profile_name, api_version=api_version, @@ -1234,6 +1295,7 @@ async def begin_migration_commit( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements @@ -1266,7 +1328,8 @@ async def generate_sso_uri(self, resource_group_name: str, profile_name: str, ** real-time stats and alerts in a premium profile. The SSO URI changes approximately every 10 minutes. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the CDN profile which is unique within the resource group. Required. @@ -1275,7 +1338,7 @@ async def generate_sso_uri(self, resource_group_name: str, profile_name: str, ** :rtype: ~azure.mgmt.cdn.models.SsoUri :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1297,7 +1360,6 @@ async def generate_sso_uri(self, resource_group_name: str, profile_name: str, ** headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False @@ -1309,10 +1371,13 @@ async def generate_sso_uri(self, resource_group_name: str, profile_name: str, ** if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("SsoUri", pipeline_response) + deserialized = self._deserialize("SsoUri", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -1326,7 +1391,8 @@ async def list_supported_optimization_types( """Gets the supported optimization types for the current profile. A user can create an endpoint with an optimization type from the listed values. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the resource group. Required. @@ -1335,7 +1401,7 @@ async def list_supported_optimization_types( :rtype: ~azure.mgmt.cdn.models.SupportedOptimizationTypesListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1357,7 +1423,6 @@ async def list_supported_optimization_types( headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False @@ -1369,10 +1434,13 @@ async def list_supported_optimization_types( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("SupportedOptimizationTypesListResult", pipeline_response) + deserialized = self._deserialize("SupportedOptimizationTypesListResult", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -1382,11 +1450,12 @@ async def list_supported_optimization_types( @distributed_trace def list_resource_usage( self, resource_group_name: str, profile_name: str, **kwargs: Any - ) -> AsyncIterable["_models.ResourceUsage"]: + ) -> AsyncItemPaged["_models.ResourceUsage"]: """Checks the quota and actual usage of endpoints under the given Azure Front Door Standard or Azure Front Door Premium or CDN profile. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the resource group. Required. @@ -1401,7 +1470,7 @@ def list_resource_usage( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ResourceUsageListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1420,7 +1489,6 @@ def prepare_request(next_link=None): headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) else: @@ -1436,7 +1504,6 @@ def prepare_request(next_link=None): _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _request.method = "GET" return _request @@ -1459,9 +1526,456 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return AsyncItemPaged(get_next, extract_data) + + async def _cdn_can_migrate_to_afd_initial( + self, resource_group_name: str, profile_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_cdn_can_migrate_to_afd_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_cdn_can_migrate_to_afd( + self, resource_group_name: str, profile_name: str, **kwargs: Any + ) -> AsyncLROPoller[_models.CanMigrateResult]: + """Checks if CDN profile can be migrated to Azure Frontdoor(Standard/Premium) profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. + :type profile_name: str + :return: An instance of AsyncLROPoller that returns either CanMigrateResult or the result of + cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.CanMigrateResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + cls: ClsType[_models.CanMigrateResult] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._cdn_can_migrate_to_afd_initial( + resource_group_name=resource_group_name, + profile_name=profile_name, + api_version=api_version, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("CanMigrateResult", pipeline_response.http_response) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.CanMigrateResult].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.CanMigrateResult]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _cdn_migrate_to_afd_initial( + self, + resource_group_name: str, + profile_name: str, + migration_parameters: Union[_models.CdnMigrationToAfdParameters, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(migration_parameters, (IOBase, bytes)): + _content = migration_parameters + else: + _json = self._serialize.body(migration_parameters, "CdnMigrationToAfdParameters") + + _request = build_cdn_migrate_to_afd_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_cdn_migrate_to_afd( + self, + resource_group_name: str, + profile_name: str, + migration_parameters: _models.CdnMigrationToAfdParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.MigrateResult]: + """Migrate the CDN profile to Azure Frontdoor(Standard/Premium) profile. This step prepares the + profile for migration and will be followed by Commit to finalize the migration. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. + :type profile_name: str + :param migration_parameters: Properties needed to migrate the profile. Required. + :type migration_parameters: ~azure.mgmt.cdn.models.CdnMigrationToAfdParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns either MigrateResult or the result of + cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.MigrateResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_cdn_migrate_to_afd( + self, + resource_group_name: str, + profile_name: str, + migration_parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.MigrateResult]: + """Migrate the CDN profile to Azure Frontdoor(Standard/Premium) profile. This step prepares the + profile for migration and will be followed by Commit to finalize the migration. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. + :type profile_name: str + :param migration_parameters: Properties needed to migrate the profile. Required. + :type migration_parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns either MigrateResult or the result of + cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.MigrateResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_cdn_migrate_to_afd( + self, + resource_group_name: str, + profile_name: str, + migration_parameters: Union[_models.CdnMigrationToAfdParameters, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.MigrateResult]: + """Migrate the CDN profile to Azure Frontdoor(Standard/Premium) profile. This step prepares the + profile for migration and will be followed by Commit to finalize the migration. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. + :type profile_name: str + :param migration_parameters: Properties needed to migrate the profile. Is either a + CdnMigrationToAfdParameters type or a IO[bytes] type. Required. + :type migration_parameters: ~azure.mgmt.cdn.models.CdnMigrationToAfdParameters or IO[bytes] + :return: An instance of AsyncLROPoller that returns either MigrateResult or the result of + cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.MigrateResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.MigrateResult] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._cdn_migrate_to_afd_initial( + resource_group_name=resource_group_name, + profile_name=profile_name, + migration_parameters=migration_parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("MigrateResult", pipeline_response.http_response) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.MigrateResult].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.MigrateResult]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _migration_abort_initial( + self, resource_group_name: str, profile_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_migration_abort_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_migration_abort( + self, resource_group_name: str, profile_name: str, **kwargs: Any + ) -> AsyncLROPoller[None]: + """Abort the migration to Azure Frontdoor Premium/Standard. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. + :type profile_name: str + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._migration_abort_initial( + resource_group_name=resource_group_name, + profile_name=profile_name, + api_version=api_version, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_resource_usage_operations.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_resource_usage_operations.py index 1c15d9080763..c40c18b68c1c 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_resource_usage_operations.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_resource_usage_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,10 +5,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys -from typing import Any, AsyncIterable, Callable, Dict, Optional, Type, TypeVar +from collections.abc import MutableMapping +from typing import Any, Callable, Optional, TypeVar import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -20,23 +20,19 @@ map_error, ) from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse -from azure.core.rest import HttpRequest +from azure.core.rest import AsyncHttpResponse, HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models -from ..._vendor import _convert_request +from ..._utils.serialization import Deserializer, Serializer from ...operations._resource_usage_operations import build_list_request -from .._vendor import CdnManagementClientMixinABC +from .._configuration import CdnManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class ResourceUsageOperations: @@ -53,13 +49,13 @@ class ResourceUsageOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CdnManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace - def list(self, **kwargs: Any) -> AsyncIterable["_models.ResourceUsage"]: + def list(self, **kwargs: Any) -> AsyncItemPaged["_models.ResourceUsage"]: """Check the quota and actual usage of the CDN profiles under the given subscription. :return: An iterator like instance of either ResourceUsage or the result of cls(response) @@ -72,7 +68,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.ResourceUsage"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ResourceUsageListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -89,7 +85,6 @@ def prepare_request(next_link=None): headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) else: @@ -105,7 +100,6 @@ def prepare_request(next_link=None): _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _request.method = "GET" return _request @@ -128,7 +122,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_routes_operations.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_routes_operations.py index f75e5288b804..f41e4bd597e6 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_routes_operations.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_routes_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,11 +5,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -18,12 +18,13 @@ ResourceExistsError, ResourceNotFoundError, ResourceNotModifiedError, + StreamClosedError, + StreamConsumedError, map_error, ) from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import HttpRequest +from azure.core.rest import AsyncHttpResponse, HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.core.tracing.decorator_async import distributed_trace_async from azure.core.utils import case_insensitive_dict @@ -31,7 +32,7 @@ from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models -from ..._vendor import _convert_request +from ..._utils.serialization import Deserializer, Serializer from ...operations._routes_operations import ( build_create_request, build_delete_request, @@ -39,14 +40,11 @@ build_list_by_endpoint_request, build_update_request, ) -from .._vendor import CdnManagementClientMixinABC +from .._configuration import CdnManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class RoutesOperations: @@ -63,21 +61,22 @@ class RoutesOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CdnManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_endpoint( self, resource_group_name: str, profile_name: str, endpoint_name: str, **kwargs: Any - ) -> AsyncIterable["_models.Route"]: + ) -> AsyncItemPaged["_models.Route"]: """Lists all of the existing origins within a profile. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param endpoint_name: Name of the endpoint under the profile which is unique globally. Required. @@ -92,7 +91,7 @@ def list_by_endpoint( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.RouteListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -112,7 +111,6 @@ def prepare_request(next_link=None): headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) else: @@ -128,7 +126,6 @@ def prepare_request(next_link=None): _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _request.method = "GET" return _request @@ -151,7 +148,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -165,10 +165,11 @@ async def get( """Gets an existing route with the specified route name under the specified subscription, resource group, profile, and AzureFrontDoor endpoint. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param endpoint_name: Name of the endpoint under the profile which is unique globally. Required. @@ -179,7 +180,7 @@ async def get( :rtype: ~azure.mgmt.cdn.models.Route :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -203,7 +204,6 @@ async def get( headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False @@ -215,10 +215,13 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("Route", pipeline_response) + deserialized = self._deserialize("Route", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -233,8 +236,8 @@ async def _create_initial( route_name: str, route: Union[_models.Route, IO[bytes]], **kwargs: Any - ) -> _models.Route: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -247,7 +250,7 @@ async def _create_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.Route] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -270,10 +273,10 @@ async def _create_initial( headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) @@ -281,21 +284,22 @@ async def _create_initial( response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("Route", pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize("Route", pipeline_response) - if response.status_code == 202: response_headers["location"] = self._deserialize("str", response.headers.get("location")) - deserialized = self._deserialize("Route", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore @@ -317,10 +321,11 @@ async def begin_create( """Creates a new route with the specified route name under the specified subscription, resource group, profile, and AzureFrontDoor endpoint. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param endpoint_name: Name of the endpoint under the profile which is unique globally. Required. @@ -352,10 +357,11 @@ async def begin_create( """Creates a new route with the specified route name under the specified subscription, resource group, profile, and AzureFrontDoor endpoint. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param endpoint_name: Name of the endpoint under the profile which is unique globally. Required. @@ -385,10 +391,11 @@ async def begin_create( """Creates a new route with the specified route name under the specified subscription, resource group, profile, and AzureFrontDoor endpoint. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param endpoint_name: Name of the endpoint under the profile which is unique globally. Required. @@ -424,10 +431,11 @@ async def begin_create( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("Route", pipeline_response) + deserialized = self._deserialize("Route", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized @@ -460,8 +468,8 @@ async def _update_initial( route_name: str, route_update_properties: Union[_models.RouteUpdateParameters, IO[bytes]], **kwargs: Any - ) -> _models.Route: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -474,7 +482,7 @@ async def _update_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.Route] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -497,10 +505,10 @@ async def _update_initial( headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) @@ -508,18 +516,22 @@ async def _update_initial( response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("Route", pipeline_response) - if response.status_code == 202: response_headers["location"] = self._deserialize("str", response.headers.get("location")) - deserialized = self._deserialize("Route", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore @@ -541,10 +553,11 @@ async def begin_update( """Updates an existing route with the specified route name under the specified subscription, resource group, profile, and AzureFrontDoor endpoint. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param endpoint_name: Name of the endpoint under the profile which is unique globally. Required. @@ -576,10 +589,11 @@ async def begin_update( """Updates an existing route with the specified route name under the specified subscription, resource group, profile, and AzureFrontDoor endpoint. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param endpoint_name: Name of the endpoint under the profile which is unique globally. Required. @@ -609,10 +623,11 @@ async def begin_update( """Updates an existing route with the specified route name under the specified subscription, resource group, profile, and AzureFrontDoor endpoint. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param endpoint_name: Name of the endpoint under the profile which is unique globally. Required. @@ -649,10 +664,11 @@ async def begin_update( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("Route", pipeline_response) + deserialized = self._deserialize("Route", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized @@ -677,10 +693,10 @@ def get_long_running_output(pipeline_response): self._client, raw_result, get_long_running_output, polling_method # type: ignore ) - async def _delete_initial( # pylint: disable=inconsistent-return-statements + async def _delete_initial( self, resource_group_name: str, profile_name: str, endpoint_name: str, route_name: str, **kwargs: Any - ) -> None: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -692,7 +708,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_delete_request( resource_group_name=resource_group_name, @@ -704,10 +720,10 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) @@ -715,16 +731,27 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} if response.status_code == 202: response_headers["location"] = self._deserialize("str", response.headers.get("location")) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + if cls: - return cls(pipeline_response, None, response_headers) # type: ignore + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore @distributed_trace_async async def begin_delete( @@ -733,10 +760,11 @@ async def begin_delete( """Deletes an existing route with the specified route name under the specified subscription, resource group, profile, and AzureFrontDoor endpoint. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param endpoint_name: Name of the endpoint under the profile which is unique globally. Required. @@ -756,7 +784,7 @@ async def begin_delete( lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: - raw_result = await self._delete_initial( # type: ignore + raw_result = await self._delete_initial( resource_group_name=resource_group_name, profile_name=profile_name, endpoint_name=endpoint_name, @@ -767,6 +795,7 @@ async def begin_delete( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_rule_sets_operations.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_rule_sets_operations.py index fc4b3e11a657..103a3063aebe 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_rule_sets_operations.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_rule_sets_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,10 +5,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys -from typing import Any, AsyncIterable, Callable, Dict, Optional, Type, TypeVar, Union, cast +from collections.abc import MutableMapping +from typing import Any, AsyncIterator, Callable, Optional, TypeVar, Union, cast import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -17,12 +17,13 @@ ResourceExistsError, ResourceNotFoundError, ResourceNotModifiedError, + StreamClosedError, + StreamConsumedError, map_error, ) from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import HttpRequest +from azure.core.rest import AsyncHttpResponse, HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.core.tracing.decorator_async import distributed_trace_async from azure.core.utils import case_insensitive_dict @@ -30,7 +31,7 @@ from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models -from ..._vendor import _convert_request +from ..._utils.serialization import Deserializer, Serializer from ...operations._rule_sets_operations import ( build_create_request, build_delete_request, @@ -38,14 +39,11 @@ build_list_by_profile_request, build_list_resource_usage_request, ) -from .._vendor import CdnManagementClientMixinABC +from .._configuration import CdnManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class RuleSetsOperations: @@ -62,21 +60,22 @@ class RuleSetsOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CdnManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_profile( self, resource_group_name: str, profile_name: str, **kwargs: Any - ) -> AsyncIterable["_models.RuleSet"]: + ) -> AsyncItemPaged["_models.RuleSet"]: """Lists existing AzureFrontDoor rule sets within a profile. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :return: An iterator like instance of either RuleSet or the result of cls(response) :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cdn.models.RuleSet] @@ -88,7 +87,7 @@ def list_by_profile( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.RuleSetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -107,7 +106,6 @@ def prepare_request(next_link=None): headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) else: @@ -123,7 +121,6 @@ def prepare_request(next_link=None): _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _request.method = "GET" return _request @@ -146,7 +143,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -160,10 +160,11 @@ async def get( """Gets an existing AzureFrontDoor rule set with the specified rule set name under the specified subscription, resource group and profile. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param rule_set_name: Name of the rule set under the profile which is unique globally. Required. @@ -172,7 +173,7 @@ async def get( :rtype: ~azure.mgmt.cdn.models.RuleSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -195,7 +196,6 @@ async def get( headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False @@ -207,10 +207,13 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("RuleSet", pipeline_response) + deserialized = self._deserialize("RuleSet", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -223,10 +226,11 @@ async def create( ) -> _models.RuleSet: """Creates a new rule set within the specified profile. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param rule_set_name: Name of the rule set under the profile which is unique globally. Required. @@ -235,7 +239,7 @@ async def create( :rtype: ~azure.mgmt.cdn.models.RuleSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -258,7 +262,6 @@ async def create( headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False @@ -270,24 +273,23 @@ async def create( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - if response.status_code == 200: - deserialized = self._deserialize("RuleSet", pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize("RuleSet", pipeline_response) + deserialized = self._deserialize("RuleSet", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore - async def _delete_initial( # pylint: disable=inconsistent-return-statements + async def _delete_initial( self, resource_group_name: str, profile_name: str, rule_set_name: str, **kwargs: Any - ) -> None: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -299,7 +301,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_delete_request( resource_group_name=resource_group_name, @@ -310,10 +312,10 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) @@ -321,16 +323,27 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} if response.status_code == 202: response_headers["location"] = self._deserialize("str", response.headers.get("location")) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + if cls: - return cls(pipeline_response, None, response_headers) # type: ignore + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore @distributed_trace_async async def begin_delete( @@ -339,10 +352,11 @@ async def begin_delete( """Deletes an existing AzureFrontDoor rule set with the specified rule set name under the specified subscription, resource group and profile. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param rule_set_name: Name of the rule set under the profile which is unique globally. Required. @@ -360,7 +374,7 @@ async def begin_delete( lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: - raw_result = await self._delete_initial( # type: ignore + raw_result = await self._delete_initial( resource_group_name=resource_group_name, profile_name=profile_name, rule_set_name=rule_set_name, @@ -370,6 +384,7 @@ async def begin_delete( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements @@ -397,13 +412,14 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- @distributed_trace def list_resource_usage( self, resource_group_name: str, profile_name: str, rule_set_name: str, **kwargs: Any - ) -> AsyncIterable["_models.Usage"]: + ) -> AsyncItemPaged["_models.Usage"]: """Checks the quota and actual usage of endpoints under the given Azure Front Door profile.. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param rule_set_name: Name of the rule set under the profile which is unique globally. Required. @@ -418,7 +434,7 @@ def list_resource_usage( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.UsagesListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -438,7 +454,6 @@ def prepare_request(next_link=None): headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) else: @@ -454,7 +469,6 @@ def prepare_request(next_link=None): _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _request.method = "GET" return _request @@ -477,7 +491,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_rules_operations.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_rules_operations.py index 3461ad98d882..7608a38dc632 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_rules_operations.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_rules_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,11 +5,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -18,12 +18,13 @@ ResourceExistsError, ResourceNotFoundError, ResourceNotModifiedError, + StreamClosedError, + StreamConsumedError, map_error, ) from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import HttpRequest +from azure.core.rest import AsyncHttpResponse, HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.core.tracing.decorator_async import distributed_trace_async from azure.core.utils import case_insensitive_dict @@ -31,7 +32,7 @@ from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models -from ..._vendor import _convert_request +from ..._utils.serialization import Deserializer, Serializer from ...operations._rules_operations import ( build_create_request, build_delete_request, @@ -39,14 +40,11 @@ build_list_by_rule_set_request, build_update_request, ) -from .._vendor import CdnManagementClientMixinABC +from .._configuration import CdnManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class RulesOperations: @@ -63,21 +61,22 @@ class RulesOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CdnManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_rule_set( self, resource_group_name: str, profile_name: str, rule_set_name: str, **kwargs: Any - ) -> AsyncIterable["_models.Rule"]: + ) -> AsyncItemPaged["_models.Rule"]: """Lists all of the existing delivery rules within a rule set. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param rule_set_name: Name of the rule set under the profile. Required. :type rule_set_name: str @@ -91,7 +90,7 @@ def list_by_rule_set( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.RuleListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -111,7 +110,6 @@ def prepare_request(next_link=None): headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) else: @@ -127,7 +125,6 @@ def prepare_request(next_link=None): _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _request.method = "GET" return _request @@ -150,7 +147,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -163,10 +163,11 @@ async def get( ) -> _models.Rule: """Gets an existing delivery rule within a rule set. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param rule_set_name: Name of the rule set under the profile. Required. :type rule_set_name: str @@ -176,7 +177,7 @@ async def get( :rtype: ~azure.mgmt.cdn.models.Rule :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -200,7 +201,6 @@ async def get( headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False @@ -212,10 +212,13 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("Rule", pipeline_response) + deserialized = self._deserialize("Rule", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -230,8 +233,8 @@ async def _create_initial( rule_name: str, rule: Union[_models.Rule, IO[bytes]], **kwargs: Any - ) -> _models.Rule: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -244,7 +247,7 @@ async def _create_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.Rule] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -267,10 +270,10 @@ async def _create_initial( headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) @@ -278,21 +281,22 @@ async def _create_initial( response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("Rule", pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize("Rule", pipeline_response) - if response.status_code == 202: response_headers["location"] = self._deserialize("str", response.headers.get("location")) - deserialized = self._deserialize("Rule", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore @@ -313,10 +317,11 @@ async def begin_create( ) -> AsyncLROPoller[_models.Rule]: """Creates a new delivery rule within the specified rule set. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param rule_set_name: Name of the rule set under the profile. Required. :type rule_set_name: str @@ -346,10 +351,11 @@ async def begin_create( ) -> AsyncLROPoller[_models.Rule]: """Creates a new delivery rule within the specified rule set. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param rule_set_name: Name of the rule set under the profile. Required. :type rule_set_name: str @@ -377,10 +383,11 @@ async def begin_create( ) -> AsyncLROPoller[_models.Rule]: """Creates a new delivery rule within the specified rule set. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param rule_set_name: Name of the rule set under the profile. Required. :type rule_set_name: str @@ -415,10 +422,11 @@ async def begin_create( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("Rule", pipeline_response) + deserialized = self._deserialize("Rule", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized @@ -451,8 +459,8 @@ async def _update_initial( rule_name: str, rule_update_properties: Union[_models.RuleUpdateParameters, IO[bytes]], **kwargs: Any - ) -> _models.Rule: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -465,7 +473,7 @@ async def _update_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.Rule] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -488,10 +496,10 @@ async def _update_initial( headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) @@ -499,18 +507,22 @@ async def _update_initial( response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("Rule", pipeline_response) - if response.status_code == 202: response_headers["location"] = self._deserialize("str", response.headers.get("location")) - deserialized = self._deserialize("Rule", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore @@ -531,10 +543,11 @@ async def begin_update( ) -> AsyncLROPoller[_models.Rule]: """Updates an existing delivery rule within a rule set. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param rule_set_name: Name of the rule set under the profile. Required. :type rule_set_name: str @@ -564,10 +577,11 @@ async def begin_update( ) -> AsyncLROPoller[_models.Rule]: """Updates an existing delivery rule within a rule set. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param rule_set_name: Name of the rule set under the profile. Required. :type rule_set_name: str @@ -595,10 +609,11 @@ async def begin_update( ) -> AsyncLROPoller[_models.Rule]: """Updates an existing delivery rule within a rule set. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param rule_set_name: Name of the rule set under the profile. Required. :type rule_set_name: str @@ -634,10 +649,11 @@ async def begin_update( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("Rule", pipeline_response) + deserialized = self._deserialize("Rule", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized @@ -662,10 +678,10 @@ def get_long_running_output(pipeline_response): self._client, raw_result, get_long_running_output, polling_method # type: ignore ) - async def _delete_initial( # pylint: disable=inconsistent-return-statements + async def _delete_initial( self, resource_group_name: str, profile_name: str, rule_set_name: str, rule_name: str, **kwargs: Any - ) -> None: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -677,7 +693,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_delete_request( resource_group_name=resource_group_name, @@ -689,10 +705,10 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) @@ -700,16 +716,27 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} if response.status_code == 202: response_headers["location"] = self._deserialize("str", response.headers.get("location")) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + if cls: - return cls(pipeline_response, None, response_headers) # type: ignore + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore @distributed_trace_async async def begin_delete( @@ -717,10 +744,11 @@ async def begin_delete( ) -> AsyncLROPoller[None]: """Deletes an existing delivery rule within a rule set. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param rule_set_name: Name of the rule set under the profile. Required. :type rule_set_name: str @@ -739,7 +767,7 @@ async def begin_delete( lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: - raw_result = await self._delete_initial( # type: ignore + raw_result = await self._delete_initial( resource_group_name=resource_group_name, profile_name=profile_name, rule_set_name=rule_set_name, @@ -750,6 +778,7 @@ async def begin_delete( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_secrets_operations.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_secrets_operations.py index 181fb64700c9..a118b39e66a2 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_secrets_operations.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_secrets_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,11 +5,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -18,12 +18,13 @@ ResourceExistsError, ResourceNotFoundError, ResourceNotModifiedError, + StreamClosedError, + StreamConsumedError, map_error, ) from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import HttpRequest +from azure.core.rest import AsyncHttpResponse, HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.core.tracing.decorator_async import distributed_trace_async from azure.core.utils import case_insensitive_dict @@ -31,21 +32,18 @@ from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models -from ..._vendor import _convert_request +from ..._utils.serialization import Deserializer, Serializer from ...operations._secrets_operations import ( build_create_request, build_delete_request, build_get_request, build_list_by_profile_request, ) -from .._vendor import CdnManagementClientMixinABC +from .._configuration import CdnManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class SecretsOperations: @@ -62,21 +60,22 @@ class SecretsOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CdnManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_profile( self, resource_group_name: str, profile_name: str, **kwargs: Any - ) -> AsyncIterable["_models.Secret"]: + ) -> AsyncItemPaged["_models.Secret"]: """Lists existing AzureFrontDoor secrets. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :return: An iterator like instance of either Secret or the result of cls(response) :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cdn.models.Secret] @@ -88,7 +87,7 @@ def list_by_profile( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.SecretListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -107,7 +106,6 @@ def prepare_request(next_link=None): headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) else: @@ -123,7 +121,6 @@ def prepare_request(next_link=None): _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _request.method = "GET" return _request @@ -146,7 +143,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -157,10 +157,11 @@ async def get_next(next_link=None): async def get(self, resource_group_name: str, profile_name: str, secret_name: str, **kwargs: Any) -> _models.Secret: """Gets an existing Secret within a profile. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param secret_name: Name of the Secret under the profile. Required. :type secret_name: str @@ -168,7 +169,7 @@ async def get(self, resource_group_name: str, profile_name: str, secret_name: st :rtype: ~azure.mgmt.cdn.models.Secret :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -191,7 +192,6 @@ async def get(self, resource_group_name: str, profile_name: str, secret_name: st headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False @@ -203,10 +203,13 @@ async def get(self, resource_group_name: str, profile_name: str, secret_name: st if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("Secret", pipeline_response) + deserialized = self._deserialize("Secret", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -220,8 +223,8 @@ async def _create_initial( secret_name: str, secret: Union[_models.Secret, IO[bytes]], **kwargs: Any - ) -> _models.Secret: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -234,7 +237,7 @@ async def _create_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.Secret] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -256,10 +259,10 @@ async def _create_initial( headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) @@ -267,21 +270,22 @@ async def _create_initial( response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("Secret", pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize("Secret", pipeline_response) - if response.status_code == 202: response_headers["location"] = self._deserialize("str", response.headers.get("location")) - deserialized = self._deserialize("Secret", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore @@ -301,10 +305,11 @@ async def begin_create( ) -> AsyncLROPoller[_models.Secret]: """Creates a new Secret within the specified profile. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param secret_name: Name of the Secret under the profile. Required. :type secret_name: str @@ -332,10 +337,11 @@ async def begin_create( ) -> AsyncLROPoller[_models.Secret]: """Creates a new Secret within the specified profile. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param secret_name: Name of the Secret under the profile. Required. :type secret_name: str @@ -361,10 +367,11 @@ async def begin_create( ) -> AsyncLROPoller[_models.Secret]: """Creates a new Secret within the specified profile. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param secret_name: Name of the Secret under the profile. Required. :type secret_name: str @@ -397,10 +404,11 @@ async def begin_create( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("Secret", pipeline_response) + deserialized = self._deserialize("Secret", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized @@ -425,10 +433,10 @@ def get_long_running_output(pipeline_response): self._client, raw_result, get_long_running_output, polling_method # type: ignore ) - async def _delete_initial( # pylint: disable=inconsistent-return-statements + async def _delete_initial( self, resource_group_name: str, profile_name: str, secret_name: str, **kwargs: Any - ) -> None: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -440,7 +448,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_delete_request( resource_group_name=resource_group_name, @@ -451,10 +459,10 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) @@ -462,16 +470,27 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} if response.status_code == 202: response_headers["location"] = self._deserialize("str", response.headers.get("location")) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + if cls: - return cls(pipeline_response, None, response_headers) # type: ignore + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore @distributed_trace_async async def begin_delete( @@ -479,10 +498,11 @@ async def begin_delete( ) -> AsyncLROPoller[None]: """Deletes an existing Secret within profile. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param secret_name: Name of the Secret under the profile. Required. :type secret_name: str @@ -499,7 +519,7 @@ async def begin_delete( lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: - raw_result = await self._delete_initial( # type: ignore + raw_result = await self._delete_initial( resource_group_name=resource_group_name, profile_name=profile_name, secret_name=secret_name, @@ -509,6 +529,7 @@ async def begin_delete( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_security_policies_operations.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_security_policies_operations.py index 5a81547b0bc7..95830f6d2efa 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_security_policies_operations.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_security_policies_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,11 +5,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -18,12 +18,13 @@ ResourceExistsError, ResourceNotFoundError, ResourceNotModifiedError, + StreamClosedError, + StreamConsumedError, map_error, ) from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import HttpRequest +from azure.core.rest import AsyncHttpResponse, HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.core.tracing.decorator_async import distributed_trace_async from azure.core.utils import case_insensitive_dict @@ -31,7 +32,7 @@ from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models -from ..._vendor import _convert_request +from ..._utils.serialization import Deserializer, Serializer from ...operations._security_policies_operations import ( build_create_request, build_delete_request, @@ -39,14 +40,11 @@ build_list_by_profile_request, build_patch_request, ) -from .._vendor import CdnManagementClientMixinABC +from .._configuration import CdnManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class SecurityPoliciesOperations: @@ -63,21 +61,22 @@ class SecurityPoliciesOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CdnManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_profile( self, resource_group_name: str, profile_name: str, **kwargs: Any - ) -> AsyncIterable["_models.SecurityPolicy"]: + ) -> AsyncItemPaged["_models.SecurityPolicy"]: """Lists security policies associated with the profile. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :return: An iterator like instance of either SecurityPolicy or the result of cls(response) :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cdn.models.SecurityPolicy] @@ -89,7 +88,7 @@ def list_by_profile( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.SecurityPolicyListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -108,7 +107,6 @@ def prepare_request(next_link=None): headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) else: @@ -124,7 +122,6 @@ def prepare_request(next_link=None): _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _request.method = "GET" return _request @@ -147,7 +144,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -160,10 +160,11 @@ async def get( ) -> _models.SecurityPolicy: """Gets an existing security policy within a profile. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param security_policy_name: Name of the security policy under the profile. Required. :type security_policy_name: str @@ -171,7 +172,7 @@ async def get( :rtype: ~azure.mgmt.cdn.models.SecurityPolicy :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -194,7 +195,6 @@ async def get( headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False @@ -206,10 +206,13 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("SecurityPolicy", pipeline_response) + deserialized = self._deserialize("SecurityPolicy", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -223,8 +226,8 @@ async def _create_initial( security_policy_name: str, security_policy: Union[_models.SecurityPolicy, IO[bytes]], **kwargs: Any - ) -> _models.SecurityPolicy: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -237,7 +240,7 @@ async def _create_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.SecurityPolicy] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -259,10 +262,10 @@ async def _create_initial( headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) @@ -270,21 +273,22 @@ async def _create_initial( response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("SecurityPolicy", pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize("SecurityPolicy", pipeline_response) - if response.status_code == 202: response_headers["location"] = self._deserialize("str", response.headers.get("location")) - deserialized = self._deserialize("SecurityPolicy", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore @@ -304,10 +308,11 @@ async def begin_create( ) -> AsyncLROPoller[_models.SecurityPolicy]: """Creates a new security policy within the specified profile. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param security_policy_name: Name of the security policy under the profile. Required. :type security_policy_name: str @@ -335,10 +340,11 @@ async def begin_create( ) -> AsyncLROPoller[_models.SecurityPolicy]: """Creates a new security policy within the specified profile. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param security_policy_name: Name of the security policy under the profile. Required. :type security_policy_name: str @@ -364,10 +370,11 @@ async def begin_create( ) -> AsyncLROPoller[_models.SecurityPolicy]: """Creates a new security policy within the specified profile. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param security_policy_name: Name of the security policy under the profile. Required. :type security_policy_name: str @@ -401,10 +408,11 @@ async def begin_create( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("SecurityPolicy", pipeline_response) + deserialized = self._deserialize("SecurityPolicy", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized @@ -436,8 +444,8 @@ async def _patch_initial( security_policy_name: str, security_policy_update_properties: Union[_models.SecurityPolicyUpdateParameters, IO[bytes]], **kwargs: Any - ) -> _models.SecurityPolicy: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -450,7 +458,7 @@ async def _patch_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.SecurityPolicy] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -472,10 +480,10 @@ async def _patch_initial( headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) @@ -483,18 +491,22 @@ async def _patch_initial( response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("SecurityPolicy", pipeline_response) - if response.status_code == 202: response_headers["location"] = self._deserialize("str", response.headers.get("location")) - deserialized = self._deserialize("SecurityPolicy", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore @@ -514,10 +526,11 @@ async def begin_patch( ) -> AsyncLROPoller[_models.SecurityPolicy]: """Updates an existing security policy within a profile. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param security_policy_name: Name of the security policy under the profile. Required. :type security_policy_name: str @@ -545,10 +558,11 @@ async def begin_patch( ) -> AsyncLROPoller[_models.SecurityPolicy]: """Updates an existing security policy within a profile. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param security_policy_name: Name of the security policy under the profile. Required. :type security_policy_name: str @@ -574,10 +588,11 @@ async def begin_patch( ) -> AsyncLROPoller[_models.SecurityPolicy]: """Updates an existing security policy within a profile. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param security_policy_name: Name of the security policy under the profile. Required. :type security_policy_name: str @@ -612,10 +627,11 @@ async def begin_patch( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("SecurityPolicy", pipeline_response) + deserialized = self._deserialize("SecurityPolicy", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized @@ -640,10 +656,10 @@ def get_long_running_output(pipeline_response): self._client, raw_result, get_long_running_output, polling_method # type: ignore ) - async def _delete_initial( # pylint: disable=inconsistent-return-statements + async def _delete_initial( self, resource_group_name: str, profile_name: str, security_policy_name: str, **kwargs: Any - ) -> None: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -655,7 +671,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) _request = build_delete_request( resource_group_name=resource_group_name, @@ -666,10 +682,10 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) @@ -677,16 +693,27 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} if response.status_code == 202: response_headers["location"] = self._deserialize("str", response.headers.get("location")) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + if cls: - return cls(pipeline_response, None, response_headers) # type: ignore + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore @distributed_trace_async async def begin_delete( @@ -694,10 +721,11 @@ async def begin_delete( ) -> AsyncLROPoller[None]: """Deletes an existing security policy within profile. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param security_policy_name: Name of the security policy under the profile. Required. :type security_policy_name: str @@ -714,7 +742,7 @@ async def begin_delete( lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: - raw_result = await self._delete_initial( # type: ignore + raw_result = await self._delete_initial( resource_group_name=resource_group_name, profile_name=profile_name, security_policy_name=security_policy_name, @@ -724,6 +752,7 @@ async def begin_delete( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/__init__.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/__init__.py index c82bb7b540c6..9683d9045ff6 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/__init__.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/__init__.py @@ -5,413 +5,409 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._models_py3 import AFDDomain -from ._models_py3 import AFDDomainHttpsParameters -from ._models_py3 import AFDDomainListResult -from ._models_py3 import AFDDomainProperties -from ._models_py3 import AFDDomainUpdateParameters -from ._models_py3 import AFDDomainUpdatePropertiesParameters -from ._models_py3 import AFDEndpoint -from ._models_py3 import AFDEndpointListResult -from ._models_py3 import AFDEndpointProperties -from ._models_py3 import AFDEndpointPropertiesUpdateParameters -from ._models_py3 import AFDEndpointUpdateParameters -from ._models_py3 import AFDOrigin -from ._models_py3 import AFDOriginGroup -from ._models_py3 import AFDOriginGroupListResult -from ._models_py3 import AFDOriginGroupProperties -from ._models_py3 import AFDOriginGroupUpdateParameters -from ._models_py3 import AFDOriginGroupUpdatePropertiesParameters -from ._models_py3 import AFDOriginListResult -from ._models_py3 import AFDOriginProperties -from ._models_py3 import AFDOriginUpdateParameters -from ._models_py3 import AFDOriginUpdatePropertiesParameters -from ._models_py3 import AFDStateProperties -from ._models_py3 import ActivatedResourceReference -from ._models_py3 import AfdErrorResponse -from ._models_py3 import AfdPurgeParameters -from ._models_py3 import AfdRouteCacheConfiguration -from ._models_py3 import AzureFirstPartyManagedCertificate -from ._models_py3 import AzureFirstPartyManagedCertificateParameters -from ._models_py3 import CacheConfiguration -from ._models_py3 import CacheExpirationActionParameters -from ._models_py3 import CacheKeyQueryStringActionParameters -from ._models_py3 import CanMigrateParameters -from ._models_py3 import CanMigrateResult -from ._models_py3 import CdnCertificateSourceParameters -from ._models_py3 import CdnEndpoint -from ._models_py3 import CdnManagedHttpsParameters -from ._models_py3 import CdnWebApplicationFirewallPolicy -from ._models_py3 import CdnWebApplicationFirewallPolicyList -from ._models_py3 import CdnWebApplicationFirewallPolicyPatchParameters -from ._models_py3 import Certificate -from ._models_py3 import CheckEndpointNameAvailabilityInput -from ._models_py3 import CheckEndpointNameAvailabilityOutput -from ._models_py3 import CheckHostNameAvailabilityInput -from ._models_py3 import CheckNameAvailabilityInput -from ._models_py3 import CheckNameAvailabilityOutput -from ._models_py3 import CidrIpAddress -from ._models_py3 import ClientPortMatchConditionParameters -from ._models_py3 import Components18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsPropertiesDataItems -from ._models_py3 import Components1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsPropertiesDataItems -from ._models_py3 import ComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItems -from ._models_py3 import CompressionSettings -from ._models_py3 import ContinentsResponse -from ._models_py3 import ContinentsResponseContinentsItem -from ._models_py3 import ContinentsResponseCountryOrRegionsItem -from ._models_py3 import CookiesMatchConditionParameters -from ._models_py3 import CustomDomain -from ._models_py3 import CustomDomainHttpsParameters -from ._models_py3 import CustomDomainListResult -from ._models_py3 import CustomDomainParameters -from ._models_py3 import CustomRule -from ._models_py3 import CustomRuleList -from ._models_py3 import CustomerCertificate -from ._models_py3 import CustomerCertificateParameters -from ._models_py3 import DeepCreatedCustomDomain -from ._models_py3 import DeepCreatedOrigin -from ._models_py3 import DeepCreatedOriginGroup -from ._models_py3 import DeliveryRule -from ._models_py3 import DeliveryRuleAction -from ._models_py3 import DeliveryRuleCacheExpirationAction -from ._models_py3 import DeliveryRuleCacheKeyQueryStringAction -from ._models_py3 import DeliveryRuleClientPortCondition -from ._models_py3 import DeliveryRuleCondition -from ._models_py3 import DeliveryRuleCookiesCondition -from ._models_py3 import DeliveryRuleHostNameCondition -from ._models_py3 import DeliveryRuleHttpVersionCondition -from ._models_py3 import DeliveryRuleIsDeviceCondition -from ._models_py3 import DeliveryRulePostArgsCondition -from ._models_py3 import DeliveryRuleQueryStringCondition -from ._models_py3 import DeliveryRuleRemoteAddressCondition -from ._models_py3 import DeliveryRuleRequestBodyCondition -from ._models_py3 import DeliveryRuleRequestHeaderAction -from ._models_py3 import DeliveryRuleRequestHeaderCondition -from ._models_py3 import DeliveryRuleRequestMethodCondition -from ._models_py3 import DeliveryRuleRequestSchemeCondition -from ._models_py3 import DeliveryRuleRequestUriCondition -from ._models_py3 import DeliveryRuleResponseHeaderAction -from ._models_py3 import DeliveryRuleRouteConfigurationOverrideAction -from ._models_py3 import DeliveryRuleServerPortCondition -from ._models_py3 import DeliveryRuleSocketAddrCondition -from ._models_py3 import DeliveryRuleSslProtocolCondition -from ._models_py3 import DeliveryRuleUrlFileExtensionCondition -from ._models_py3 import DeliveryRuleUrlFileNameCondition -from ._models_py3 import DeliveryRuleUrlPathCondition -from ._models_py3 import DimensionProperties -from ._models_py3 import DomainValidationProperties -from ._models_py3 import EdgeNode -from ._models_py3 import EdgenodeResult -from ._models_py3 import Endpoint -from ._models_py3 import EndpointListResult -from ._models_py3 import EndpointProperties -from ._models_py3 import EndpointPropertiesUpdateParameters -from ._models_py3 import EndpointPropertiesUpdateParametersDeliveryPolicy -from ._models_py3 import EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink -from ._models_py3 import EndpointUpdateParameters -from ._models_py3 import ErrorAdditionalInfo -from ._models_py3 import ErrorDetail -from ._models_py3 import ErrorResponse -from ._models_py3 import GeoFilter -from ._models_py3 import HeaderActionParameters -from ._models_py3 import HealthProbeParameters -from ._models_py3 import HostNameMatchConditionParameters -from ._models_py3 import HttpErrorRangeParameters -from ._models_py3 import HttpVersionMatchConditionParameters -from ._models_py3 import IpAddressGroup -from ._models_py3 import IsDeviceMatchConditionParameters -from ._models_py3 import KeyVaultCertificateSourceParameters -from ._models_py3 import KeyVaultSigningKeyParameters -from ._models_py3 import LoadBalancingSettingsParameters -from ._models_py3 import LoadParameters -from ._models_py3 import LogSpecification -from ._models_py3 import ManagedCertificate -from ._models_py3 import ManagedCertificateParameters -from ._models_py3 import ManagedRuleDefinition -from ._models_py3 import ManagedRuleGroupDefinition -from ._models_py3 import ManagedRuleGroupOverride -from ._models_py3 import ManagedRuleOverride -from ._models_py3 import ManagedRuleSet -from ._models_py3 import ManagedRuleSetDefinition -from ._models_py3 import ManagedRuleSetDefinitionList -from ._models_py3 import ManagedRuleSetList -from ._models_py3 import ManagedServiceIdentity -from ._models_py3 import MatchCondition -from ._models_py3 import MetricAvailability -from ._models_py3 import MetricSpecification -from ._models_py3 import MetricsResponse -from ._models_py3 import MetricsResponseSeriesItem -from ._models_py3 import MetricsResponseSeriesPropertiesItemsItem -from ._models_py3 import MigrateResult -from ._models_py3 import MigrationErrorType -from ._models_py3 import MigrationParameters -from ._models_py3 import MigrationWebApplicationFirewallMapping -from ._models_py3 import Operation -from ._models_py3 import OperationDisplay -from ._models_py3 import OperationsListResult -from ._models_py3 import Origin -from ._models_py3 import OriginGroup -from ._models_py3 import OriginGroupListResult -from ._models_py3 import OriginGroupOverride -from ._models_py3 import OriginGroupOverrideAction -from ._models_py3 import OriginGroupOverrideActionParameters -from ._models_py3 import OriginGroupProperties -from ._models_py3 import OriginGroupUpdateParameters -from ._models_py3 import OriginGroupUpdatePropertiesParameters -from ._models_py3 import OriginListResult -from ._models_py3 import OriginProperties -from ._models_py3 import OriginUpdateParameters -from ._models_py3 import OriginUpdatePropertiesParameters -from ._models_py3 import PolicySettings -from ._models_py3 import PostArgsMatchConditionParameters -from ._models_py3 import Profile -from ._models_py3 import ProfileChangeSkuWafMapping -from ._models_py3 import ProfileListResult -from ._models_py3 import ProfileLogScrubbing -from ._models_py3 import ProfileScrubbingRules -from ._models_py3 import ProfileUpdateParameters -from ._models_py3 import ProfileUpgradeParameters -from ._models_py3 import ProxyResource -from ._models_py3 import PurgeParameters -from ._models_py3 import QueryStringMatchConditionParameters -from ._models_py3 import RankingsResponse -from ._models_py3 import RankingsResponseTablesItem -from ._models_py3 import RankingsResponseTablesPropertiesItemsItem -from ._models_py3 import RankingsResponseTablesPropertiesItemsMetricsItem -from ._models_py3 import RateLimitRule -from ._models_py3 import RateLimitRuleList -from ._models_py3 import RemoteAddressMatchConditionParameters -from ._models_py3 import RequestBodyMatchConditionParameters -from ._models_py3 import RequestHeaderMatchConditionParameters -from ._models_py3 import RequestMethodMatchConditionParameters -from ._models_py3 import RequestSchemeMatchConditionParameters -from ._models_py3 import RequestUriMatchConditionParameters -from ._models_py3 import Resource -from ._models_py3 import ResourceReference -from ._models_py3 import ResourceUsage -from ._models_py3 import ResourceUsageListResult -from ._models_py3 import ResourcesResponse -from ._models_py3 import ResourcesResponseCustomDomainsItem -from ._models_py3 import ResourcesResponseEndpointsItem -from ._models_py3 import ResourcesResponseEndpointsPropertiesItemsItem -from ._models_py3 import ResponseBasedOriginErrorDetectionParameters -from ._models_py3 import Route -from ._models_py3 import RouteConfigurationOverrideActionParameters -from ._models_py3 import RouteListResult -from ._models_py3 import RouteProperties -from ._models_py3 import RouteUpdateParameters -from ._models_py3 import RouteUpdatePropertiesParameters -from ._models_py3 import Rule -from ._models_py3 import RuleListResult -from ._models_py3 import RuleProperties -from ._models_py3 import RuleSet -from ._models_py3 import RuleSetListResult -from ._models_py3 import RuleSetProperties -from ._models_py3 import RuleUpdateParameters -from ._models_py3 import RuleUpdatePropertiesParameters -from ._models_py3 import Secret -from ._models_py3 import SecretListResult -from ._models_py3 import SecretParameters -from ._models_py3 import SecretProperties -from ._models_py3 import SecurityPolicy -from ._models_py3 import SecurityPolicyListResult -from ._models_py3 import SecurityPolicyProperties -from ._models_py3 import SecurityPolicyPropertiesParameters -from ._models_py3 import SecurityPolicyUpdateParameters -from ._models_py3 import SecurityPolicyWebApplicationFirewallAssociation -from ._models_py3 import SecurityPolicyWebApplicationFirewallParameters -from ._models_py3 import ServerPortMatchConditionParameters -from ._models_py3 import ServiceSpecification -from ._models_py3 import SharedPrivateLinkResourceProperties -from ._models_py3 import Sku -from ._models_py3 import SocketAddrMatchConditionParameters -from ._models_py3 import SslProtocolMatchConditionParameters -from ._models_py3 import SsoUri -from ._models_py3 import SupportedOptimizationTypesListResult -from ._models_py3 import SystemData -from ._models_py3 import TrackedResource -from ._models_py3 import UrlFileExtensionMatchConditionParameters -from ._models_py3 import UrlFileNameMatchConditionParameters -from ._models_py3 import UrlPathMatchConditionParameters -from ._models_py3 import UrlRedirectAction -from ._models_py3 import UrlRedirectActionParameters -from ._models_py3 import UrlRewriteAction -from ._models_py3 import UrlRewriteActionParameters -from ._models_py3 import UrlSigningAction -from ._models_py3 import UrlSigningActionParameters -from ._models_py3 import UrlSigningKey -from ._models_py3 import UrlSigningKeyParameters -from ._models_py3 import UrlSigningParamIdentifier -from ._models_py3 import Usage -from ._models_py3 import UsageName -from ._models_py3 import UsagesListResult -from ._models_py3 import UserAssignedIdentity -from ._models_py3 import UserManagedHttpsParameters -from ._models_py3 import ValidateCustomDomainInput -from ._models_py3 import ValidateCustomDomainOutput -from ._models_py3 import ValidateProbeInput -from ._models_py3 import ValidateProbeOutput -from ._models_py3 import ValidateSecretInput -from ._models_py3 import ValidateSecretOutput -from ._models_py3 import ValidationToken -from ._models_py3 import WafMetricsResponse -from ._models_py3 import WafMetricsResponseSeriesItem -from ._models_py3 import WafMetricsResponseSeriesPropertiesItemsItem -from ._models_py3 import WafRankingsResponse -from ._models_py3 import WafRankingsResponseDataItem +from typing import TYPE_CHECKING -from ._cdn_management_client_enums import AFDEndpointProtocols -from ._cdn_management_client_enums import ActionType -from ._cdn_management_client_enums import AfdCertificateType -from ._cdn_management_client_enums import AfdMinimumTlsVersion -from ._cdn_management_client_enums import AfdProvisioningState -from ._cdn_management_client_enums import AfdQueryStringCachingBehavior -from ._cdn_management_client_enums import Algorithm -from ._cdn_management_client_enums import AutoGeneratedDomainNameLabelScope -from ._cdn_management_client_enums import CacheBehavior -from ._cdn_management_client_enums import CacheExpirationActionParametersTypeName -from ._cdn_management_client_enums import CacheKeyQueryStringActionParametersTypeName -from ._cdn_management_client_enums import CacheType -from ._cdn_management_client_enums import CanMigrateDefaultSku -from ._cdn_management_client_enums import CdnCertificateSourceParametersTypeName -from ._cdn_management_client_enums import CertificateSource -from ._cdn_management_client_enums import CertificateType -from ._cdn_management_client_enums import ClientPortMatchConditionParametersTypeName -from ._cdn_management_client_enums import ClientPortOperator -from ._cdn_management_client_enums import CookiesMatchConditionParametersTypeName -from ._cdn_management_client_enums import CookiesOperator -from ._cdn_management_client_enums import CustomDomainResourceState -from ._cdn_management_client_enums import CustomHttpsProvisioningState -from ._cdn_management_client_enums import CustomHttpsProvisioningSubstate -from ._cdn_management_client_enums import CustomRuleEnabledState -from ._cdn_management_client_enums import DeleteRule -from ._cdn_management_client_enums import DeliveryRuleActionEnum -from ._cdn_management_client_enums import DeploymentStatus -from ._cdn_management_client_enums import DestinationProtocol -from ._cdn_management_client_enums import DomainValidationState -from ._cdn_management_client_enums import EnabledState -from ._cdn_management_client_enums import EndpointProvisioningState -from ._cdn_management_client_enums import EndpointResourceState -from ._cdn_management_client_enums import ForwardingProtocol -from ._cdn_management_client_enums import GeoFilterActions -from ._cdn_management_client_enums import HeaderAction -from ._cdn_management_client_enums import HeaderActionParametersTypeName -from ._cdn_management_client_enums import HealthProbeRequestType -from ._cdn_management_client_enums import HostNameMatchConditionParametersTypeName -from ._cdn_management_client_enums import HostNameOperator -from ._cdn_management_client_enums import HttpVersionMatchConditionParametersTypeName -from ._cdn_management_client_enums import HttpVersionOperator -from ._cdn_management_client_enums import HttpsRedirect -from ._cdn_management_client_enums import IdentityType -from ._cdn_management_client_enums import IsDeviceMatchConditionParametersMatchValuesItem -from ._cdn_management_client_enums import IsDeviceMatchConditionParametersTypeName -from ._cdn_management_client_enums import IsDeviceOperator -from ._cdn_management_client_enums import KeyVaultCertificateSourceParametersTypeName -from ._cdn_management_client_enums import KeyVaultSigningKeyParametersTypeName -from ._cdn_management_client_enums import LinkToDefaultDomain -from ._cdn_management_client_enums import LogMetric -from ._cdn_management_client_enums import LogMetricsGranularity -from ._cdn_management_client_enums import LogMetricsGroupBy -from ._cdn_management_client_enums import LogRanking -from ._cdn_management_client_enums import LogRankingMetric -from ._cdn_management_client_enums import ManagedRuleEnabledState -from ._cdn_management_client_enums import ManagedServiceIdentityType -from ._cdn_management_client_enums import MatchProcessingBehavior -from ._cdn_management_client_enums import MatchVariable -from ._cdn_management_client_enums import MetricsGranularity -from ._cdn_management_client_enums import MetricsSeriesUnit -from ._cdn_management_client_enums import MinimumTlsVersion -from ._cdn_management_client_enums import Operator -from ._cdn_management_client_enums import OptimizationType -from ._cdn_management_client_enums import OriginGroupOverrideActionParametersTypeName -from ._cdn_management_client_enums import OriginGroupProvisioningState -from ._cdn_management_client_enums import OriginGroupResourceState -from ._cdn_management_client_enums import OriginProvisioningState -from ._cdn_management_client_enums import OriginResourceState -from ._cdn_management_client_enums import ParamIndicator -from ._cdn_management_client_enums import PolicyEnabledState -from ._cdn_management_client_enums import PolicyMode -from ._cdn_management_client_enums import PolicyResourceState -from ._cdn_management_client_enums import PolicySettingsDefaultCustomBlockResponseStatusCode -from ._cdn_management_client_enums import PostArgsMatchConditionParametersTypeName -from ._cdn_management_client_enums import PostArgsOperator -from ._cdn_management_client_enums import PrivateEndpointStatus -from ._cdn_management_client_enums import ProbeProtocol -from ._cdn_management_client_enums import ProfileProvisioningState -from ._cdn_management_client_enums import ProfileResourceState -from ._cdn_management_client_enums import ProfileScrubbingState -from ._cdn_management_client_enums import ProtocolType -from ._cdn_management_client_enums import ProvisioningState -from ._cdn_management_client_enums import QueryStringBehavior -from ._cdn_management_client_enums import QueryStringCachingBehavior -from ._cdn_management_client_enums import QueryStringMatchConditionParametersTypeName -from ._cdn_management_client_enums import QueryStringOperator -from ._cdn_management_client_enums import RedirectType -from ._cdn_management_client_enums import RemoteAddressMatchConditionParametersTypeName -from ._cdn_management_client_enums import RemoteAddressOperator -from ._cdn_management_client_enums import RequestBodyMatchConditionParametersTypeName -from ._cdn_management_client_enums import RequestBodyOperator -from ._cdn_management_client_enums import RequestHeaderMatchConditionParametersTypeName -from ._cdn_management_client_enums import RequestHeaderOperator -from ._cdn_management_client_enums import RequestMethodMatchConditionParametersMatchValuesItem -from ._cdn_management_client_enums import RequestMethodMatchConditionParametersTypeName -from ._cdn_management_client_enums import RequestMethodOperator -from ._cdn_management_client_enums import RequestSchemeMatchConditionParametersMatchValuesItem -from ._cdn_management_client_enums import RequestSchemeMatchConditionParametersOperator -from ._cdn_management_client_enums import RequestSchemeMatchConditionParametersTypeName -from ._cdn_management_client_enums import RequestUriMatchConditionParametersTypeName -from ._cdn_management_client_enums import RequestUriOperator -from ._cdn_management_client_enums import ResourceType -from ._cdn_management_client_enums import ResourceUsageUnit -from ._cdn_management_client_enums import ResponseBasedDetectedErrorTypes -from ._cdn_management_client_enums import RouteConfigurationOverrideActionParametersTypeName -from ._cdn_management_client_enums import RuleCacheBehavior -from ._cdn_management_client_enums import RuleIsCompressionEnabled -from ._cdn_management_client_enums import RuleQueryStringCachingBehavior -from ._cdn_management_client_enums import ScrubbingRuleEntryMatchOperator -from ._cdn_management_client_enums import ScrubbingRuleEntryMatchVariable -from ._cdn_management_client_enums import ScrubbingRuleEntryState -from ._cdn_management_client_enums import SecretType -from ._cdn_management_client_enums import SecurityPolicyType -from ._cdn_management_client_enums import ServerPortMatchConditionParametersTypeName -from ._cdn_management_client_enums import ServerPortOperator -from ._cdn_management_client_enums import SharedPrivateLinkResourceStatus -from ._cdn_management_client_enums import SkuName -from ._cdn_management_client_enums import SocketAddrMatchConditionParametersTypeName -from ._cdn_management_client_enums import SocketAddrOperator -from ._cdn_management_client_enums import SslProtocol -from ._cdn_management_client_enums import SslProtocolMatchConditionParametersTypeName -from ._cdn_management_client_enums import SslProtocolOperator -from ._cdn_management_client_enums import Status -from ._cdn_management_client_enums import Transform -from ._cdn_management_client_enums import TransformType -from ._cdn_management_client_enums import UpdateRule -from ._cdn_management_client_enums import UrlFileExtensionMatchConditionParametersTypeName -from ._cdn_management_client_enums import UrlFileExtensionOperator -from ._cdn_management_client_enums import UrlFileNameMatchConditionParametersTypeName -from ._cdn_management_client_enums import UrlFileNameOperator -from ._cdn_management_client_enums import UrlPathMatchConditionParametersTypeName -from ._cdn_management_client_enums import UrlPathOperator -from ._cdn_management_client_enums import UrlRedirectActionParametersTypeName -from ._cdn_management_client_enums import UrlRewriteActionParametersTypeName -from ._cdn_management_client_enums import UrlSigningActionParametersTypeName -from ._cdn_management_client_enums import UsageUnit -from ._cdn_management_client_enums import WafAction -from ._cdn_management_client_enums import WafGranularity -from ._cdn_management_client_enums import WafMatchVariable -from ._cdn_management_client_enums import WafMetric -from ._cdn_management_client_enums import WafMetricsGranularity -from ._cdn_management_client_enums import WafMetricsSeriesUnit -from ._cdn_management_client_enums import WafRankingGroupBy -from ._cdn_management_client_enums import WafRankingType -from ._cdn_management_client_enums import WafRuleType +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + + +from ._models_py3 import ( # type: ignore + AFDDomain, + AFDDomainHttpsCustomizedCipherSuiteSet, + AFDDomainHttpsParameters, + AFDDomainListResult, + AFDDomainProperties, + AFDDomainUpdateParameters, + AFDDomainUpdatePropertiesParameters, + AFDEndpoint, + AFDEndpointListResult, + AFDEndpointProperties, + AFDEndpointPropertiesUpdateParameters, + AFDEndpointUpdateParameters, + AFDOrigin, + AFDOriginGroup, + AFDOriginGroupListResult, + AFDOriginGroupProperties, + AFDOriginGroupUpdateParameters, + AFDOriginGroupUpdatePropertiesParameters, + AFDOriginListResult, + AFDOriginProperties, + AFDOriginUpdateParameters, + AFDOriginUpdatePropertiesParameters, + AFDStateProperties, + ActivatedResourceReference, + AfdPurgeParameters, + AfdRouteCacheConfiguration, + AzureFirstPartyManagedCertificate, + AzureFirstPartyManagedCertificateParameters, + CacheConfiguration, + CacheExpirationActionParameters, + CacheKeyQueryStringActionParameters, + CanMigrateParameters, + CanMigrateResult, + CdnCertificateSourceParameters, + CdnEndpoint, + CdnManagedHttpsParameters, + CdnMigrationToAfdParameters, + CdnWebApplicationFirewallPolicy, + CdnWebApplicationFirewallPolicyList, + CdnWebApplicationFirewallPolicyPatchParameters, + Certificate, + CertificateSourceParameters, + CheckEndpointNameAvailabilityInput, + CheckEndpointNameAvailabilityOutput, + CheckHostNameAvailabilityInput, + CheckNameAvailabilityInput, + CheckNameAvailabilityOutput, + CidrIpAddress, + ClientPortMatchConditionParameters, + Components18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsPropertiesDataItems, + Components1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsPropertiesDataItems, + ComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItems, + CompressionSettings, + ContinentsResponse, + ContinentsResponseContinentsItem, + ContinentsResponseCountryOrRegionsItem, + CookiesMatchConditionParameters, + CustomDomain, + CustomDomainHttpsParameters, + CustomDomainListResult, + CustomDomainParameters, + CustomRule, + CustomRuleList, + CustomerCertificate, + CustomerCertificateParameters, + DeepCreatedCustomDomain, + DeepCreatedOrigin, + DeepCreatedOriginGroup, + DeliveryRule, + DeliveryRuleAction, + DeliveryRuleActionParameters, + DeliveryRuleCacheExpirationAction, + DeliveryRuleCacheKeyQueryStringAction, + DeliveryRuleClientPortCondition, + DeliveryRuleCondition, + DeliveryRuleConditionParameters, + DeliveryRuleCookiesCondition, + DeliveryRuleHostNameCondition, + DeliveryRuleHttpVersionCondition, + DeliveryRuleIsDeviceCondition, + DeliveryRulePostArgsCondition, + DeliveryRuleQueryStringCondition, + DeliveryRuleRemoteAddressCondition, + DeliveryRuleRequestBodyCondition, + DeliveryRuleRequestHeaderAction, + DeliveryRuleRequestHeaderCondition, + DeliveryRuleRequestMethodCondition, + DeliveryRuleRequestSchemeCondition, + DeliveryRuleRequestUriCondition, + DeliveryRuleResponseHeaderAction, + DeliveryRuleRouteConfigurationOverrideAction, + DeliveryRuleServerPortCondition, + DeliveryRuleSocketAddrCondition, + DeliveryRuleSslProtocolCondition, + DeliveryRuleUrlFileExtensionCondition, + DeliveryRuleUrlFileNameCondition, + DeliveryRuleUrlPathCondition, + DimensionProperties, + DomainValidationProperties, + EdgeNode, + EdgenodeResult, + Endpoint, + EndpointListResult, + EndpointProperties, + EndpointPropertiesUpdateParameters, + EndpointPropertiesUpdateParametersDeliveryPolicy, + EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink, + EndpointUpdateParameters, + ErrorAdditionalInfo, + ErrorDetail, + ErrorResponse, + GeoFilter, + HeaderActionParameters, + HealthProbeParameters, + HostNameMatchConditionParameters, + HttpErrorRangeParameters, + HttpVersionMatchConditionParameters, + IpAddressGroup, + IsDeviceMatchConditionParameters, + KeyVaultCertificateSourceParameters, + KeyVaultSigningKeyParameters, + LoadBalancingSettingsParameters, + LoadParameters, + LogSpecification, + ManagedCertificate, + ManagedCertificateParameters, + ManagedRuleDefinition, + ManagedRuleGroupDefinition, + ManagedRuleGroupOverride, + ManagedRuleOverride, + ManagedRuleSet, + ManagedRuleSetDefinition, + ManagedRuleSetDefinitionList, + ManagedRuleSetList, + ManagedServiceIdentity, + MatchCondition, + MetricAvailability, + MetricSpecification, + MetricsResponse, + MetricsResponseSeriesItem, + MetricsResponseSeriesPropertiesItemsItem, + MigrateResult, + MigrationEndpointMapping, + MigrationErrorType, + MigrationParameters, + MigrationWebApplicationFirewallMapping, + Operation, + OperationDisplay, + OperationsListResult, + Origin, + OriginAuthenticationProperties, + OriginGroup, + OriginGroupListResult, + OriginGroupOverride, + OriginGroupOverrideAction, + OriginGroupOverrideActionParameters, + OriginGroupProperties, + OriginGroupUpdateParameters, + OriginGroupUpdatePropertiesParameters, + OriginListResult, + OriginProperties, + OriginUpdateParameters, + OriginUpdatePropertiesParameters, + PolicySettings, + PostArgsMatchConditionParameters, + Profile, + ProfileChangeSkuWafMapping, + ProfileListResult, + ProfileLogScrubbing, + ProfileScrubbingRules, + ProfileUpdateParameters, + ProfileUpgradeParameters, + ProxyResource, + PurgeParameters, + QueryStringMatchConditionParameters, + RankingsResponse, + RankingsResponseTablesItem, + RankingsResponseTablesPropertiesItemsItem, + RankingsResponseTablesPropertiesItemsMetricsItem, + RateLimitRule, + RateLimitRuleList, + RemoteAddressMatchConditionParameters, + RequestBodyMatchConditionParameters, + RequestHeaderMatchConditionParameters, + RequestMethodMatchConditionParameters, + RequestSchemeMatchConditionParameters, + RequestUriMatchConditionParameters, + Resource, + ResourceReference, + ResourceUsage, + ResourceUsageListResult, + ResourcesResponse, + ResourcesResponseCustomDomainsItem, + ResourcesResponseEndpointsItem, + ResourcesResponseEndpointsPropertiesItemsItem, + ResponseBasedOriginErrorDetectionParameters, + Route, + RouteConfigurationOverrideActionParameters, + RouteListResult, + RouteProperties, + RouteUpdateParameters, + RouteUpdatePropertiesParameters, + Rule, + RuleListResult, + RuleProperties, + RuleSet, + RuleSetListResult, + RuleSetProperties, + RuleUpdateParameters, + RuleUpdatePropertiesParameters, + Secret, + SecretListResult, + SecretParameters, + SecretProperties, + SecurityPolicy, + SecurityPolicyListResult, + SecurityPolicyProperties, + SecurityPolicyPropertiesParameters, + SecurityPolicyUpdateParameters, + SecurityPolicyWebApplicationFirewallAssociation, + SecurityPolicyWebApplicationFirewallParameters, + ServerPortMatchConditionParameters, + ServiceSpecification, + SharedPrivateLinkResourceProperties, + Sku, + SocketAddrMatchConditionParameters, + SslProtocolMatchConditionParameters, + SsoUri, + SupportedOptimizationTypesListResult, + SystemData, + TrackedResource, + UrlFileExtensionMatchConditionParameters, + UrlFileNameMatchConditionParameters, + UrlPathMatchConditionParameters, + UrlRedirectAction, + UrlRedirectActionParameters, + UrlRewriteAction, + UrlRewriteActionParameters, + UrlSigningAction, + UrlSigningActionParameters, + UrlSigningKey, + UrlSigningKeyParameters, + UrlSigningParamIdentifier, + Usage, + UsageName, + UsagesListResult, + UserAssignedIdentity, + UserManagedHttpsParameters, + ValidateCustomDomainInput, + ValidateCustomDomainOutput, + ValidateProbeInput, + ValidateProbeOutput, + ValidateSecretInput, + ValidateSecretOutput, + ValidationToken, + WafMetricsResponse, + WafMetricsResponseSeriesItem, + WafMetricsResponseSeriesPropertiesItemsItem, + WafRankingsResponse, + WafRankingsResponseDataItem, +) + +from ._cdn_management_client_enums import ( # type: ignore + AFDEndpointProtocols, + ActionType, + AfdCertificateType, + AfdCipherSuiteSetType, + AfdCustomizedCipherSuiteForTls12, + AfdCustomizedCipherSuiteForTls13, + AfdMinimumTlsVersion, + AfdProvisioningState, + AfdQueryStringCachingBehavior, + Algorithm, + AutoGeneratedDomainNameLabelScope, + CacheBehavior, + CacheType, + CanMigrateDefaultSku, + CertificateSource, + CertificateSourceParametersType, + CertificateType, + ClientPortOperator, + CookiesOperator, + CreatedByType, + CustomDomainResourceState, + CustomHttpsProvisioningState, + CustomHttpsProvisioningSubstate, + CustomRuleEnabledState, + DeleteRule, + DeliveryRuleActionEnum, + DeliveryRuleActionParametersType, + DeliveryRuleConditionParametersType, + DeploymentStatus, + DestinationProtocol, + DomainValidationState, + EnabledState, + EndpointProvisioningState, + EndpointResourceState, + ForwardingProtocol, + GeoFilterActions, + HeaderAction, + HealthProbeRequestType, + HostNameOperator, + HttpVersionOperator, + HttpsRedirect, + IsDeviceMatchValue, + IsDeviceOperator, + KeyVaultSigningKeyParametersType, + LinkToDefaultDomain, + LogMetric, + LogMetricsGranularity, + LogMetricsGroupBy, + LogRanking, + LogRankingMetric, + ManagedRuleEnabledState, + ManagedServiceIdentityType, + MatchProcessingBehavior, + MatchVariable, + MetricsGranularity, + MetricsSeriesUnit, + MinimumTlsVersion, + Operator, + OptimizationType, + OriginAuthenticationType, + OriginGroupProvisioningState, + OriginGroupResourceState, + OriginProvisioningState, + OriginResourceState, + ParamIndicator, + PolicyEnabledState, + PolicyMode, + PolicyResourceState, + PolicySettingsDefaultCustomBlockResponseStatusCode, + PostArgsOperator, + PrivateEndpointStatus, + ProbeProtocol, + ProfileProvisioningState, + ProfileResourceState, + ProfileScrubbingState, + ProtocolType, + ProvisioningState, + QueryStringBehavior, + QueryStringCachingBehavior, + QueryStringOperator, + RedirectType, + RemoteAddressOperator, + RequestBodyOperator, + RequestHeaderOperator, + RequestMethodMatchValue, + RequestMethodOperator, + RequestSchemeMatchConditionParametersOperator, + RequestSchemeMatchValue, + RequestUriOperator, + ResourceType, + ResourceUsageUnit, + ResponseBasedDetectedErrorTypes, + RuleCacheBehavior, + RuleIsCompressionEnabled, + RuleQueryStringCachingBehavior, + ScrubbingRuleEntryMatchOperator, + ScrubbingRuleEntryMatchVariable, + ScrubbingRuleEntryState, + SecretType, + SecurityPolicyType, + ServerPortOperator, + SharedPrivateLinkResourceStatus, + SkuName, + SocketAddrOperator, + SslProtocol, + SslProtocolOperator, + Status, + Transform, + TransformType, + UpdateRule, + UrlFileExtensionOperator, + UrlFileNameOperator, + UrlPathOperator, + UsageUnit, + WafAction, + WafGranularity, + WafMatchVariable, + WafMetric, + WafMetricsGranularity, + WafMetricsSeriesUnit, + WafRankingGroupBy, + WafRankingType, + WafRuleType, +) from ._patch import __all__ as _patch_all -from ._patch import * # pylint: disable=unused-wildcard-import +from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ "AFDDomain", + "AFDDomainHttpsCustomizedCipherSuiteSet", "AFDDomainHttpsParameters", "AFDDomainListResult", "AFDDomainProperties", @@ -434,7 +430,6 @@ "AFDOriginUpdatePropertiesParameters", "AFDStateProperties", "ActivatedResourceReference", - "AfdErrorResponse", "AfdPurgeParameters", "AfdRouteCacheConfiguration", "AzureFirstPartyManagedCertificate", @@ -447,10 +442,12 @@ "CdnCertificateSourceParameters", "CdnEndpoint", "CdnManagedHttpsParameters", + "CdnMigrationToAfdParameters", "CdnWebApplicationFirewallPolicy", "CdnWebApplicationFirewallPolicyList", "CdnWebApplicationFirewallPolicyPatchParameters", "Certificate", + "CertificateSourceParameters", "CheckEndpointNameAvailabilityInput", "CheckEndpointNameAvailabilityOutput", "CheckHostNameAvailabilityInput", @@ -479,10 +476,12 @@ "DeepCreatedOriginGroup", "DeliveryRule", "DeliveryRuleAction", + "DeliveryRuleActionParameters", "DeliveryRuleCacheExpirationAction", "DeliveryRuleCacheKeyQueryStringAction", "DeliveryRuleClientPortCondition", "DeliveryRuleCondition", + "DeliveryRuleConditionParameters", "DeliveryRuleCookiesCondition", "DeliveryRuleHostNameCondition", "DeliveryRuleHttpVersionCondition", @@ -549,6 +548,7 @@ "MetricsResponseSeriesItem", "MetricsResponseSeriesPropertiesItemsItem", "MigrateResult", + "MigrationEndpointMapping", "MigrationErrorType", "MigrationParameters", "MigrationWebApplicationFirewallMapping", @@ -556,6 +556,7 @@ "OperationDisplay", "OperationsListResult", "Origin", + "OriginAuthenticationProperties", "OriginGroup", "OriginGroupListResult", "OriginGroupOverride", @@ -668,29 +669,31 @@ "AFDEndpointProtocols", "ActionType", "AfdCertificateType", + "AfdCipherSuiteSetType", + "AfdCustomizedCipherSuiteForTls12", + "AfdCustomizedCipherSuiteForTls13", "AfdMinimumTlsVersion", "AfdProvisioningState", "AfdQueryStringCachingBehavior", "Algorithm", "AutoGeneratedDomainNameLabelScope", "CacheBehavior", - "CacheExpirationActionParametersTypeName", - "CacheKeyQueryStringActionParametersTypeName", "CacheType", "CanMigrateDefaultSku", - "CdnCertificateSourceParametersTypeName", "CertificateSource", + "CertificateSourceParametersType", "CertificateType", - "ClientPortMatchConditionParametersTypeName", "ClientPortOperator", - "CookiesMatchConditionParametersTypeName", "CookiesOperator", + "CreatedByType", "CustomDomainResourceState", "CustomHttpsProvisioningState", "CustomHttpsProvisioningSubstate", "CustomRuleEnabledState", "DeleteRule", "DeliveryRuleActionEnum", + "DeliveryRuleActionParametersType", + "DeliveryRuleConditionParametersType", "DeploymentStatus", "DestinationProtocol", "DomainValidationState", @@ -700,19 +703,13 @@ "ForwardingProtocol", "GeoFilterActions", "HeaderAction", - "HeaderActionParametersTypeName", "HealthProbeRequestType", - "HostNameMatchConditionParametersTypeName", "HostNameOperator", - "HttpVersionMatchConditionParametersTypeName", "HttpVersionOperator", "HttpsRedirect", - "IdentityType", - "IsDeviceMatchConditionParametersMatchValuesItem", - "IsDeviceMatchConditionParametersTypeName", + "IsDeviceMatchValue", "IsDeviceOperator", - "KeyVaultCertificateSourceParametersTypeName", - "KeyVaultSigningKeyParametersTypeName", + "KeyVaultSigningKeyParametersType", "LinkToDefaultDomain", "LogMetric", "LogMetricsGranularity", @@ -728,7 +725,7 @@ "MinimumTlsVersion", "Operator", "OptimizationType", - "OriginGroupOverrideActionParametersTypeName", + "OriginAuthenticationType", "OriginGroupProvisioningState", "OriginGroupResourceState", "OriginProvisioningState", @@ -738,7 +735,6 @@ "PolicyMode", "PolicyResourceState", "PolicySettingsDefaultCustomBlockResponseStatusCode", - "PostArgsMatchConditionParametersTypeName", "PostArgsOperator", "PrivateEndpointStatus", "ProbeProtocol", @@ -749,27 +745,19 @@ "ProvisioningState", "QueryStringBehavior", "QueryStringCachingBehavior", - "QueryStringMatchConditionParametersTypeName", "QueryStringOperator", "RedirectType", - "RemoteAddressMatchConditionParametersTypeName", "RemoteAddressOperator", - "RequestBodyMatchConditionParametersTypeName", "RequestBodyOperator", - "RequestHeaderMatchConditionParametersTypeName", "RequestHeaderOperator", - "RequestMethodMatchConditionParametersMatchValuesItem", - "RequestMethodMatchConditionParametersTypeName", + "RequestMethodMatchValue", "RequestMethodOperator", - "RequestSchemeMatchConditionParametersMatchValuesItem", "RequestSchemeMatchConditionParametersOperator", - "RequestSchemeMatchConditionParametersTypeName", - "RequestUriMatchConditionParametersTypeName", + "RequestSchemeMatchValue", "RequestUriOperator", "ResourceType", "ResourceUsageUnit", "ResponseBasedDetectedErrorTypes", - "RouteConfigurationOverrideActionParametersTypeName", "RuleCacheBehavior", "RuleIsCompressionEnabled", "RuleQueryStringCachingBehavior", @@ -778,28 +766,19 @@ "ScrubbingRuleEntryState", "SecretType", "SecurityPolicyType", - "ServerPortMatchConditionParametersTypeName", "ServerPortOperator", "SharedPrivateLinkResourceStatus", "SkuName", - "SocketAddrMatchConditionParametersTypeName", "SocketAddrOperator", "SslProtocol", - "SslProtocolMatchConditionParametersTypeName", "SslProtocolOperator", "Status", "Transform", "TransformType", "UpdateRule", - "UrlFileExtensionMatchConditionParametersTypeName", "UrlFileExtensionOperator", - "UrlFileNameMatchConditionParametersTypeName", "UrlFileNameOperator", - "UrlPathMatchConditionParametersTypeName", "UrlPathOperator", - "UrlRedirectActionParametersTypeName", - "UrlRewriteActionParametersTypeName", - "UrlSigningActionParametersTypeName", "UsageUnit", "WafAction", "WafGranularity", @@ -811,5 +790,5 @@ "WafRankingType", "WafRuleType", ] -__all__.extend([p for p in _patch_all if p not in __all__]) +__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/_cdn_management_client_enums.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/_cdn_management_client_enums.py index d0164f2b6f7b..23b9403b07e0 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/_cdn_management_client_enums.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/_cdn_management_client_enums.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -27,6 +28,33 @@ class AfdCertificateType(str, Enum, metaclass=CaseInsensitiveEnumMeta): AZURE_FIRST_PARTY_MANAGED_CERTIFICATE = "AzureFirstPartyManagedCertificate" +class AfdCipherSuiteSetType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """cipher suite set type that will be used for Https.""" + + CUSTOMIZED = "Customized" + TLS10_2019 = "TLS10_2019" + TLS12_2022 = "TLS12_2022" + TLS12_2023 = "TLS12_2023" + + +class AfdCustomizedCipherSuiteForTls12(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """AfdCustomizedCipherSuiteForTls12.""" + + ECDHE_RSA_AES128_GCM_SHA256 = "ECDHE_RSA_AES128_GCM_SHA256" + ECDHE_RSA_AES256_GCM_SHA384 = "ECDHE_RSA_AES256_GCM_SHA384" + DHE_RSA_AES256_GCM_SHA384 = "DHE_RSA_AES256_GCM_SHA384" + DHE_RSA_AES128_GCM_SHA256 = "DHE_RSA_AES128_GCM_SHA256" + ECDHE_RSA_AES128_SHA256 = "ECDHE_RSA_AES128_SHA256" + ECDHE_RSA_AES256_SHA384 = "ECDHE_RSA_AES256_SHA384" + + +class AfdCustomizedCipherSuiteForTls13(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """AfdCustomizedCipherSuiteForTls13.""" + + TLS_AES128_GCM_SHA256 = "TLS_AES_128_GCM_SHA256" + TLS_AES256_GCM_SHA384 = "TLS_AES_256_GCM_SHA384" + + class AFDEndpointProtocols(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Supported protocols for the customer's endpoint.""" @@ -35,10 +63,11 @@ class AFDEndpointProtocols(str, Enum, metaclass=CaseInsensitiveEnumMeta): class AfdMinimumTlsVersion(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """TLS protocol version that will be used for Https.""" + """TLS protocol version that will be used for Https when cipherSuiteSetType is Customized.""" TLS10 = "TLS10" TLS12 = "TLS12" + TLS13 = "TLS13" class AfdProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -86,20 +115,6 @@ class CacheBehavior(str, Enum, metaclass=CaseInsensitiveEnumMeta): SET_IF_MISSING = "SetIfMissing" -class CacheExpirationActionParametersTypeName(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """CacheExpirationActionParametersTypeName.""" - - DELIVERY_RULE_CACHE_EXPIRATION_ACTION_PARAMETERS = "DeliveryRuleCacheExpirationActionParameters" - - -class CacheKeyQueryStringActionParametersTypeName(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """CacheKeyQueryStringActionParametersTypeName.""" - - DELIVERY_RULE_CACHE_KEY_QUERY_STRING_BEHAVIOR_ACTION_PARAMETERS = ( - "DeliveryRuleCacheKeyQueryStringBehaviorActionParameters" - ) - - class CacheType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The level at which the content needs to be cached.""" @@ -113,12 +128,6 @@ class CanMigrateDefaultSku(str, Enum, metaclass=CaseInsensitiveEnumMeta): PREMIUM_AZURE_FRONT_DOOR = "Premium_AzureFrontDoor" -class CdnCertificateSourceParametersTypeName(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """CdnCertificateSourceParametersTypeName.""" - - CDN_CERTIFICATE_SOURCE_PARAMETERS = "CdnCertificateSourceParameters" - - class CertificateSource(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Defines the source of the SSL certificate.""" @@ -126,6 +135,13 @@ class CertificateSource(str, Enum, metaclass=CaseInsensitiveEnumMeta): CDN = "Cdn" +class CertificateSourceParametersType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """CertificateSourceParametersType.""" + + CDN_CERTIFICATE_SOURCE_PARAMETERS = "CdnCertificateSourceParameters" + KEY_VAULT_CERTIFICATE_SOURCE_PARAMETERS = "KeyVaultCertificateSourceParameters" + + class CertificateType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Type of certificate used.""" @@ -133,12 +149,6 @@ class CertificateType(str, Enum, metaclass=CaseInsensitiveEnumMeta): DEDICATED = "Dedicated" -class ClientPortMatchConditionParametersTypeName(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """ClientPortMatchConditionParametersTypeName.""" - - DELIVERY_RULE_CLIENT_PORT_CONDITION_PARAMETERS = "DeliveryRuleClientPortConditionParameters" - - class ClientPortOperator(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Describes operator to be matched.""" @@ -154,12 +164,6 @@ class ClientPortOperator(str, Enum, metaclass=CaseInsensitiveEnumMeta): REG_EX = "RegEx" -class CookiesMatchConditionParametersTypeName(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """CookiesMatchConditionParametersTypeName.""" - - DELIVERY_RULE_COOKIES_CONDITION_PARAMETERS = "DeliveryRuleCookiesConditionParameters" - - class CookiesOperator(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Describes operator to be matched.""" @@ -175,6 +179,15 @@ class CookiesOperator(str, Enum, metaclass=CaseInsensitiveEnumMeta): REG_EX = "RegEx" +class CreatedByType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The type of identity that created the resource.""" + + USER = "User" + APPLICATION = "Application" + MANAGED_IDENTITY = "ManagedIdentity" + KEY = "Key" + + class CustomDomainResourceState(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Resource status of the custom domain.""" @@ -239,6 +252,47 @@ class DeliveryRuleActionEnum(str, Enum, metaclass=CaseInsensitiveEnumMeta): ROUTE_CONFIGURATION_OVERRIDE = "RouteConfigurationOverride" +class DeliveryRuleActionParametersType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """DeliveryRuleActionParametersType.""" + + DELIVERY_RULE_URL_REDIRECT_ACTION_PARAMETERS = "DeliveryRuleUrlRedirectActionParameters" + DELIVERY_RULE_URL_SIGNING_ACTION_PARAMETERS = "DeliveryRuleUrlSigningActionParameters" + DELIVERY_RULE_ORIGIN_GROUP_OVERRIDE_ACTION_PARAMETERS = "DeliveryRuleOriginGroupOverrideActionParameters" + DELIVERY_RULE_URL_REWRITE_ACTION_PARAMETERS = "DeliveryRuleUrlRewriteActionParameters" + DELIVERY_RULE_HEADER_ACTION_PARAMETERS = "DeliveryRuleHeaderActionParameters" + DELIVERY_RULE_CACHE_EXPIRATION_ACTION_PARAMETERS = "DeliveryRuleCacheExpirationActionParameters" + DELIVERY_RULE_CACHE_KEY_QUERY_STRING_BEHAVIOR_ACTION_PARAMETERS = ( + "DeliveryRuleCacheKeyQueryStringBehaviorActionParameters" + ) + DELIVERY_RULE_ROUTE_CONFIGURATION_OVERRIDE_ACTION_PARAMETERS = ( + "DeliveryRuleRouteConfigurationOverrideActionParameters" + ) + + +class DeliveryRuleConditionParametersType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """DeliveryRuleConditionParametersType.""" + + DELIVERY_RULE_REMOTE_ADDRESS_CONDITION_PARAMETERS = "DeliveryRuleRemoteAddressConditionParameters" + DELIVERY_RULE_REQUEST_METHOD_CONDITION_PARAMETERS = "DeliveryRuleRequestMethodConditionParameters" + DELIVERY_RULE_QUERY_STRING_CONDITION_PARAMETERS = "DeliveryRuleQueryStringConditionParameters" + DELIVERY_RULE_POST_ARGS_CONDITION_PARAMETERS = "DeliveryRulePostArgsConditionParameters" + DELIVERY_RULE_REQUEST_URI_CONDITION_PARAMETERS = "DeliveryRuleRequestUriConditionParameters" + DELIVERY_RULE_REQUEST_HEADER_CONDITION_PARAMETERS = "DeliveryRuleRequestHeaderConditionParameters" + DELIVERY_RULE_REQUEST_BODY_CONDITION_PARAMETERS = "DeliveryRuleRequestBodyConditionParameters" + DELIVERY_RULE_REQUEST_SCHEME_CONDITION_PARAMETERS = "DeliveryRuleRequestSchemeConditionParameters" + DELIVERY_RULE_URL_PATH_MATCH_CONDITION_PARAMETERS = "DeliveryRuleUrlPathMatchConditionParameters" + DELIVERY_RULE_URL_FILE_EXTENSION_MATCH_CONDITION_PARAMETERS = "DeliveryRuleUrlFileExtensionMatchConditionParameters" + DELIVERY_RULE_URL_FILENAME_CONDITION_PARAMETERS = "DeliveryRuleUrlFilenameConditionParameters" + DELIVERY_RULE_HTTP_VERSION_CONDITION_PARAMETERS = "DeliveryRuleHttpVersionConditionParameters" + DELIVERY_RULE_COOKIES_CONDITION_PARAMETERS = "DeliveryRuleCookiesConditionParameters" + DELIVERY_RULE_IS_DEVICE_CONDITION_PARAMETERS = "DeliveryRuleIsDeviceConditionParameters" + DELIVERY_RULE_SOCKET_ADDR_CONDITION_PARAMETERS = "DeliveryRuleSocketAddrConditionParameters" + DELIVERY_RULE_CLIENT_PORT_CONDITION_PARAMETERS = "DeliveryRuleClientPortConditionParameters" + DELIVERY_RULE_SERVER_PORT_CONDITION_PARAMETERS = "DeliveryRuleServerPortConditionParameters" + DELIVERY_RULE_HOST_NAME_CONDITION_PARAMETERS = "DeliveryRuleHostNameConditionParameters" + DELIVERY_RULE_SSL_PROTOCOL_CONDITION_PARAMETERS = "DeliveryRuleSslProtocolConditionParameters" + + class DeploymentStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): """DeploymentStatus.""" @@ -323,12 +377,6 @@ class HeaderAction(str, Enum, metaclass=CaseInsensitiveEnumMeta): DELETE = "Delete" -class HeaderActionParametersTypeName(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """HeaderActionParametersTypeName.""" - - DELIVERY_RULE_HEADER_ACTION_PARAMETERS = "DeliveryRuleHeaderActionParameters" - - class HealthProbeRequestType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The type of health probe request that is made.""" @@ -337,12 +385,6 @@ class HealthProbeRequestType(str, Enum, metaclass=CaseInsensitiveEnumMeta): HEAD = "HEAD" -class HostNameMatchConditionParametersTypeName(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """HostNameMatchConditionParametersTypeName.""" - - DELIVERY_RULE_HOST_NAME_CONDITION_PARAMETERS = "DeliveryRuleHostNameConditionParameters" - - class HostNameOperator(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Describes operator to be matched.""" @@ -367,54 +409,27 @@ class HttpsRedirect(str, Enum, metaclass=CaseInsensitiveEnumMeta): DISABLED = "Disabled" -class HttpVersionMatchConditionParametersTypeName(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """HttpVersionMatchConditionParametersTypeName.""" - - DELIVERY_RULE_HTTP_VERSION_CONDITION_PARAMETERS = "DeliveryRuleHttpVersionConditionParameters" - - class HttpVersionOperator(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Describes operator to be matched.""" EQUAL = "Equal" -class IdentityType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """The type of identity that creates/modifies resources.""" - - USER = "user" - APPLICATION = "application" - MANAGED_IDENTITY = "managedIdentity" - KEY = "key" - - -class IsDeviceMatchConditionParametersMatchValuesItem(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """IsDeviceMatchConditionParametersMatchValuesItem.""" +class IsDeviceMatchValue(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """IsDeviceMatchValue.""" MOBILE = "Mobile" DESKTOP = "Desktop" -class IsDeviceMatchConditionParametersTypeName(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """IsDeviceMatchConditionParametersTypeName.""" - - DELIVERY_RULE_IS_DEVICE_CONDITION_PARAMETERS = "DeliveryRuleIsDeviceConditionParameters" - - class IsDeviceOperator(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Describes operator to be matched.""" EQUAL = "Equal" -class KeyVaultCertificateSourceParametersTypeName(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """KeyVaultCertificateSourceParametersTypeName.""" - - KEY_VAULT_CERTIFICATE_SOURCE_PARAMETERS = "KeyVaultCertificateSourceParameters" - - -class KeyVaultSigningKeyParametersTypeName(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """KeyVaultSigningKeyParametersTypeName.""" +class KeyVaultSigningKeyParametersType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """KeyVaultSigningKeyParametersType.""" KEY_VAULT_SIGNING_KEY_PARAMETERS = "KeyVaultSigningKeyParameters" @@ -493,7 +508,7 @@ class ManagedServiceIdentityType(str, Enum, metaclass=CaseInsensitiveEnumMeta): NONE = "None" SYSTEM_ASSIGNED = "SystemAssigned" USER_ASSIGNED = "UserAssigned" - SYSTEM_ASSIGNED_USER_ASSIGNED = "SystemAssigned, UserAssigned" + SYSTEM_ASSIGNED_USER_ASSIGNED = "SystemAssigned,UserAssigned" class MatchProcessingBehavior(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -501,7 +516,7 @@ class MatchProcessingBehavior(str, Enum, metaclass=CaseInsensitiveEnumMeta): If not present, defaults to Continue. """ - CONTINUE_ENUM = "Continue" + CONTINUE = "Continue" STOP = "Stop" @@ -583,10 +598,11 @@ class OptimizationType(str, Enum, metaclass=CaseInsensitiveEnumMeta): DYNAMIC_SITE_ACCELERATION = "DynamicSiteAcceleration" -class OriginGroupOverrideActionParametersTypeName(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """OriginGroupOverrideActionParametersTypeName.""" +class OriginAuthenticationType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The type of the authentication for the origin.""" - DELIVERY_RULE_ORIGIN_GROUP_OVERRIDE_ACTION_PARAMETERS = "DeliveryRuleOriginGroupOverrideActionParameters" + SYSTEM_ASSIGNED_IDENTITY = "SystemAssignedIdentity" + USER_ASSIGNED_IDENTITY = "UserAssignedIdentity" class OriginGroupProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -658,7 +674,9 @@ class PolicyResourceState(str, Enum, metaclass=CaseInsensitiveEnumMeta): DELETING = "Deleting" -class PolicySettingsDefaultCustomBlockResponseStatusCode(int, Enum, metaclass=CaseInsensitiveEnumMeta): +class PolicySettingsDefaultCustomBlockResponseStatusCode( # pylint: disable=name-too-long + int, Enum, metaclass=CaseInsensitiveEnumMeta +): """If the action type is block, this field defines the default customer overridable http response status code. """ @@ -670,12 +688,6 @@ class PolicySettingsDefaultCustomBlockResponseStatusCode(int, Enum, metaclass=Ca FOUR_HUNDRED_TWENTY_NINE = 429 -class PostArgsMatchConditionParametersTypeName(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """PostArgsMatchConditionParametersTypeName.""" - - DELIVERY_RULE_POST_ARGS_CONDITION_PARAMETERS = "DeliveryRulePostArgsConditionParameters" - - class PostArgsOperator(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Describes operator to be matched.""" @@ -776,12 +788,6 @@ class QueryStringCachingBehavior(str, Enum, metaclass=CaseInsensitiveEnumMeta): NOT_SET = "NotSet" -class QueryStringMatchConditionParametersTypeName(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """QueryStringMatchConditionParametersTypeName.""" - - DELIVERY_RULE_QUERY_STRING_CONDITION_PARAMETERS = "DeliveryRuleQueryStringConditionParameters" - - class QueryStringOperator(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Describes operator to be matched.""" @@ -806,12 +812,6 @@ class RedirectType(str, Enum, metaclass=CaseInsensitiveEnumMeta): PERMANENT_REDIRECT = "PermanentRedirect" -class RemoteAddressMatchConditionParametersTypeName(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """RemoteAddressMatchConditionParametersTypeName.""" - - DELIVERY_RULE_REMOTE_ADDRESS_CONDITION_PARAMETERS = "DeliveryRuleRemoteAddressConditionParameters" - - class RemoteAddressOperator(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Describes operator to be matched.""" @@ -820,12 +820,6 @@ class RemoteAddressOperator(str, Enum, metaclass=CaseInsensitiveEnumMeta): GEO_MATCH = "GeoMatch" -class RequestBodyMatchConditionParametersTypeName(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """RequestBodyMatchConditionParametersTypeName.""" - - DELIVERY_RULE_REQUEST_BODY_CONDITION_PARAMETERS = "DeliveryRuleRequestBodyConditionParameters" - - class RequestBodyOperator(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Describes operator to be matched.""" @@ -841,12 +835,6 @@ class RequestBodyOperator(str, Enum, metaclass=CaseInsensitiveEnumMeta): REG_EX = "RegEx" -class RequestHeaderMatchConditionParametersTypeName(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """RequestHeaderMatchConditionParametersTypeName.""" - - DELIVERY_RULE_REQUEST_HEADER_CONDITION_PARAMETERS = "DeliveryRuleRequestHeaderConditionParameters" - - class RequestHeaderOperator(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Describes operator to be matched.""" @@ -862,8 +850,8 @@ class RequestHeaderOperator(str, Enum, metaclass=CaseInsensitiveEnumMeta): REG_EX = "RegEx" -class RequestMethodMatchConditionParametersMatchValuesItem(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """RequestMethodMatchConditionParametersMatchValuesItem.""" +class RequestMethodMatchValue(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """RequestMethodMatchValue.""" GET = "GET" HEAD = "HEAD" @@ -874,41 +862,25 @@ class RequestMethodMatchConditionParametersMatchValuesItem(str, Enum, metaclass= TRACE = "TRACE" -class RequestMethodMatchConditionParametersTypeName(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """RequestMethodMatchConditionParametersTypeName.""" - - DELIVERY_RULE_REQUEST_METHOD_CONDITION_PARAMETERS = "DeliveryRuleRequestMethodConditionParameters" - - class RequestMethodOperator(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Describes operator to be matched.""" EQUAL = "Equal" -class RequestSchemeMatchConditionParametersMatchValuesItem(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """RequestSchemeMatchConditionParametersMatchValuesItem.""" - - HTTP = "HTTP" - HTTPS = "HTTPS" - - -class RequestSchemeMatchConditionParametersOperator(str, Enum, metaclass=CaseInsensitiveEnumMeta): +class RequestSchemeMatchConditionParametersOperator( # pylint: disable=name-too-long + str, Enum, metaclass=CaseInsensitiveEnumMeta +): """Describes operator to be matched.""" EQUAL = "Equal" -class RequestSchemeMatchConditionParametersTypeName(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """RequestSchemeMatchConditionParametersTypeName.""" +class RequestSchemeMatchValue(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """RequestSchemeMatchValue.""" - DELIVERY_RULE_REQUEST_SCHEME_CONDITION_PARAMETERS = "DeliveryRuleRequestSchemeConditionParameters" - - -class RequestUriMatchConditionParametersTypeName(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """RequestUriMatchConditionParametersTypeName.""" - - DELIVERY_RULE_REQUEST_URI_CONDITION_PARAMETERS = "DeliveryRuleRequestUriConditionParameters" + HTTP = "HTTP" + HTTPS = "HTTPS" class RequestUriOperator(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -947,14 +919,6 @@ class ResponseBasedDetectedErrorTypes(str, Enum, metaclass=CaseInsensitiveEnumMe TCP_AND_HTTP_ERRORS = "TcpAndHttpErrors" -class RouteConfigurationOverrideActionParametersTypeName(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """RouteConfigurationOverrideActionParametersTypeName.""" - - DELIVERY_RULE_ROUTE_CONFIGURATION_OVERRIDE_ACTION_PARAMETERS = ( - "DeliveryRuleRouteConfigurationOverrideActionParameters" - ) - - class RuleCacheBehavior(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Caching behavior for the requests.""" @@ -1023,12 +987,6 @@ class SecurityPolicyType(str, Enum, metaclass=CaseInsensitiveEnumMeta): WEB_APPLICATION_FIREWALL = "WebApplicationFirewall" -class ServerPortMatchConditionParametersTypeName(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """ServerPortMatchConditionParametersTypeName.""" - - DELIVERY_RULE_SERVER_PORT_CONDITION_PARAMETERS = "DeliveryRuleServerPortConditionParameters" - - class ServerPortOperator(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Describes operator to be matched.""" @@ -1074,12 +1032,6 @@ class SkuName(str, Enum, metaclass=CaseInsensitiveEnumMeta): STANDARD_PLUS_AVG_BAND_WIDTH_CHINA_CDN = "StandardPlus_AvgBandWidth_ChinaCdn" -class SocketAddrMatchConditionParametersTypeName(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """SocketAddrMatchConditionParametersTypeName.""" - - DELIVERY_RULE_SOCKET_ADDR_CONDITION_PARAMETERS = "DeliveryRuleSocketAddrConditionParameters" - - class SocketAddrOperator(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Describes operator to be matched.""" @@ -1095,12 +1047,6 @@ class SslProtocol(str, Enum, metaclass=CaseInsensitiveEnumMeta): TL_SV1_2 = "TLSv1.2" -class SslProtocolMatchConditionParametersTypeName(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """SslProtocolMatchConditionParametersTypeName.""" - - DELIVERY_RULE_SSL_PROTOCOL_CONDITION_PARAMETERS = "DeliveryRuleSslProtocolConditionParameters" - - class SslProtocolOperator(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Describes operator to be matched.""" @@ -1144,12 +1090,6 @@ class UpdateRule(str, Enum, metaclass=CaseInsensitiveEnumMeta): NO_ACTION = "NoAction" -class UrlFileExtensionMatchConditionParametersTypeName(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """UrlFileExtensionMatchConditionParametersTypeName.""" - - DELIVERY_RULE_URL_FILE_EXTENSION_MATCH_CONDITION_PARAMETERS = "DeliveryRuleUrlFileExtensionMatchConditionParameters" - - class UrlFileExtensionOperator(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Describes operator to be matched.""" @@ -1165,12 +1105,6 @@ class UrlFileExtensionOperator(str, Enum, metaclass=CaseInsensitiveEnumMeta): REG_EX = "RegEx" -class UrlFileNameMatchConditionParametersTypeName(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """UrlFileNameMatchConditionParametersTypeName.""" - - DELIVERY_RULE_URL_FILENAME_CONDITION_PARAMETERS = "DeliveryRuleUrlFilenameConditionParameters" - - class UrlFileNameOperator(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Describes operator to be matched.""" @@ -1186,12 +1120,6 @@ class UrlFileNameOperator(str, Enum, metaclass=CaseInsensitiveEnumMeta): REG_EX = "RegEx" -class UrlPathMatchConditionParametersTypeName(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """UrlPathMatchConditionParametersTypeName.""" - - DELIVERY_RULE_URL_PATH_MATCH_CONDITION_PARAMETERS = "DeliveryRuleUrlPathMatchConditionParameters" - - class UrlPathOperator(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Describes operator to be matched.""" @@ -1208,24 +1136,6 @@ class UrlPathOperator(str, Enum, metaclass=CaseInsensitiveEnumMeta): REG_EX = "RegEx" -class UrlRedirectActionParametersTypeName(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """UrlRedirectActionParametersTypeName.""" - - DELIVERY_RULE_URL_REDIRECT_ACTION_PARAMETERS = "DeliveryRuleUrlRedirectActionParameters" - - -class UrlRewriteActionParametersTypeName(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """UrlRewriteActionParametersTypeName.""" - - DELIVERY_RULE_URL_REWRITE_ACTION_PARAMETERS = "DeliveryRuleUrlRewriteActionParameters" - - -class UrlSigningActionParametersTypeName(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """UrlSigningActionParametersTypeName.""" - - DELIVERY_RULE_URL_SIGNING_ACTION_PARAMETERS = "DeliveryRuleUrlSigningActionParameters" - - class UsageUnit(str, Enum, metaclass=CaseInsensitiveEnumMeta): """An enum describing the unit of measurement.""" diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/_models_py3.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/_models_py3.py index e5fd01153680..8d35ab0376bd 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/_models_py3.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/_models_py3.py @@ -1,5 +1,5 @@ +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. @@ -7,14 +7,15 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping import datetime -from typing import Any, Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Optional, TYPE_CHECKING, Union -from .. import _serialization +from .._utils import serialization as _serialization if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import models as _models +JSON = MutableMapping[str, Any] class ActivatedResourceReference(_serialization.Model): @@ -44,21 +45,24 @@ def __init__(self, *, id: Optional[str] = None, **kwargs: Any) -> None: # pylin """ super().__init__(**kwargs) self.id = id - self.is_active = None + self.is_active: Optional[bool] = None class Resource(_serialization.Model): - """The core properties of ARM resources. + """Common fields that are returned in the response for all Azure Resource Manager resources. Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Resource ID. + :ivar id: Fully qualified resource ID for the resource. E.g. + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". :vartype id: str - :ivar name: Resource name. + :ivar name: The name of the resource. :vartype name: str - :ivar type: Resource type. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str - :ivar system_data: Read only system data. + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. :vartype system_data: ~azure.mgmt.cdn.models.SystemData """ @@ -79,42 +83,48 @@ class Resource(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.system_data = None + self.id: Optional[str] = None + self.name: Optional[str] = None + self.type: Optional[str] = None + self.system_data: Optional["_models.SystemData"] = None class ProxyResource(Resource): - """The resource model definition for a ARM proxy resource. It will have everything other than - required location and tags. + """The resource model definition for a Azure Resource Manager proxy resource. It will not have + tags and a location. Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Resource ID. + :ivar id: Fully qualified resource ID for the resource. E.g. + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". :vartype id: str - :ivar name: Resource name. + :ivar name: The name of the resource. :vartype name: str - :ivar type: Resource type. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str - :ivar system_data: Read only system data. + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. :vartype system_data: ~azure.mgmt.cdn.models.SystemData """ -class AFDDomain(ProxyResource): # pylint: disable=too-many-instance-attributes +class AFDDomain(ProxyResource): """Friendly domain name mapping to the endpoint hostname that the customer provides for branding purposes, e.g. www.contoso.com. Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Resource ID. + :ivar id: Fully qualified resource ID for the resource. E.g. + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". :vartype id: str - :ivar name: Resource name. + :ivar name: The name of the resource. :vartype name: str - :ivar type: Resource type. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str - :ivar system_data: Read only system data. + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. :vartype system_data: ~azure.mgmt.cdn.models.SystemData :ivar profile_name: The name of the profile which holds the domain. :vartype profile_name: str @@ -185,7 +195,7 @@ def __init__( azure_dns_zone: Optional["_models.ResourceReference"] = None, pre_validated_custom_domain_resource_id: Optional["_models.ResourceReference"] = None, host_name: Optional[str] = None, - extended_properties: Optional[Dict[str, str]] = None, + extended_properties: Optional[dict[str, str]] = None, **kwargs: Any ) -> None: """ @@ -204,16 +214,57 @@ def __init__( :paramtype extended_properties: dict[str, str] """ super().__init__(**kwargs) - self.profile_name = None + self.profile_name: Optional[str] = None self.tls_settings = tls_settings self.azure_dns_zone = azure_dns_zone self.pre_validated_custom_domain_resource_id = pre_validated_custom_domain_resource_id - self.provisioning_state = None - self.deployment_status = None - self.domain_validation_state = None + self.provisioning_state: Optional[Union[str, "_models.AfdProvisioningState"]] = None + self.deployment_status: Optional[Union[str, "_models.DeploymentStatus"]] = None + self.domain_validation_state: Optional[Union[str, "_models.DomainValidationState"]] = None self.host_name = host_name self.extended_properties = extended_properties - self.validation_properties = None + self.validation_properties: Optional["_models.DomainValidationProperties"] = None + + +class AFDDomainHttpsCustomizedCipherSuiteSet(_serialization.Model): + """Customized cipher suite set object that will be used for Https when cipherSuiteSetType is + Customized. + + :ivar cipher_suite_set_for_tls12: Cipher suites for TLS 1.2. Required at least one in + minimumTlsVersion TLS 1.2. + :vartype cipher_suite_set_for_tls12: list[str or + ~azure.mgmt.cdn.models.AfdCustomizedCipherSuiteForTls12] + :ivar cipher_suite_set_for_tls13: Cipher suites for TLS 1.3. Required at least one in + minimumTlsVersion TLS 1.2, TLS 1.3. + :vartype cipher_suite_set_for_tls13: list[str or + ~azure.mgmt.cdn.models.AfdCustomizedCipherSuiteForTls13] + """ + + _attribute_map = { + "cipher_suite_set_for_tls12": {"key": "cipherSuiteSetForTls12", "type": "[str]"}, + "cipher_suite_set_for_tls13": {"key": "cipherSuiteSetForTls13", "type": "[str]"}, + } + + def __init__( + self, + *, + cipher_suite_set_for_tls12: Optional[list[Union[str, "_models.AfdCustomizedCipherSuiteForTls12"]]] = None, + cipher_suite_set_for_tls13: Optional[list[Union[str, "_models.AfdCustomizedCipherSuiteForTls13"]]] = None, + **kwargs: Any + ) -> None: + """ + :keyword cipher_suite_set_for_tls12: Cipher suites for TLS 1.2. Required at least one in + minimumTlsVersion TLS 1.2. + :paramtype cipher_suite_set_for_tls12: list[str or + ~azure.mgmt.cdn.models.AfdCustomizedCipherSuiteForTls12] + :keyword cipher_suite_set_for_tls13: Cipher suites for TLS 1.3. Required at least one in + minimumTlsVersion TLS 1.2, TLS 1.3. + :paramtype cipher_suite_set_for_tls13: list[str or + ~azure.mgmt.cdn.models.AfdCustomizedCipherSuiteForTls13] + """ + super().__init__(**kwargs) + self.cipher_suite_set_for_tls12 = cipher_suite_set_for_tls12 + self.cipher_suite_set_for_tls13 = cipher_suite_set_for_tls13 class AFDDomainHttpsParameters(_serialization.Model): @@ -224,9 +275,16 @@ class AFDDomainHttpsParameters(_serialization.Model): :ivar certificate_type: Defines the source of the SSL certificate. Required. Known values are: "CustomerCertificate", "ManagedCertificate", and "AzureFirstPartyManagedCertificate". :vartype certificate_type: str or ~azure.mgmt.cdn.models.AfdCertificateType - :ivar minimum_tls_version: TLS protocol version that will be used for Https. Known values are: - "TLS10" and "TLS12". + :ivar cipher_suite_set_type: cipher suite set type that will be used for Https. Known values + are: "Customized", "TLS10_2019", "TLS12_2022", and "TLS12_2023". + :vartype cipher_suite_set_type: str or ~azure.mgmt.cdn.models.AfdCipherSuiteSetType + :ivar minimum_tls_version: TLS protocol version that will be used for Https when + cipherSuiteSetType is Customized. Known values are: "TLS10", "TLS12", and "TLS13". :vartype minimum_tls_version: str or ~azure.mgmt.cdn.models.AfdMinimumTlsVersion + :ivar customized_cipher_suite_set: Customized cipher suites object that will be used for Https + when cipherSuiteSetType is Customized. + :vartype customized_cipher_suite_set: + ~azure.mgmt.cdn.models.AFDDomainHttpsCustomizedCipherSuiteSet :ivar secret: Resource reference to the secret. ie. subs/rg/profile/secret. :vartype secret: ~azure.mgmt.cdn.models.ResourceReference """ @@ -237,7 +295,12 @@ class AFDDomainHttpsParameters(_serialization.Model): _attribute_map = { "certificate_type": {"key": "certificateType", "type": "str"}, + "cipher_suite_set_type": {"key": "cipherSuiteSetType", "type": "str"}, "minimum_tls_version": {"key": "minimumTlsVersion", "type": "str"}, + "customized_cipher_suite_set": { + "key": "customizedCipherSuiteSet", + "type": "AFDDomainHttpsCustomizedCipherSuiteSet", + }, "secret": {"key": "secret", "type": "ResourceReference"}, } @@ -245,7 +308,9 @@ def __init__( self, *, certificate_type: Union[str, "_models.AfdCertificateType"], + cipher_suite_set_type: Optional[Union[str, "_models.AfdCipherSuiteSetType"]] = None, minimum_tls_version: Optional[Union[str, "_models.AfdMinimumTlsVersion"]] = None, + customized_cipher_suite_set: Optional["_models.AFDDomainHttpsCustomizedCipherSuiteSet"] = None, secret: Optional["_models.ResourceReference"] = None, **kwargs: Any ) -> None: @@ -253,15 +318,24 @@ def __init__( :keyword certificate_type: Defines the source of the SSL certificate. Required. Known values are: "CustomerCertificate", "ManagedCertificate", and "AzureFirstPartyManagedCertificate". :paramtype certificate_type: str or ~azure.mgmt.cdn.models.AfdCertificateType - :keyword minimum_tls_version: TLS protocol version that will be used for Https. Known values - are: "TLS10" and "TLS12". + :keyword cipher_suite_set_type: cipher suite set type that will be used for Https. Known values + are: "Customized", "TLS10_2019", "TLS12_2022", and "TLS12_2023". + :paramtype cipher_suite_set_type: str or ~azure.mgmt.cdn.models.AfdCipherSuiteSetType + :keyword minimum_tls_version: TLS protocol version that will be used for Https when + cipherSuiteSetType is Customized. Known values are: "TLS10", "TLS12", and "TLS13". :paramtype minimum_tls_version: str or ~azure.mgmt.cdn.models.AfdMinimumTlsVersion + :keyword customized_cipher_suite_set: Customized cipher suites object that will be used for + Https when cipherSuiteSetType is Customized. + :paramtype customized_cipher_suite_set: + ~azure.mgmt.cdn.models.AFDDomainHttpsCustomizedCipherSuiteSet :keyword secret: Resource reference to the secret. ie. subs/rg/profile/secret. :paramtype secret: ~azure.mgmt.cdn.models.ResourceReference """ super().__init__(**kwargs) self.certificate_type = certificate_type + self.cipher_suite_set_type = cipher_suite_set_type self.minimum_tls_version = minimum_tls_version + self.customized_cipher_suite_set = customized_cipher_suite_set self.secret = secret @@ -292,7 +366,7 @@ def __init__(self, *, next_link: Optional[str] = None, **kwargs: Any) -> None: :paramtype next_link: str """ super().__init__(**kwargs) - self.value = None + self.value: Optional[list["_models.AFDDomain"]] = None self.next_link = next_link @@ -322,8 +396,8 @@ class AFDStateProperties(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.provisioning_state = None - self.deployment_status = None + self.provisioning_state: Optional[Union[str, "_models.AfdProvisioningState"]] = None + self.deployment_status: Optional[Union[str, "_models.DeploymentStatus"]] = None class AFDDomainUpdatePropertiesParameters(_serialization.Model): @@ -378,7 +452,7 @@ def __init__( :paramtype pre_validated_custom_domain_resource_id: ~azure.mgmt.cdn.models.ResourceReference """ super().__init__(**kwargs) - self.profile_name = None + self.profile_name: Optional[str] = None self.tls_settings = tls_settings self.azure_dns_zone = azure_dns_zone self.pre_validated_custom_domain_resource_id = pre_validated_custom_domain_resource_id @@ -453,7 +527,7 @@ def __init__( tls_settings: Optional["_models.AFDDomainHttpsParameters"] = None, azure_dns_zone: Optional["_models.ResourceReference"] = None, pre_validated_custom_domain_resource_id: Optional["_models.ResourceReference"] = None, - extended_properties: Optional[Dict[str, str]] = None, + extended_properties: Optional[dict[str, str]] = None, **kwargs: Any ) -> None: """ @@ -477,13 +551,13 @@ def __init__( pre_validated_custom_domain_resource_id=pre_validated_custom_domain_resource_id, **kwargs ) - self.provisioning_state = None - self.deployment_status = None - self.domain_validation_state = None + self.provisioning_state: Optional[Union[str, "_models.AfdProvisioningState"]] = None + self.deployment_status: Optional[Union[str, "_models.DeploymentStatus"]] = None + self.domain_validation_state: Optional[Union[str, "_models.DomainValidationState"]] = None self.host_name = host_name self.extended_properties = extended_properties - self.validation_properties = None - self.profile_name = None + self.validation_properties: Optional["_models.DomainValidationProperties"] = None + self.profile_name: Optional[str] = None self.tls_settings = tls_settings self.azure_dns_zone = azure_dns_zone self.pre_validated_custom_domain_resource_id = pre_validated_custom_domain_resource_id @@ -541,31 +615,35 @@ def __init__( :paramtype pre_validated_custom_domain_resource_id: ~azure.mgmt.cdn.models.ResourceReference """ super().__init__(**kwargs) - self.profile_name = None + self.profile_name: Optional[str] = None self.tls_settings = tls_settings self.azure_dns_zone = azure_dns_zone self.pre_validated_custom_domain_resource_id = pre_validated_custom_domain_resource_id class TrackedResource(Resource): - """The resource model definition for a ARM tracked top level resource. + """The resource model definition for an Azure Resource Manager tracked top level resource which + has 'tags' and a 'location'. Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to server. - :ivar id: Resource ID. + :ivar id: Fully qualified resource ID for the resource. E.g. + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". :vartype id: str - :ivar name: Resource name. + :ivar name: The name of the resource. :vartype name: str - :ivar type: Resource type. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str - :ivar system_data: Read only system data. + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. :vartype system_data: ~azure.mgmt.cdn.models.SystemData - :ivar location: Resource location. Required. - :vartype location: str :ivar tags: Resource tags. :vartype tags: dict[str, str] + :ivar location: The geo-location where the resource lives. Required. + :vartype location: str """ _validation = { @@ -581,23 +659,23 @@ class TrackedResource(Resource): "name": {"key": "name", "type": "str"}, "type": {"key": "type", "type": "str"}, "system_data": {"key": "systemData", "type": "SystemData"}, - "location": {"key": "location", "type": "str"}, "tags": {"key": "tags", "type": "{str}"}, + "location": {"key": "location", "type": "str"}, } - def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: + def __init__(self, *, location: str, tags: Optional[dict[str, str]] = None, **kwargs: Any) -> None: """ - :keyword location: Resource location. Required. - :paramtype location: str :keyword tags: Resource tags. :paramtype tags: dict[str, str] + :keyword location: The geo-location where the resource lives. Required. + :paramtype location: str """ super().__init__(**kwargs) - self.location = location self.tags = tags + self.location = location -class AFDEndpoint(TrackedResource): # pylint: disable=too-many-instance-attributes +class AFDEndpoint(TrackedResource): """Azure Front Door endpoint is the entity within a Azure Front Door profile containing configuration information such as origin, protocol, content caching and delivery behavior. The AzureFrontDoor endpoint uses the URL format :code:``.azureedge.net. @@ -606,18 +684,21 @@ class AFDEndpoint(TrackedResource): # pylint: disable=too-many-instance-attribu All required parameters must be populated in order to send to server. - :ivar id: Resource ID. + :ivar id: Fully qualified resource ID for the resource. E.g. + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". :vartype id: str - :ivar name: Resource name. + :ivar name: The name of the resource. :vartype name: str - :ivar type: Resource type. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str - :ivar system_data: Read only system data. + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. :vartype system_data: ~azure.mgmt.cdn.models.SystemData - :ivar location: Resource location. Required. - :vartype location: str :ivar tags: Resource tags. :vartype tags: dict[str, str] + :ivar location: The geo-location where the resource lives. Required. + :vartype location: str :ivar profile_name: The name of the profile which holds the endpoint. :vartype profile_name: str :ivar enabled_state: Whether to enable use of this rule. Permitted values are 'Enabled' or @@ -656,8 +737,8 @@ class AFDEndpoint(TrackedResource): # pylint: disable=too-many-instance-attribu "name": {"key": "name", "type": "str"}, "type": {"key": "type", "type": "str"}, "system_data": {"key": "systemData", "type": "SystemData"}, - "location": {"key": "location", "type": "str"}, "tags": {"key": "tags", "type": "{str}"}, + "location": {"key": "location", "type": "str"}, "profile_name": {"key": "properties.profileName", "type": "str"}, "enabled_state": {"key": "properties.enabledState", "type": "str"}, "provisioning_state": {"key": "properties.provisioningState", "type": "str"}, @@ -673,7 +754,7 @@ def __init__( self, *, location: str, - tags: Optional[Dict[str, str]] = None, + tags: Optional[dict[str, str]] = None, enabled_state: Optional[Union[str, "_models.EnabledState"]] = None, auto_generated_domain_name_label_scope: Optional[ Union[str, "_models.AutoGeneratedDomainNameLabelScope"] @@ -681,10 +762,10 @@ def __init__( **kwargs: Any ) -> None: """ - :keyword location: Resource location. Required. - :paramtype location: str :keyword tags: Resource tags. :paramtype tags: dict[str, str] + :keyword location: The geo-location where the resource lives. Required. + :paramtype location: str :keyword enabled_state: Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled'. Known values are: "Enabled" and "Disabled". :paramtype enabled_state: str or ~azure.mgmt.cdn.models.EnabledState @@ -694,12 +775,12 @@ def __init__( :paramtype auto_generated_domain_name_label_scope: str or ~azure.mgmt.cdn.models.AutoGeneratedDomainNameLabelScope """ - super().__init__(location=location, tags=tags, **kwargs) - self.profile_name = None + super().__init__(tags=tags, location=location, **kwargs) + self.profile_name: Optional[str] = None self.enabled_state = enabled_state - self.provisioning_state = None - self.deployment_status = None - self.host_name = None + self.provisioning_state: Optional[Union[str, "_models.AfdProvisioningState"]] = None + self.deployment_status: Optional[Union[str, "_models.DeploymentStatus"]] = None + self.host_name: Optional[str] = None self.auto_generated_domain_name_label_scope = auto_generated_domain_name_label_scope @@ -730,7 +811,7 @@ def __init__(self, *, next_link: Optional[str] = None, **kwargs: Any) -> None: :paramtype next_link: str """ super().__init__(**kwargs) - self.value = None + self.value: Optional[list["_models.AFDEndpoint"]] = None self.next_link = next_link @@ -762,7 +843,7 @@ def __init__(self, *, enabled_state: Optional[Union[str, "_models.EnabledState"] :paramtype enabled_state: str or ~azure.mgmt.cdn.models.EnabledState """ super().__init__(**kwargs) - self.profile_name = None + self.profile_name: Optional[str] = None self.enabled_state = enabled_state @@ -828,11 +909,11 @@ def __init__( ~azure.mgmt.cdn.models.AutoGeneratedDomainNameLabelScope """ super().__init__(enabled_state=enabled_state, **kwargs) - self.provisioning_state = None - self.deployment_status = None - self.host_name = None + self.provisioning_state: Optional[Union[str, "_models.AfdProvisioningState"]] = None + self.deployment_status: Optional[Union[str, "_models.DeploymentStatus"]] = None + self.host_name: Optional[str] = None self.auto_generated_domain_name_label_scope = auto_generated_domain_name_label_scope - self.profile_name = None + self.profile_name: Optional[str] = None self.enabled_state = enabled_state @@ -863,7 +944,7 @@ class AFDEndpointUpdateParameters(_serialization.Model): def __init__( self, *, - tags: Optional[Dict[str, str]] = None, + tags: Optional[dict[str, str]] = None, enabled_state: Optional[Union[str, "_models.EnabledState"]] = None, **kwargs: Any ) -> None: @@ -876,45 +957,27 @@ def __init__( """ super().__init__(**kwargs) self.tags = tags - self.profile_name = None + self.profile_name: Optional[str] = None self.enabled_state = enabled_state -class AfdErrorResponse(_serialization.Model): - """Common error response for all Azure Resource Manager APIs to return error details for failed - operations. (This also follows the OData error response format.). - - :ivar error: The error object. - :vartype error: ~azure.mgmt.cdn.models.ErrorDetail - """ - - _attribute_map = { - "error": {"key": "error", "type": "ErrorDetail"}, - } - - def __init__(self, *, error: Optional["_models.ErrorDetail"] = None, **kwargs: Any) -> None: - """ - :keyword error: The error object. - :paramtype error: ~azure.mgmt.cdn.models.ErrorDetail - """ - super().__init__(**kwargs) - self.error = error - - -class AFDOrigin(ProxyResource): # pylint: disable=too-many-instance-attributes +class AFDOrigin(ProxyResource): """Azure Front Door origin is the source of the content being delivered via Azure Front Door. When the edge nodes represented by an endpoint do not have the requested content cached, they attempt to fetch it from one or more of the configured origins. Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Resource ID. + :ivar id: Fully qualified resource ID for the resource. E.g. + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". :vartype id: str - :ivar name: Resource name. + :ivar name: The name of the resource. :vartype name: str - :ivar type: Resource type. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str - :ivar system_data: Read only system data. + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. :vartype system_data: ~azure.mgmt.cdn.models.SystemData :ivar origin_group_name: The name of the origin group which contains this origin. :vartype origin_group_name: str @@ -1044,7 +1107,7 @@ def __init__( :paramtype enforce_certificate_name_check: bool """ super().__init__(**kwargs) - self.origin_group_name = None + self.origin_group_name: Optional[str] = None self.azure_origin = azure_origin self.host_name = host_name self.http_port = http_port @@ -1055,23 +1118,26 @@ def __init__( self.shared_private_link_resource = shared_private_link_resource self.enabled_state = enabled_state self.enforce_certificate_name_check = enforce_certificate_name_check - self.provisioning_state = None - self.deployment_status = None + self.provisioning_state: Optional[Union[str, "_models.AfdProvisioningState"]] = None + self.deployment_status: Optional[Union[str, "_models.DeploymentStatus"]] = None -class AFDOriginGroup(ProxyResource): # pylint: disable=too-many-instance-attributes +class AFDOriginGroup(ProxyResource): """AFDOrigin group comprising of origins is used for load balancing to origins when the content cannot be served from Azure Front Door. Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Resource ID. + :ivar id: Fully qualified resource ID for the resource. E.g. + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". :vartype id: str - :ivar name: Resource name. + :ivar name: The name of the resource. :vartype name: str - :ivar type: Resource type. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str - :ivar system_data: Read only system data. + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. :vartype system_data: ~azure.mgmt.cdn.models.SystemData :ivar profile_name: The name of the profile which holds the origin group. :vartype profile_name: str @@ -1087,6 +1153,8 @@ class AFDOriginGroup(ProxyResource): # pylint: disable=too-many-instance-attrib :ivar session_affinity_state: Whether to allow session affinity on this host. Valid options are 'Enabled' or 'Disabled'. Known values are: "Enabled" and "Disabled". :vartype session_affinity_state: str or ~azure.mgmt.cdn.models.EnabledState + :ivar authentication: Authentication settings for origin in origin group. + :vartype authentication: ~azure.mgmt.cdn.models.OriginAuthenticationProperties :ivar provisioning_state: Provisioning status. Known values are: "Succeeded", "Failed", "Updating", "Deleting", and "Creating". :vartype provisioning_state: str or ~azure.mgmt.cdn.models.AfdProvisioningState @@ -1122,6 +1190,7 @@ class AFDOriginGroup(ProxyResource): # pylint: disable=too-many-instance-attrib "type": "int", }, "session_affinity_state": {"key": "properties.sessionAffinityState", "type": "str"}, + "authentication": {"key": "properties.authentication", "type": "OriginAuthenticationProperties"}, "provisioning_state": {"key": "properties.provisioningState", "type": "str"}, "deployment_status": {"key": "properties.deploymentStatus", "type": "str"}, } @@ -1133,6 +1202,7 @@ def __init__( health_probe_settings: Optional["_models.HealthProbeParameters"] = None, traffic_restoration_time_to_healed_or_new_endpoints_in_minutes: Optional[int] = None, session_affinity_state: Optional[Union[str, "_models.EnabledState"]] = None, + authentication: Optional["_models.OriginAuthenticationProperties"] = None, **kwargs: Any ) -> None: """ @@ -1148,17 +1218,20 @@ def __init__( :keyword session_affinity_state: Whether to allow session affinity on this host. Valid options are 'Enabled' or 'Disabled'. Known values are: "Enabled" and "Disabled". :paramtype session_affinity_state: str or ~azure.mgmt.cdn.models.EnabledState + :keyword authentication: Authentication settings for origin in origin group. + :paramtype authentication: ~azure.mgmt.cdn.models.OriginAuthenticationProperties """ super().__init__(**kwargs) - self.profile_name = None + self.profile_name: Optional[str] = None self.load_balancing_settings = load_balancing_settings self.health_probe_settings = health_probe_settings self.traffic_restoration_time_to_healed_or_new_endpoints_in_minutes = ( traffic_restoration_time_to_healed_or_new_endpoints_in_minutes ) self.session_affinity_state = session_affinity_state - self.provisioning_state = None - self.deployment_status = None + self.authentication = authentication + self.provisioning_state: Optional[Union[str, "_models.AfdProvisioningState"]] = None + self.deployment_status: Optional[Union[str, "_models.DeploymentStatus"]] = None class AFDOriginGroupListResult(_serialization.Model): @@ -1188,7 +1261,7 @@ def __init__(self, *, next_link: Optional[str] = None, **kwargs: Any) -> None: :paramtype next_link: str """ super().__init__(**kwargs) - self.value = None + self.value: Optional[list["_models.AFDOriginGroup"]] = None self.next_link = next_link @@ -1211,6 +1284,8 @@ class AFDOriginGroupUpdatePropertiesParameters(_serialization.Model): :ivar session_affinity_state: Whether to allow session affinity on this host. Valid options are 'Enabled' or 'Disabled'. Known values are: "Enabled" and "Disabled". :vartype session_affinity_state: str or ~azure.mgmt.cdn.models.EnabledState + :ivar authentication: Authentication settings for origin in origin group. + :vartype authentication: ~azure.mgmt.cdn.models.OriginAuthenticationProperties """ _validation = { @@ -1227,6 +1302,7 @@ class AFDOriginGroupUpdatePropertiesParameters(_serialization.Model): "type": "int", }, "session_affinity_state": {"key": "sessionAffinityState", "type": "str"}, + "authentication": {"key": "authentication", "type": "OriginAuthenticationProperties"}, } def __init__( @@ -1236,6 +1312,7 @@ def __init__( health_probe_settings: Optional["_models.HealthProbeParameters"] = None, traffic_restoration_time_to_healed_or_new_endpoints_in_minutes: Optional[int] = None, session_affinity_state: Optional[Union[str, "_models.EnabledState"]] = None, + authentication: Optional["_models.OriginAuthenticationProperties"] = None, **kwargs: Any ) -> None: """ @@ -1251,15 +1328,18 @@ def __init__( :keyword session_affinity_state: Whether to allow session affinity on this host. Valid options are 'Enabled' or 'Disabled'. Known values are: "Enabled" and "Disabled". :paramtype session_affinity_state: str or ~azure.mgmt.cdn.models.EnabledState + :keyword authentication: Authentication settings for origin in origin group. + :paramtype authentication: ~azure.mgmt.cdn.models.OriginAuthenticationProperties """ super().__init__(**kwargs) - self.profile_name = None + self.profile_name: Optional[str] = None self.load_balancing_settings = load_balancing_settings self.health_probe_settings = health_probe_settings self.traffic_restoration_time_to_healed_or_new_endpoints_in_minutes = ( traffic_restoration_time_to_healed_or_new_endpoints_in_minutes ) self.session_affinity_state = session_affinity_state + self.authentication = authentication class AFDOriginGroupProperties(AFDOriginGroupUpdatePropertiesParameters, AFDStateProperties): @@ -1287,6 +1367,8 @@ class AFDOriginGroupProperties(AFDOriginGroupUpdatePropertiesParameters, AFDStat :ivar session_affinity_state: Whether to allow session affinity on this host. Valid options are 'Enabled' or 'Disabled'. Known values are: "Enabled" and "Disabled". :vartype session_affinity_state: str or ~azure.mgmt.cdn.models.EnabledState + :ivar authentication: Authentication settings for origin in origin group. + :vartype authentication: ~azure.mgmt.cdn.models.OriginAuthenticationProperties """ _validation = { @@ -1307,6 +1389,7 @@ class AFDOriginGroupProperties(AFDOriginGroupUpdatePropertiesParameters, AFDStat "type": "int", }, "session_affinity_state": {"key": "sessionAffinityState", "type": "str"}, + "authentication": {"key": "authentication", "type": "OriginAuthenticationProperties"}, } def __init__( @@ -1316,6 +1399,7 @@ def __init__( health_probe_settings: Optional["_models.HealthProbeParameters"] = None, traffic_restoration_time_to_healed_or_new_endpoints_in_minutes: Optional[int] = None, session_affinity_state: Optional[Union[str, "_models.EnabledState"]] = None, + authentication: Optional["_models.OriginAuthenticationProperties"] = None, **kwargs: Any ) -> None: """ @@ -1331,23 +1415,27 @@ def __init__( :keyword session_affinity_state: Whether to allow session affinity on this host. Valid options are 'Enabled' or 'Disabled'. Known values are: "Enabled" and "Disabled". :paramtype session_affinity_state: str or ~azure.mgmt.cdn.models.EnabledState + :keyword authentication: Authentication settings for origin in origin group. + :paramtype authentication: ~azure.mgmt.cdn.models.OriginAuthenticationProperties """ super().__init__( load_balancing_settings=load_balancing_settings, health_probe_settings=health_probe_settings, traffic_restoration_time_to_healed_or_new_endpoints_in_minutes=traffic_restoration_time_to_healed_or_new_endpoints_in_minutes, session_affinity_state=session_affinity_state, + authentication=authentication, **kwargs ) - self.provisioning_state = None - self.deployment_status = None - self.profile_name = None + self.provisioning_state: Optional[Union[str, "_models.AfdProvisioningState"]] = None + self.deployment_status: Optional[Union[str, "_models.DeploymentStatus"]] = None + self.profile_name: Optional[str] = None self.load_balancing_settings = load_balancing_settings self.health_probe_settings = health_probe_settings self.traffic_restoration_time_to_healed_or_new_endpoints_in_minutes = ( traffic_restoration_time_to_healed_or_new_endpoints_in_minutes ) self.session_affinity_state = session_affinity_state + self.authentication = authentication class AFDOriginGroupUpdateParameters(_serialization.Model): @@ -1369,6 +1457,8 @@ class AFDOriginGroupUpdateParameters(_serialization.Model): :ivar session_affinity_state: Whether to allow session affinity on this host. Valid options are 'Enabled' or 'Disabled'. Known values are: "Enabled" and "Disabled". :vartype session_affinity_state: str or ~azure.mgmt.cdn.models.EnabledState + :ivar authentication: Authentication settings for origin in origin group. + :vartype authentication: ~azure.mgmt.cdn.models.OriginAuthenticationProperties """ _validation = { @@ -1388,6 +1478,7 @@ class AFDOriginGroupUpdateParameters(_serialization.Model): "type": "int", }, "session_affinity_state": {"key": "properties.sessionAffinityState", "type": "str"}, + "authentication": {"key": "properties.authentication", "type": "OriginAuthenticationProperties"}, } def __init__( @@ -1397,6 +1488,7 @@ def __init__( health_probe_settings: Optional["_models.HealthProbeParameters"] = None, traffic_restoration_time_to_healed_or_new_endpoints_in_minutes: Optional[int] = None, session_affinity_state: Optional[Union[str, "_models.EnabledState"]] = None, + authentication: Optional["_models.OriginAuthenticationProperties"] = None, **kwargs: Any ) -> None: """ @@ -1412,15 +1504,18 @@ def __init__( :keyword session_affinity_state: Whether to allow session affinity on this host. Valid options are 'Enabled' or 'Disabled'. Known values are: "Enabled" and "Disabled". :paramtype session_affinity_state: str or ~azure.mgmt.cdn.models.EnabledState + :keyword authentication: Authentication settings for origin in origin group. + :paramtype authentication: ~azure.mgmt.cdn.models.OriginAuthenticationProperties """ super().__init__(**kwargs) - self.profile_name = None + self.profile_name: Optional[str] = None self.load_balancing_settings = load_balancing_settings self.health_probe_settings = health_probe_settings self.traffic_restoration_time_to_healed_or_new_endpoints_in_minutes = ( traffic_restoration_time_to_healed_or_new_endpoints_in_minutes ) self.session_affinity_state = session_affinity_state + self.authentication = authentication class AFDOriginListResult(_serialization.Model): @@ -1450,11 +1545,11 @@ def __init__(self, *, next_link: Optional[str] = None, **kwargs: Any) -> None: :paramtype next_link: str """ super().__init__(**kwargs) - self.value = None + self.value: Optional[list["_models.AFDOrigin"]] = None self.next_link = next_link -class AFDOriginUpdatePropertiesParameters(_serialization.Model): # pylint: disable=too-many-instance-attributes +class AFDOriginUpdatePropertiesParameters(_serialization.Model): """The JSON object that contains the properties of the origin. Variables are only populated by the server, and will be ignored when sending a request. @@ -1569,7 +1664,7 @@ def __init__( :paramtype enforce_certificate_name_check: bool """ super().__init__(**kwargs) - self.origin_group_name = None + self.origin_group_name: Optional[str] = None self.azure_origin = azure_origin self.host_name = host_name self.http_port = http_port @@ -1582,9 +1677,7 @@ def __init__( self.enforce_certificate_name_check = enforce_certificate_name_check -class AFDOriginProperties( - AFDOriginUpdatePropertiesParameters, AFDStateProperties -): # pylint: disable=too-many-instance-attributes +class AFDOriginProperties(AFDOriginUpdatePropertiesParameters, AFDStateProperties): """The JSON object that contains the properties of the origin. Variables are only populated by the server, and will be ignored when sending a request. @@ -1721,9 +1814,9 @@ def __init__( enforce_certificate_name_check=enforce_certificate_name_check, **kwargs ) - self.provisioning_state = None - self.deployment_status = None - self.origin_group_name = None + self.provisioning_state: Optional[Union[str, "_models.AfdProvisioningState"]] = None + self.deployment_status: Optional[Union[str, "_models.DeploymentStatus"]] = None + self.origin_group_name: Optional[str] = None self.azure_origin = azure_origin self.host_name = host_name self.http_port = http_port @@ -1736,7 +1829,7 @@ def __init__( self.enforce_certificate_name_check = enforce_certificate_name_check -class AFDOriginUpdateParameters(_serialization.Model): # pylint: disable=too-many-instance-attributes +class AFDOriginUpdateParameters(_serialization.Model): """AFDOrigin properties needed for origin update. Variables are only populated by the server, and will be ignored when sending a request. @@ -1851,7 +1944,7 @@ def __init__( :paramtype enforce_certificate_name_check: bool """ super().__init__(**kwargs) - self.origin_group_name = None + self.origin_group_name: Optional[str] = None self.azure_origin = azure_origin self.host_name = host_name self.http_port = http_port @@ -1885,7 +1978,7 @@ class AfdPurgeParameters(_serialization.Model): "domains": {"key": "domains", "type": "[str]"}, } - def __init__(self, *, content_paths: List[str], domains: Optional[List[str]] = None, **kwargs: Any) -> None: + def __init__(self, *, content_paths: list[str], domains: Optional[list[str]] = None, **kwargs: Any) -> None: """ :keyword content_paths: The path to the content to be purged. Can describe a file path or a wild card directory. Required. @@ -1981,8 +2074,8 @@ def __init__(self, *, type: Optional[Union[str, "_models.SecretType"]] = None, * """ super().__init__(**kwargs) self.type = type - self.subject = None - self.expiration_date = None + self.subject: Optional[str] = None + self.expiration_date: Optional[str] = None class AzureFirstPartyManagedCertificate(Certificate): @@ -2051,7 +2144,7 @@ class AzureFirstPartyManagedCertificateParameters(SecretParameters): # pylint: :vartype type: str or ~azure.mgmt.cdn.models.SecretType :ivar secret_source: Resource reference to the Azure Key Vault certificate. Expected to be in format of - /subscriptions/{​​​​​​​​​subscriptionId}​​​​​​​​​/resourceGroups/{​​​​​​​​​resourceGroupName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/providers/Microsoft.KeyVault/vaults/{vaultName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/secrets/{certificateName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​. # pylint: disable=line-too-long + /subscriptions/{​​​​​​​​​subscriptionId}​​​​​​​​​/resourceGroups/{​​​​​​​​​resourceGroupName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/providers/Microsoft.KeyVault/vaults/{vaultName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/secrets/{certificateName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​. :vartype secret_source: ~azure.mgmt.cdn.models.ResourceReference :ivar subject: Subject name in the certificate. :vartype subject: str @@ -2084,19 +2177,19 @@ class AzureFirstPartyManagedCertificateParameters(SecretParameters): # pylint: "thumbprint": {"key": "thumbprint", "type": "str"}, } - def __init__(self, *, subject_alternative_names: Optional[List[str]] = None, **kwargs: Any) -> None: + def __init__(self, *, subject_alternative_names: Optional[list[str]] = None, **kwargs: Any) -> None: """ :keyword subject_alternative_names: The list of SANs. :paramtype subject_alternative_names: list[str] """ super().__init__(**kwargs) self.type: str = "AzureFirstPartyManagedCertificate" - self.secret_source = None - self.subject = None - self.expiration_date = None - self.certificate_authority = None + self.secret_source: Optional["_models.ResourceReference"] = None + self.subject: Optional[str] = None + self.expiration_date: Optional[str] = None + self.certificate_authority: Optional[str] = None self.subject_alternative_names = subject_alternative_names - self.thumbprint = None + self.thumbprint: Optional[str] = None class CacheConfiguration(_serialization.Model): @@ -2173,13 +2266,64 @@ def __init__( self.cache_duration = cache_duration -class CacheExpirationActionParameters(_serialization.Model): +class DeliveryRuleActionParameters(_serialization.Model): + """Defines the parameters for delivery rule actions. + + You probably want to use the sub-classes and not this class directly. Known sub-classes are: + CacheExpirationActionParameters, CacheKeyQueryStringActionParameters, HeaderActionParameters, + OriginGroupOverrideActionParameters, RouteConfigurationOverrideActionParameters, + UrlRedirectActionParameters, UrlRewriteActionParameters, UrlSigningActionParameters + + All required parameters must be populated in order to send to server. + + :ivar type_name: Required. Known values are: "DeliveryRuleUrlRedirectActionParameters", + "DeliveryRuleUrlSigningActionParameters", "DeliveryRuleOriginGroupOverrideActionParameters", + "DeliveryRuleUrlRewriteActionParameters", "DeliveryRuleHeaderActionParameters", + "DeliveryRuleCacheExpirationActionParameters", + "DeliveryRuleCacheKeyQueryStringBehaviorActionParameters", and + "DeliveryRuleRouteConfigurationOverrideActionParameters". + :vartype type_name: str or ~azure.mgmt.cdn.models.DeliveryRuleActionParametersType + """ + + _validation = { + "type_name": {"required": True}, + } + + _attribute_map = { + "type_name": {"key": "typeName", "type": "str"}, + } + + _subtype_map = { + "type_name": { + "DeliveryRuleCacheExpirationActionParameters": "CacheExpirationActionParameters", + "DeliveryRuleCacheKeyQueryStringBehaviorActionParameters": "CacheKeyQueryStringActionParameters", + "DeliveryRuleHeaderActionParameters": "HeaderActionParameters", + "DeliveryRuleOriginGroupOverrideActionParameters": "OriginGroupOverrideActionParameters", + "DeliveryRuleRouteConfigurationOverrideActionParameters": "RouteConfigurationOverrideActionParameters", + "DeliveryRuleUrlRedirectActionParameters": "UrlRedirectActionParameters", + "DeliveryRuleUrlRewriteActionParameters": "UrlRewriteActionParameters", + "DeliveryRuleUrlSigningActionParameters": "UrlSigningActionParameters", + } + } + + def __init__(self, **kwargs: Any) -> None: + """ """ + super().__init__(**kwargs) + self.type_name: Optional[str] = None + + +class CacheExpirationActionParameters(DeliveryRuleActionParameters): """Defines the parameters for the cache expiration action. All required parameters must be populated in order to send to server. - :ivar type_name: Required. "DeliveryRuleCacheExpirationActionParameters" - :vartype type_name: str or ~azure.mgmt.cdn.models.CacheExpirationActionParametersTypeName + :ivar type_name: Required. Known values are: "DeliveryRuleUrlRedirectActionParameters", + "DeliveryRuleUrlSigningActionParameters", "DeliveryRuleOriginGroupOverrideActionParameters", + "DeliveryRuleUrlRewriteActionParameters", "DeliveryRuleHeaderActionParameters", + "DeliveryRuleCacheExpirationActionParameters", + "DeliveryRuleCacheKeyQueryStringBehaviorActionParameters", and + "DeliveryRuleRouteConfigurationOverrideActionParameters". + :vartype type_name: str or ~azure.mgmt.cdn.models.DeliveryRuleActionParametersType :ivar cache_behavior: Caching behavior for the requests. Required. Known values are: "BypassCache", "Override", and "SetIfMissing". :vartype cache_behavior: str or ~azure.mgmt.cdn.models.CacheBehavior @@ -2206,15 +2350,12 @@ class CacheExpirationActionParameters(_serialization.Model): def __init__( self, *, - type_name: Union[str, "_models.CacheExpirationActionParametersTypeName"], cache_behavior: Union[str, "_models.CacheBehavior"], cache_type: Union[str, "_models.CacheType"], cache_duration: Optional[str] = None, **kwargs: Any ) -> None: """ - :keyword type_name: Required. "DeliveryRuleCacheExpirationActionParameters" - :paramtype type_name: str or ~azure.mgmt.cdn.models.CacheExpirationActionParametersTypeName :keyword cache_behavior: Caching behavior for the requests. Required. Known values are: "BypassCache", "Override", and "SetIfMissing". :paramtype cache_behavior: str or ~azure.mgmt.cdn.models.CacheBehavior @@ -2225,19 +2366,24 @@ def __init__( :paramtype cache_duration: str """ super().__init__(**kwargs) - self.type_name = type_name + self.type_name: str = "DeliveryRuleCacheExpirationActionParameters" self.cache_behavior = cache_behavior self.cache_type = cache_type self.cache_duration = cache_duration -class CacheKeyQueryStringActionParameters(_serialization.Model): +class CacheKeyQueryStringActionParameters(DeliveryRuleActionParameters): """Defines the parameters for the cache-key query string action. All required parameters must be populated in order to send to server. - :ivar type_name: Required. "DeliveryRuleCacheKeyQueryStringBehaviorActionParameters" - :vartype type_name: str or ~azure.mgmt.cdn.models.CacheKeyQueryStringActionParametersTypeName + :ivar type_name: Required. Known values are: "DeliveryRuleUrlRedirectActionParameters", + "DeliveryRuleUrlSigningActionParameters", "DeliveryRuleOriginGroupOverrideActionParameters", + "DeliveryRuleUrlRewriteActionParameters", "DeliveryRuleHeaderActionParameters", + "DeliveryRuleCacheExpirationActionParameters", + "DeliveryRuleCacheKeyQueryStringBehaviorActionParameters", and + "DeliveryRuleRouteConfigurationOverrideActionParameters". + :vartype type_name: str or ~azure.mgmt.cdn.models.DeliveryRuleActionParametersType :ivar query_string_behavior: Caching behavior for the requests. Required. Known values are: "Include", "IncludeAll", "Exclude", and "ExcludeAll". :vartype query_string_behavior: str or ~azure.mgmt.cdn.models.QueryStringBehavior @@ -2259,14 +2405,11 @@ class CacheKeyQueryStringActionParameters(_serialization.Model): def __init__( self, *, - type_name: Union[str, "_models.CacheKeyQueryStringActionParametersTypeName"], query_string_behavior: Union[str, "_models.QueryStringBehavior"], query_parameters: Optional[str] = None, **kwargs: Any ) -> None: """ - :keyword type_name: Required. "DeliveryRuleCacheKeyQueryStringBehaviorActionParameters" - :paramtype type_name: str or ~azure.mgmt.cdn.models.CacheKeyQueryStringActionParametersTypeName :keyword query_string_behavior: Caching behavior for the requests. Required. Known values are: "Include", "IncludeAll", "Exclude", and "ExcludeAll". :paramtype query_string_behavior: str or ~azure.mgmt.cdn.models.QueryStringBehavior @@ -2274,7 +2417,7 @@ def __init__( :paramtype query_parameters: str """ super().__init__(**kwargs) - self.type_name = type_name + self.type_name: str = "DeliveryRuleCacheKeyQueryStringBehaviorActionParameters" self.query_string_behavior = query_string_behavior self.query_parameters = query_parameters @@ -2340,26 +2483,61 @@ class CanMigrateResult(_serialization.Model): "errors": {"key": "properties.errors", "type": "[MigrationErrorType]"}, } - def __init__(self, *, errors: Optional[List["_models.MigrationErrorType"]] = None, **kwargs: Any) -> None: + def __init__(self, *, errors: Optional[list["_models.MigrationErrorType"]] = None, **kwargs: Any) -> None: """ :keyword errors: :paramtype errors: list[~azure.mgmt.cdn.models.MigrationErrorType] """ super().__init__(**kwargs) - self.id = None - self.type = None - self.can_migrate = None - self.default_sku = None + self.id: Optional[str] = None + self.type: Optional[str] = None + self.can_migrate: Optional[bool] = None + self.default_sku: Optional[Union[str, "_models.CanMigrateDefaultSku"]] = None self.errors = errors -class CdnCertificateSourceParameters(_serialization.Model): +class CertificateSourceParameters(_serialization.Model): + """Defines the parameters for certificate source. + + You probably want to use the sub-classes and not this class directly. Known sub-classes are: + CdnCertificateSourceParameters, KeyVaultCertificateSourceParameters + + All required parameters must be populated in order to send to server. + + :ivar type_name: Required. Known values are: "CdnCertificateSourceParameters" and + "KeyVaultCertificateSourceParameters". + :vartype type_name: str or ~azure.mgmt.cdn.models.CertificateSourceParametersType + """ + + _validation = { + "type_name": {"required": True}, + } + + _attribute_map = { + "type_name": {"key": "typeName", "type": "str"}, + } + + _subtype_map = { + "type_name": { + "CdnCertificateSourceParameters": "CdnCertificateSourceParameters", + "KeyVaultCertificateSourceParameters": "KeyVaultCertificateSourceParameters", + } + } + + def __init__(self, **kwargs: Any) -> None: + """ """ + super().__init__(**kwargs) + self.type_name: Optional[str] = None + + +class CdnCertificateSourceParameters(CertificateSourceParameters): """Defines the parameters for using CDN managed certificate for securing custom domain. All required parameters must be populated in order to send to server. - :ivar type_name: Required. "CdnCertificateSourceParameters" - :vartype type_name: str or ~azure.mgmt.cdn.models.CdnCertificateSourceParametersTypeName + :ivar type_name: Required. Known values are: "CdnCertificateSourceParameters" and + "KeyVaultCertificateSourceParameters". + :vartype type_name: str or ~azure.mgmt.cdn.models.CertificateSourceParametersType :ivar certificate_type: Type of certificate used. Required. Known values are: "Shared" and "Dedicated". :vartype certificate_type: str or ~azure.mgmt.cdn.models.CertificateType @@ -2375,22 +2553,14 @@ class CdnCertificateSourceParameters(_serialization.Model): "certificate_type": {"key": "certificateType", "type": "str"}, } - def __init__( - self, - *, - type_name: Union[str, "_models.CdnCertificateSourceParametersTypeName"], - certificate_type: Union[str, "_models.CertificateType"], - **kwargs: Any - ) -> None: + def __init__(self, *, certificate_type: Union[str, "_models.CertificateType"], **kwargs: Any) -> None: """ - :keyword type_name: Required. "CdnCertificateSourceParameters" - :paramtype type_name: str or ~azure.mgmt.cdn.models.CdnCertificateSourceParametersTypeName :keyword certificate_type: Type of certificate used. Required. Known values are: "Shared" and "Dedicated". :paramtype certificate_type: str or ~azure.mgmt.cdn.models.CertificateType """ super().__init__(**kwargs) - self.type_name = type_name + self.type_name: str = "CdnCertificateSourceParameters" self.certificate_type = certificate_type @@ -2528,25 +2698,68 @@ def __init__( self.certificate_source_parameters = certificate_source_parameters -class CdnWebApplicationFirewallPolicy(TrackedResource): # pylint: disable=too-many-instance-attributes +class CdnMigrationToAfdParameters(_serialization.Model): + """Request body for Migrate operation. + + All required parameters must be populated in order to send to server. + + :ivar sku: Sku for the migration. Required. + :vartype sku: ~azure.mgmt.cdn.models.Sku + :ivar migration_endpoint_mappings: A name map between classic CDN endpoints and AFD + Premium/Standard endpoints. + :vartype migration_endpoint_mappings: list[~azure.mgmt.cdn.models.MigrationEndpointMapping] + """ + + _validation = { + "sku": {"required": True}, + } + + _attribute_map = { + "sku": {"key": "sku", "type": "Sku"}, + "migration_endpoint_mappings": {"key": "migrationEndpointMappings", "type": "[MigrationEndpointMapping]"}, + } + + def __init__( + self, + *, + sku: "_models.Sku", + migration_endpoint_mappings: Optional[list["_models.MigrationEndpointMapping"]] = None, + **kwargs: Any + ) -> None: + """ + :keyword sku: Sku for the migration. Required. + :paramtype sku: ~azure.mgmt.cdn.models.Sku + :keyword migration_endpoint_mappings: A name map between classic CDN endpoints and AFD + Premium/Standard endpoints. + :paramtype migration_endpoint_mappings: list[~azure.mgmt.cdn.models.MigrationEndpointMapping] + """ + super().__init__(**kwargs) + self.sku = sku + self.migration_endpoint_mappings = migration_endpoint_mappings + + +class CdnWebApplicationFirewallPolicy(TrackedResource): """Defines web application firewall policy for Azure CDN. Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to server. - :ivar id: Resource ID. + :ivar id: Fully qualified resource ID for the resource. E.g. + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". :vartype id: str - :ivar name: Resource name. + :ivar name: The name of the resource. :vartype name: str - :ivar type: Resource type. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str - :ivar system_data: Read only system data. + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. :vartype system_data: ~azure.mgmt.cdn.models.SystemData - :ivar location: Resource location. Required. - :vartype location: str :ivar tags: Resource tags. :vartype tags: dict[str, str] + :ivar location: The geo-location where the resource lives. Required. + :vartype location: str :ivar etag: Gets a unique read-only string that changes whenever the resource is updated. :vartype etag: str :ivar sku: The pricing tier (defines a CDN provider, feature list and rate) of the @@ -2591,8 +2804,8 @@ class CdnWebApplicationFirewallPolicy(TrackedResource): # pylint: disable=too-m "name": {"key": "name", "type": "str"}, "type": {"key": "type", "type": "str"}, "system_data": {"key": "systemData", "type": "SystemData"}, - "location": {"key": "location", "type": "str"}, "tags": {"key": "tags", "type": "{str}"}, + "location": {"key": "location", "type": "str"}, "etag": {"key": "etag", "type": "str"}, "sku": {"key": "sku", "type": "Sku"}, "policy_settings": {"key": "properties.policySettings", "type": "PolicySettings"}, @@ -2610,20 +2823,20 @@ def __init__( *, location: str, sku: "_models.Sku", - tags: Optional[Dict[str, str]] = None, + tags: Optional[dict[str, str]] = None, etag: Optional[str] = None, policy_settings: Optional["_models.PolicySettings"] = None, rate_limit_rules: Optional["_models.RateLimitRuleList"] = None, custom_rules: Optional["_models.CustomRuleList"] = None, managed_rules: Optional["_models.ManagedRuleSetList"] = None, - extended_properties: Optional[Dict[str, str]] = None, + extended_properties: Optional[dict[str, str]] = None, **kwargs: Any ) -> None: """ - :keyword location: Resource location. Required. - :paramtype location: str :keyword tags: Resource tags. :paramtype tags: dict[str, str] + :keyword location: The geo-location where the resource lives. Required. + :paramtype location: str :keyword etag: Gets a unique read-only string that changes whenever the resource is updated. :paramtype etag: str :keyword sku: The pricing tier (defines a CDN provider, feature list and rate) of the @@ -2641,17 +2854,17 @@ def __init__( Application Firewall policy. :paramtype extended_properties: dict[str, str] """ - super().__init__(location=location, tags=tags, **kwargs) + super().__init__(tags=tags, location=location, **kwargs) self.etag = etag self.sku = sku self.policy_settings = policy_settings self.rate_limit_rules = rate_limit_rules self.custom_rules = custom_rules self.managed_rules = managed_rules - self.endpoint_links = None + self.endpoint_links: Optional[list["_models.CdnEndpoint"]] = None self.extended_properties = extended_properties - self.provisioning_state = None - self.resource_state = None + self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None + self.resource_state: Optional[Union[str, "_models.PolicyResourceState"]] = None class CdnWebApplicationFirewallPolicyList(_serialization.Model): @@ -2683,7 +2896,7 @@ def __init__(self, *, next_link: Optional[str] = None, **kwargs: Any) -> None: :paramtype next_link: str """ super().__init__(**kwargs) - self.value = None + self.value: Optional[list["_models.CdnWebApplicationFirewallPolicy"]] = None self.next_link = next_link @@ -2698,7 +2911,7 @@ class CdnWebApplicationFirewallPolicyPatchParameters(_serialization.Model): # p "tags": {"key": "tags", "type": "{str}"}, } - def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: + def __init__(self, *, tags: Optional[dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword tags: CdnWebApplicationFirewallPolicy tags. :paramtype tags: dict[str, str] @@ -2797,10 +3010,10 @@ class CheckEndpointNameAvailabilityOutput(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.name_available = None - self.available_hostname = None - self.reason = None - self.message = None + self.name_available: Optional[bool] = None + self.available_hostname: Optional[str] = None + self.reason: Optional[str] = None + self.message: Optional[str] = None class CheckHostNameAvailabilityInput(_serialization.Model): @@ -2892,9 +3105,9 @@ class CheckNameAvailabilityOutput(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.name_available = None - self.reason = None - self.message = None + self.name_available: Optional[bool] = None + self.reason: Optional[str] = None + self.message: Optional[str] = None class CidrIpAddress(_serialization.Model): @@ -2925,13 +3138,92 @@ def __init__( self.prefix_length = prefix_length -class ClientPortMatchConditionParameters(_serialization.Model): +class DeliveryRuleConditionParameters(_serialization.Model): + """Defines the parameters for delivery rule match conditions. + + You probably want to use the sub-classes and not this class directly. Known sub-classes are: + ClientPortMatchConditionParameters, CookiesMatchConditionParameters, + HostNameMatchConditionParameters, HttpVersionMatchConditionParameters, + IsDeviceMatchConditionParameters, PostArgsMatchConditionParameters, + QueryStringMatchConditionParameters, RemoteAddressMatchConditionParameters, + RequestBodyMatchConditionParameters, RequestHeaderMatchConditionParameters, + RequestMethodMatchConditionParameters, RequestSchemeMatchConditionParameters, + RequestUriMatchConditionParameters, ServerPortMatchConditionParameters, + SocketAddrMatchConditionParameters, SslProtocolMatchConditionParameters, + UrlFileExtensionMatchConditionParameters, UrlFileNameMatchConditionParameters, + UrlPathMatchConditionParameters + + All required parameters must be populated in order to send to server. + + :ivar type_name: Required. Known values are: "DeliveryRuleRemoteAddressConditionParameters", + "DeliveryRuleRequestMethodConditionParameters", "DeliveryRuleQueryStringConditionParameters", + "DeliveryRulePostArgsConditionParameters", "DeliveryRuleRequestUriConditionParameters", + "DeliveryRuleRequestHeaderConditionParameters", "DeliveryRuleRequestBodyConditionParameters", + "DeliveryRuleRequestSchemeConditionParameters", "DeliveryRuleUrlPathMatchConditionParameters", + "DeliveryRuleUrlFileExtensionMatchConditionParameters", + "DeliveryRuleUrlFilenameConditionParameters", "DeliveryRuleHttpVersionConditionParameters", + "DeliveryRuleCookiesConditionParameters", "DeliveryRuleIsDeviceConditionParameters", + "DeliveryRuleSocketAddrConditionParameters", "DeliveryRuleClientPortConditionParameters", + "DeliveryRuleServerPortConditionParameters", "DeliveryRuleHostNameConditionParameters", and + "DeliveryRuleSslProtocolConditionParameters". + :vartype type_name: str or ~azure.mgmt.cdn.models.DeliveryRuleConditionParametersType + """ + + _validation = { + "type_name": {"required": True}, + } + + _attribute_map = { + "type_name": {"key": "typeName", "type": "str"}, + } + + _subtype_map = { + "type_name": { + "DeliveryRuleClientPortConditionParameters": "ClientPortMatchConditionParameters", + "DeliveryRuleCookiesConditionParameters": "CookiesMatchConditionParameters", + "DeliveryRuleHostNameConditionParameters": "HostNameMatchConditionParameters", + "DeliveryRuleHttpVersionConditionParameters": "HttpVersionMatchConditionParameters", + "DeliveryRuleIsDeviceConditionParameters": "IsDeviceMatchConditionParameters", + "DeliveryRulePostArgsConditionParameters": "PostArgsMatchConditionParameters", + "DeliveryRuleQueryStringConditionParameters": "QueryStringMatchConditionParameters", + "DeliveryRuleRemoteAddressConditionParameters": "RemoteAddressMatchConditionParameters", + "DeliveryRuleRequestBodyConditionParameters": "RequestBodyMatchConditionParameters", + "DeliveryRuleRequestHeaderConditionParameters": "RequestHeaderMatchConditionParameters", + "DeliveryRuleRequestMethodConditionParameters": "RequestMethodMatchConditionParameters", + "DeliveryRuleRequestSchemeConditionParameters": "RequestSchemeMatchConditionParameters", + "DeliveryRuleRequestUriConditionParameters": "RequestUriMatchConditionParameters", + "DeliveryRuleServerPortConditionParameters": "ServerPortMatchConditionParameters", + "DeliveryRuleSocketAddrConditionParameters": "SocketAddrMatchConditionParameters", + "DeliveryRuleSslProtocolConditionParameters": "SslProtocolMatchConditionParameters", + "DeliveryRuleUrlFileExtensionMatchConditionParameters": "UrlFileExtensionMatchConditionParameters", + "DeliveryRuleUrlFilenameConditionParameters": "UrlFileNameMatchConditionParameters", + "DeliveryRuleUrlPathMatchConditionParameters": "UrlPathMatchConditionParameters", + } + } + + def __init__(self, **kwargs: Any) -> None: + """ """ + super().__init__(**kwargs) + self.type_name: Optional[str] = None + + +class ClientPortMatchConditionParameters(DeliveryRuleConditionParameters): """Defines the parameters for ClientPort match conditions. All required parameters must be populated in order to send to server. - :ivar type_name: Required. "DeliveryRuleClientPortConditionParameters" - :vartype type_name: str or ~azure.mgmt.cdn.models.ClientPortMatchConditionParametersTypeName + :ivar type_name: Required. Known values are: "DeliveryRuleRemoteAddressConditionParameters", + "DeliveryRuleRequestMethodConditionParameters", "DeliveryRuleQueryStringConditionParameters", + "DeliveryRulePostArgsConditionParameters", "DeliveryRuleRequestUriConditionParameters", + "DeliveryRuleRequestHeaderConditionParameters", "DeliveryRuleRequestBodyConditionParameters", + "DeliveryRuleRequestSchemeConditionParameters", "DeliveryRuleUrlPathMatchConditionParameters", + "DeliveryRuleUrlFileExtensionMatchConditionParameters", + "DeliveryRuleUrlFilenameConditionParameters", "DeliveryRuleHttpVersionConditionParameters", + "DeliveryRuleCookiesConditionParameters", "DeliveryRuleIsDeviceConditionParameters", + "DeliveryRuleSocketAddrConditionParameters", "DeliveryRuleClientPortConditionParameters", + "DeliveryRuleServerPortConditionParameters", "DeliveryRuleHostNameConditionParameters", and + "DeliveryRuleSslProtocolConditionParameters". + :vartype type_name: str or ~azure.mgmt.cdn.models.DeliveryRuleConditionParametersType :ivar operator: Describes operator to be matched. Required. Known values are: "Any", "Equal", "Contains", "BeginsWith", "EndsWith", "LessThan", "LessThanOrEqual", "GreaterThan", "GreaterThanOrEqual", and "RegEx". @@ -2960,16 +3252,13 @@ class ClientPortMatchConditionParameters(_serialization.Model): def __init__( self, *, - type_name: Union[str, "_models.ClientPortMatchConditionParametersTypeName"], operator: Union[str, "_models.ClientPortOperator"], negate_condition: bool = False, - match_values: Optional[List[str]] = None, - transforms: Optional[List[Union[str, "_models.Transform"]]] = None, + match_values: Optional[list[str]] = None, + transforms: Optional[list[Union[str, "_models.Transform"]]] = None, **kwargs: Any ) -> None: """ - :keyword type_name: Required. "DeliveryRuleClientPortConditionParameters" - :paramtype type_name: str or ~azure.mgmt.cdn.models.ClientPortMatchConditionParametersTypeName :keyword operator: Describes operator to be matched. Required. Known values are: "Any", "Equal", "Contains", "BeginsWith", "EndsWith", "LessThan", "LessThanOrEqual", "GreaterThan", "GreaterThanOrEqual", and "RegEx". @@ -2982,7 +3271,7 @@ def __init__( :paramtype transforms: list[str or ~azure.mgmt.cdn.models.Transform] """ super().__init__(**kwargs) - self.type_name = type_name + self.type_name: str = "DeliveryRuleClientPortConditionParameters" self.operator = operator self.negate_condition = negate_condition self.match_values = match_values @@ -3111,7 +3400,7 @@ class CompressionSettings(_serialization.Model): def __init__( self, *, - content_types_to_compress: Optional[List[str]] = None, + content_types_to_compress: Optional[list[str]] = None, is_compression_enabled: Optional[bool] = None, **kwargs: Any ) -> None: @@ -3148,8 +3437,8 @@ class ContinentsResponse(_serialization.Model): def __init__( self, *, - continents: Optional[List["_models.ContinentsResponseContinentsItem"]] = None, - country_or_regions: Optional[List["_models.ContinentsResponseCountryOrRegionsItem"]] = None, + continents: Optional[list["_models.ContinentsResponseContinentsItem"]] = None, + country_or_regions: Optional[list["_models.ContinentsResponseCountryOrRegionsItem"]] = None, **kwargs: Any ) -> None: """ @@ -3216,13 +3505,23 @@ def __init__( self.continent_id = continent_id -class CookiesMatchConditionParameters(_serialization.Model): +class CookiesMatchConditionParameters(DeliveryRuleConditionParameters): """Defines the parameters for Cookies match conditions. All required parameters must be populated in order to send to server. - :ivar type_name: Required. "DeliveryRuleCookiesConditionParameters" - :vartype type_name: str or ~azure.mgmt.cdn.models.CookiesMatchConditionParametersTypeName + :ivar type_name: Required. Known values are: "DeliveryRuleRemoteAddressConditionParameters", + "DeliveryRuleRequestMethodConditionParameters", "DeliveryRuleQueryStringConditionParameters", + "DeliveryRulePostArgsConditionParameters", "DeliveryRuleRequestUriConditionParameters", + "DeliveryRuleRequestHeaderConditionParameters", "DeliveryRuleRequestBodyConditionParameters", + "DeliveryRuleRequestSchemeConditionParameters", "DeliveryRuleUrlPathMatchConditionParameters", + "DeliveryRuleUrlFileExtensionMatchConditionParameters", + "DeliveryRuleUrlFilenameConditionParameters", "DeliveryRuleHttpVersionConditionParameters", + "DeliveryRuleCookiesConditionParameters", "DeliveryRuleIsDeviceConditionParameters", + "DeliveryRuleSocketAddrConditionParameters", "DeliveryRuleClientPortConditionParameters", + "DeliveryRuleServerPortConditionParameters", "DeliveryRuleHostNameConditionParameters", and + "DeliveryRuleSslProtocolConditionParameters". + :vartype type_name: str or ~azure.mgmt.cdn.models.DeliveryRuleConditionParametersType :ivar selector: Name of Cookies to be matched. :vartype selector: str :ivar operator: Describes operator to be matched. Required. Known values are: "Any", "Equal", @@ -3254,17 +3553,14 @@ class CookiesMatchConditionParameters(_serialization.Model): def __init__( self, *, - type_name: Union[str, "_models.CookiesMatchConditionParametersTypeName"], operator: Union[str, "_models.CookiesOperator"], selector: Optional[str] = None, negate_condition: bool = False, - match_values: Optional[List[str]] = None, - transforms: Optional[List[Union[str, "_models.Transform"]]] = None, + match_values: Optional[list[str]] = None, + transforms: Optional[list[Union[str, "_models.Transform"]]] = None, **kwargs: Any ) -> None: """ - :keyword type_name: Required. "DeliveryRuleCookiesConditionParameters" - :paramtype type_name: str or ~azure.mgmt.cdn.models.CookiesMatchConditionParametersTypeName :keyword selector: Name of Cookies to be matched. :paramtype selector: str :keyword operator: Describes operator to be matched. Required. Known values are: "Any", @@ -3279,7 +3575,7 @@ def __init__( :paramtype transforms: list[str or ~azure.mgmt.cdn.models.Transform] """ super().__init__(**kwargs) - self.type_name = type_name + self.type_name: str = "DeliveryRuleCookiesConditionParameters" self.selector = selector self.operator = operator self.negate_condition = negate_condition @@ -3287,19 +3583,22 @@ def __init__( self.transforms = transforms -class CustomDomain(ProxyResource): # pylint: disable=too-many-instance-attributes +class CustomDomain(ProxyResource): """Friendly domain name mapping to the endpoint hostname that the customer provides for branding purposes, e.g. www.contoso.com. Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Resource ID. + :ivar id: Fully qualified resource ID for the resource. E.g. + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". :vartype id: str - :ivar name: Resource name. + :ivar name: The name of the resource. :vartype name: str - :ivar type: Resource type. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str - :ivar system_data: Read only system data. + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. :vartype system_data: ~azure.mgmt.cdn.models.SystemData :ivar host_name: The host name of the custom domain. Must be a domain name. :vartype host_name: str @@ -3374,12 +3673,12 @@ def __init__( """ super().__init__(**kwargs) self.host_name = host_name - self.resource_state = None - self.custom_https_provisioning_state = None - self.custom_https_provisioning_substate = None + self.resource_state: Optional[Union[str, "_models.CustomDomainResourceState"]] = None + self.custom_https_provisioning_state: Optional[Union[str, "_models.CustomHttpsProvisioningState"]] = None + self.custom_https_provisioning_substate: Optional[Union[str, "_models.CustomHttpsProvisioningSubstate"]] = None self.custom_https_parameters = custom_https_parameters self.validation_data = validation_data - self.provisioning_state = None + self.provisioning_state: Optional[Union[str, "_models.CustomHttpsProvisioningState"]] = None class CustomDomainListResult(_serialization.Model): @@ -3409,7 +3708,7 @@ def __init__(self, *, next_link: Optional[str] = None, **kwargs: Any) -> None: :paramtype next_link: str """ super().__init__(**kwargs) - self.value = None + self.value: Optional[list["_models.CustomDomain"]] = None self.next_link = next_link @@ -3447,7 +3746,7 @@ class CustomerCertificate(Certificate): :vartype expiration_date: str :ivar secret_source: Resource reference to the Azure Key Vault certificate. Expected to be in format of - /subscriptions/{​​​​​​​​​subscriptionId}​​​​​​​​​/resourceGroups/{​​​​​​​​​resourceGroupName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/providers/Microsoft.KeyVault/vaults/{vaultName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/secrets/{certificateName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​. # pylint: disable=line-too-long + /subscriptions/{​​​​​​​​​subscriptionId}​​​​​​​​​/resourceGroups/{​​​​​​​​​resourceGroupName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/providers/Microsoft.KeyVault/vaults/{vaultName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/secrets/{certificateName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​. :vartype secret_source: ~azure.mgmt.cdn.models.ResourceReference :ivar secret_version: Certificate version. :vartype secret_version: str @@ -3487,7 +3786,7 @@ def __init__( secret_source: Optional["_models.ResourceReference"] = None, secret_version: Optional[str] = None, use_latest_version: Optional[bool] = None, - subject_alternative_names: Optional[List[str]] = None, + subject_alternative_names: Optional[list[str]] = None, **kwargs: Any ) -> None: """ @@ -3496,7 +3795,7 @@ def __init__( :paramtype type: str or ~azure.mgmt.cdn.models.SecretType :keyword secret_source: Resource reference to the Azure Key Vault certificate. Expected to be in format of - /subscriptions/{​​​​​​​​​subscriptionId}​​​​​​​​​/resourceGroups/{​​​​​​​​​resourceGroupName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/providers/Microsoft.KeyVault/vaults/{vaultName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/secrets/{certificateName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​. # pylint: disable=line-too-long + /subscriptions/{​​​​​​​​​subscriptionId}​​​​​​​​​/resourceGroups/{​​​​​​​​​resourceGroupName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/providers/Microsoft.KeyVault/vaults/{vaultName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/secrets/{certificateName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​. :paramtype secret_source: ~azure.mgmt.cdn.models.ResourceReference :keyword secret_version: Certificate version. :paramtype secret_version: str @@ -3508,10 +3807,10 @@ def __init__( super().__init__(type=type, **kwargs) self.secret_source = secret_source self.secret_version = secret_version - self.certificate_authority = None + self.certificate_authority: Optional[str] = None self.use_latest_version = use_latest_version self.subject_alternative_names = subject_alternative_names - self.thumbprint = None + self.thumbprint: Optional[str] = None class CustomerCertificateParameters(SecretParameters): @@ -3526,7 +3825,7 @@ class CustomerCertificateParameters(SecretParameters): :vartype type: str or ~azure.mgmt.cdn.models.SecretType :ivar secret_source: Resource reference to the Azure Key Vault certificate. Expected to be in format of - /subscriptions/{​​​​​​​​​subscriptionId}​​​​​​​​​/resourceGroups/{​​​​​​​​​resourceGroupName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/providers/Microsoft.KeyVault/vaults/{vaultName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/secrets/{certificateName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​. # pylint: disable=line-too-long + /subscriptions/{​​​​​​​​​subscriptionId}​​​​​​​​​/resourceGroups/{​​​​​​​​​resourceGroupName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/providers/Microsoft.KeyVault/vaults/{vaultName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/secrets/{certificateName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​. Required. :vartype secret_source: ~azure.mgmt.cdn.models.ResourceReference :ivar secret_version: Version of the secret to be used. @@ -3572,13 +3871,13 @@ def __init__( secret_source: "_models.ResourceReference", secret_version: Optional[str] = None, use_latest_version: Optional[bool] = None, - subject_alternative_names: Optional[List[str]] = None, + subject_alternative_names: Optional[list[str]] = None, **kwargs: Any ) -> None: """ :keyword secret_source: Resource reference to the Azure Key Vault certificate. Expected to be in format of - /subscriptions/{​​​​​​​​​subscriptionId}​​​​​​​​​/resourceGroups/{​​​​​​​​​resourceGroupName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/providers/Microsoft.KeyVault/vaults/{vaultName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/secrets/{certificateName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​. # pylint: disable=line-too-long + /subscriptions/{​​​​​​​​​subscriptionId}​​​​​​​​​/resourceGroups/{​​​​​​​​​resourceGroupName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/providers/Microsoft.KeyVault/vaults/{vaultName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/secrets/{certificateName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​. Required. :paramtype secret_source: ~azure.mgmt.cdn.models.ResourceReference :keyword secret_version: Version of the secret to be used. @@ -3593,11 +3892,11 @@ def __init__( self.secret_source = secret_source self.secret_version = secret_version self.use_latest_version = use_latest_version - self.subject = None - self.expiration_date = None - self.certificate_authority = None + self.subject: Optional[str] = None + self.expiration_date: Optional[str] = None + self.certificate_authority: Optional[str] = None self.subject_alternative_names = subject_alternative_names - self.thumbprint = None + self.thumbprint: Optional[str] = None class CustomRule(_serialization.Model): @@ -3640,7 +3939,7 @@ def __init__( *, name: str, priority: int, - match_conditions: List["_models.MatchCondition"], + match_conditions: list["_models.MatchCondition"], action: Union[str, "_models.ActionType"], enabled_state: Optional[Union[str, "_models.CustomRuleEnabledState"]] = None, **kwargs: Any @@ -3679,7 +3978,7 @@ class CustomRuleList(_serialization.Model): "rules": {"key": "rules", "type": "[CustomRule]"}, } - def __init__(self, *, rules: Optional[List["_models.CustomRule"]] = None, **kwargs: Any) -> None: + def __init__(self, *, rules: Optional[list["_models.CustomRule"]] = None, **kwargs: Any) -> None: """ :keyword rules: List of rules. :paramtype rules: list[~azure.mgmt.cdn.models.CustomRule] @@ -3732,7 +4031,7 @@ def __init__( self.validation_data = validation_data -class DeepCreatedOrigin(_serialization.Model): # pylint: disable=too-many-instance-attributes +class DeepCreatedOrigin(_serialization.Model): """The main origin of CDN content which is added when creating a CDN endpoint. Variables are only populated by the server, and will be ignored when sending a request. @@ -3873,7 +4172,7 @@ def __init__( self.private_link_resource_id = private_link_resource_id self.private_link_location = private_link_location self.private_link_approval_message = private_link_approval_message - self.private_endpoint_status = None + self.private_endpoint_status: Optional[Union[str, "_models.PrivateEndpointStatus"]] = None class DeepCreatedOriginGroup(_serialization.Model): @@ -3924,7 +4223,7 @@ def __init__( *, name: str, health_probe_settings: Optional["_models.HealthProbeParameters"] = None, - origins: Optional[List["_models.ResourceReference"]] = None, + origins: Optional[list["_models.ResourceReference"]] = None, traffic_restoration_time_to_healed_or_new_endpoints_in_minutes: Optional[int] = None, response_based_origin_error_detection_settings: Optional[ "_models.ResponseBasedOriginErrorDetectionParameters" @@ -3994,9 +4293,9 @@ def __init__( self, *, order: int, - actions: List["_models.DeliveryRuleAction"], + actions: list["_models.DeliveryRuleAction"], name: Optional[str] = None, - conditions: Optional[List["_models.DeliveryRuleCondition"]] = None, + conditions: Optional[list["_models.DeliveryRuleCondition"]] = None, **kwargs: Any ) -> None: """ @@ -5007,8 +5306,8 @@ class DomainValidationProperties(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.validation_token = None - self.expiration_date = None + self.validation_token: Optional[str] = None + self.expiration_date: Optional[str] = None class EdgeNode(ProxyResource): @@ -5016,13 +5315,16 @@ class EdgeNode(ProxyResource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Resource ID. + :ivar id: Fully qualified resource ID for the resource. E.g. + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". :vartype id: str - :ivar name: Resource name. + :ivar name: The name of the resource. :vartype name: str - :ivar type: Resource type. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str - :ivar system_data: Read only system data. + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. :vartype system_data: ~azure.mgmt.cdn.models.SystemData :ivar ip_address_groups: List of ip address groups. :vartype ip_address_groups: list[~azure.mgmt.cdn.models.IpAddressGroup] @@ -5043,7 +5345,7 @@ class EdgeNode(ProxyResource): "ip_address_groups": {"key": "properties.ipAddressGroups", "type": "[IpAddressGroup]"}, } - def __init__(self, *, ip_address_groups: Optional[List["_models.IpAddressGroup"]] = None, **kwargs: Any) -> None: + def __init__(self, *, ip_address_groups: Optional[list["_models.IpAddressGroup"]] = None, **kwargs: Any) -> None: """ :keyword ip_address_groups: List of ip address groups. :paramtype ip_address_groups: list[~azure.mgmt.cdn.models.IpAddressGroup] @@ -5079,11 +5381,11 @@ def __init__(self, *, next_link: Optional[str] = None, **kwargs: Any) -> None: :paramtype next_link: str """ super().__init__(**kwargs) - self.value = None + self.value: Optional[list["_models.EdgeNode"]] = None self.next_link = next_link -class Endpoint(TrackedResource): # pylint: disable=too-many-instance-attributes +class Endpoint(TrackedResource): """CDN endpoint is the entity within a CDN profile containing configuration information such as origin, protocol, content caching and delivery behavior. The CDN endpoint uses the URL format :code:``.azureedge.net. @@ -5092,18 +5394,21 @@ class Endpoint(TrackedResource): # pylint: disable=too-many-instance-attributes All required parameters must be populated in order to send to server. - :ivar id: Resource ID. + :ivar id: Fully qualified resource ID for the resource. E.g. + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". :vartype id: str - :ivar name: Resource name. + :ivar name: The name of the resource. :vartype name: str - :ivar type: Resource type. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str - :ivar system_data: Read only system data. + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. :vartype system_data: ~azure.mgmt.cdn.models.SystemData - :ivar location: Resource location. Required. - :vartype location: str :ivar tags: Resource tags. :vartype tags: dict[str, str] + :ivar location: The geo-location where the resource lives. Required. + :vartype location: str :ivar origin_path: A directory path on the origin that CDN can use to retrieve content from, e.g. contoso.cloudapp.net/originpath. :vartype origin_path: str @@ -5192,8 +5497,8 @@ class Endpoint(TrackedResource): # pylint: disable=too-many-instance-attributes "name": {"key": "name", "type": "str"}, "type": {"key": "type", "type": "str"}, "system_data": {"key": "systemData", "type": "SystemData"}, - "location": {"key": "location", "type": "str"}, "tags": {"key": "tags", "type": "{str}"}, + "location": {"key": "location", "type": "str"}, "origin_path": {"key": "properties.originPath", "type": "str"}, "content_types_to_compress": {"key": "properties.contentTypesToCompress", "type": "[str]"}, "origin_host_header": {"key": "properties.originHostHeader", "type": "str"}, @@ -5226,9 +5531,9 @@ def __init__( # pylint: disable=too-many-locals self, *, location: str, - tags: Optional[Dict[str, str]] = None, + tags: Optional[dict[str, str]] = None, origin_path: Optional[str] = None, - content_types_to_compress: Optional[List[str]] = None, + content_types_to_compress: Optional[list[str]] = None, origin_host_header: Optional[str] = None, is_compression_enabled: Optional[bool] = None, is_http_allowed: bool = True, @@ -5236,22 +5541,22 @@ def __init__( # pylint: disable=too-many-locals query_string_caching_behavior: Optional[Union[str, "_models.QueryStringCachingBehavior"]] = None, optimization_type: Optional[Union[str, "_models.OptimizationType"]] = None, probe_path: Optional[str] = None, - geo_filters: Optional[List["_models.GeoFilter"]] = None, + geo_filters: Optional[list["_models.GeoFilter"]] = None, default_origin_group: Optional["_models.ResourceReference"] = None, - url_signing_keys: Optional[List["_models.UrlSigningKey"]] = None, + url_signing_keys: Optional[list["_models.UrlSigningKey"]] = None, delivery_policy: Optional["_models.EndpointPropertiesUpdateParametersDeliveryPolicy"] = None, web_application_firewall_policy_link: Optional[ "_models.EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink" ] = None, - origins: Optional[List["_models.DeepCreatedOrigin"]] = None, - origin_groups: Optional[List["_models.DeepCreatedOriginGroup"]] = None, + origins: Optional[list["_models.DeepCreatedOrigin"]] = None, + origin_groups: Optional[list["_models.DeepCreatedOriginGroup"]] = None, **kwargs: Any ) -> None: """ - :keyword location: Resource location. Required. - :paramtype location: str :keyword tags: Resource tags. :paramtype tags: dict[str, str] + :keyword location: The geo-location where the resource lives. Required. + :paramtype location: str :keyword origin_path: A directory path on the origin that CDN can use to retrieve content from, e.g. contoso.cloudapp.net/originpath. :paramtype origin_path: str @@ -5312,7 +5617,7 @@ def __init__( # pylint: disable=too-many-locals balancing the traffic based on availability. :paramtype origin_groups: list[~azure.mgmt.cdn.models.DeepCreatedOriginGroup] """ - super().__init__(location=location, tags=tags, **kwargs) + super().__init__(tags=tags, location=location, **kwargs) self.origin_path = origin_path self.content_types_to_compress = content_types_to_compress self.origin_host_header = origin_host_header @@ -5327,12 +5632,12 @@ def __init__( # pylint: disable=too-many-locals self.url_signing_keys = url_signing_keys self.delivery_policy = delivery_policy self.web_application_firewall_policy_link = web_application_firewall_policy_link - self.host_name = None + self.host_name: Optional[str] = None self.origins = origins self.origin_groups = origin_groups - self.custom_domains = None - self.resource_state = None - self.provisioning_state = None + self.custom_domains: Optional[list["_models.DeepCreatedCustomDomain"]] = None + self.resource_state: Optional[Union[str, "_models.EndpointResourceState"]] = None + self.provisioning_state: Optional[Union[str, "_models.EndpointProvisioningState"]] = None class EndpointListResult(_serialization.Model): @@ -5362,11 +5667,11 @@ def __init__(self, *, next_link: Optional[str] = None, **kwargs: Any) -> None: :paramtype next_link: str """ super().__init__(**kwargs) - self.value = None + self.value: Optional[list["_models.Endpoint"]] = None self.next_link = next_link -class EndpointPropertiesUpdateParameters(_serialization.Model): # pylint: disable=too-many-instance-attributes +class EndpointPropertiesUpdateParameters(_serialization.Model): """The JSON object containing endpoint update parameters. :ivar origin_path: A directory path on the origin that CDN can use to retrieve content from, @@ -5448,7 +5753,7 @@ def __init__( self, *, origin_path: Optional[str] = None, - content_types_to_compress: Optional[List[str]] = None, + content_types_to_compress: Optional[list[str]] = None, origin_host_header: Optional[str] = None, is_compression_enabled: Optional[bool] = None, is_http_allowed: bool = True, @@ -5456,9 +5761,9 @@ def __init__( query_string_caching_behavior: Optional[Union[str, "_models.QueryStringCachingBehavior"]] = None, optimization_type: Optional[Union[str, "_models.OptimizationType"]] = None, probe_path: Optional[str] = None, - geo_filters: Optional[List["_models.GeoFilter"]] = None, + geo_filters: Optional[list["_models.GeoFilter"]] = None, default_origin_group: Optional["_models.ResourceReference"] = None, - url_signing_keys: Optional[List["_models.UrlSigningKey"]] = None, + url_signing_keys: Optional[list["_models.UrlSigningKey"]] = None, delivery_policy: Optional["_models.EndpointPropertiesUpdateParametersDeliveryPolicy"] = None, web_application_firewall_policy_link: Optional[ "_models.EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink" @@ -5538,7 +5843,7 @@ def __init__( self.web_application_firewall_policy_link = web_application_firewall_policy_link -class EndpointProperties(EndpointPropertiesUpdateParameters): # pylint: disable=too-many-instance-attributes +class EndpointProperties(EndpointPropertiesUpdateParameters): """The JSON object that contains the properties required to create an endpoint. Variables are only populated by the server, and will be ignored when sending a request. @@ -5653,9 +5958,9 @@ class EndpointProperties(EndpointPropertiesUpdateParameters): # pylint: disable def __init__( self, *, - origins: List["_models.DeepCreatedOrigin"], + origins: list["_models.DeepCreatedOrigin"], origin_path: Optional[str] = None, - content_types_to_compress: Optional[List[str]] = None, + content_types_to_compress: Optional[list[str]] = None, origin_host_header: Optional[str] = None, is_compression_enabled: Optional[bool] = None, is_http_allowed: bool = True, @@ -5663,14 +5968,14 @@ def __init__( query_string_caching_behavior: Optional[Union[str, "_models.QueryStringCachingBehavior"]] = None, optimization_type: Optional[Union[str, "_models.OptimizationType"]] = None, probe_path: Optional[str] = None, - geo_filters: Optional[List["_models.GeoFilter"]] = None, + geo_filters: Optional[list["_models.GeoFilter"]] = None, default_origin_group: Optional["_models.ResourceReference"] = None, - url_signing_keys: Optional[List["_models.UrlSigningKey"]] = None, + url_signing_keys: Optional[list["_models.UrlSigningKey"]] = None, delivery_policy: Optional["_models.EndpointPropertiesUpdateParametersDeliveryPolicy"] = None, web_application_firewall_policy_link: Optional[ "_models.EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink" ] = None, - origin_groups: Optional[List["_models.DeepCreatedOriginGroup"]] = None, + origin_groups: Optional[list["_models.DeepCreatedOriginGroup"]] = None, **kwargs: Any ) -> None: """ @@ -5751,12 +6056,12 @@ def __init__( web_application_firewall_policy_link=web_application_firewall_policy_link, **kwargs ) - self.host_name = None + self.host_name: Optional[str] = None self.origins = origins self.origin_groups = origin_groups - self.custom_domains = None - self.resource_state = None - self.provisioning_state = None + self.custom_domains: Optional[list["_models.DeepCreatedCustomDomain"]] = None + self.resource_state: Optional[Union[str, "_models.EndpointResourceState"]] = None + self.provisioning_state: Optional[Union[str, "_models.EndpointProvisioningState"]] = None class EndpointPropertiesUpdateParametersDeliveryPolicy(_serialization.Model): # pylint: disable=name-too-long @@ -5780,7 +6085,7 @@ class EndpointPropertiesUpdateParametersDeliveryPolicy(_serialization.Model): # } def __init__( - self, *, rules: List["_models.DeliveryRule"], description: Optional[str] = None, **kwargs: Any + self, *, rules: list["_models.DeliveryRule"], description: Optional[str] = None, **kwargs: Any ) -> None: """ :keyword description: User-friendly description of the policy. @@ -5815,7 +6120,7 @@ def __init__(self, *, id: Optional[str] = None, **kwargs: Any) -> None: # pylin self.id = id -class EndpointUpdateParameters(_serialization.Model): # pylint: disable=too-many-instance-attributes +class EndpointUpdateParameters(_serialization.Model): """Properties required to create or update an endpoint. :ivar tags: Endpoint tags. @@ -5902,9 +6207,9 @@ class EndpointUpdateParameters(_serialization.Model): # pylint: disable=too-man def __init__( self, *, - tags: Optional[Dict[str, str]] = None, + tags: Optional[dict[str, str]] = None, origin_path: Optional[str] = None, - content_types_to_compress: Optional[List[str]] = None, + content_types_to_compress: Optional[list[str]] = None, origin_host_header: Optional[str] = None, is_compression_enabled: Optional[bool] = None, is_http_allowed: bool = True, @@ -5912,9 +6217,9 @@ def __init__( query_string_caching_behavior: Optional[Union[str, "_models.QueryStringCachingBehavior"]] = None, optimization_type: Optional[Union[str, "_models.OptimizationType"]] = None, probe_path: Optional[str] = None, - geo_filters: Optional[List["_models.GeoFilter"]] = None, + geo_filters: Optional[list["_models.GeoFilter"]] = None, default_origin_group: Optional["_models.ResourceReference"] = None, - url_signing_keys: Optional[List["_models.UrlSigningKey"]] = None, + url_signing_keys: Optional[list["_models.UrlSigningKey"]] = None, delivery_policy: Optional["_models.EndpointPropertiesUpdateParametersDeliveryPolicy"] = None, web_application_firewall_policy_link: Optional[ "_models.EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink" @@ -6021,8 +6326,8 @@ class ErrorAdditionalInfo(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.type = None - self.info = None + self.type: Optional[str] = None + self.info: Optional[JSON] = None class ErrorDetail(_serialization.Model): @@ -6061,16 +6366,16 @@ class ErrorDetail(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.code = None - self.message = None - self.target = None - self.details = None - self.additional_info = None + self.code: Optional[str] = None + self.message: Optional[str] = None + self.target: Optional[str] = None + self.details: Optional[list["_models.ErrorDetail"]] = None + self.additional_info: Optional[list["_models.ErrorAdditionalInfo"]] = None class ErrorResponse(_serialization.Model): - """Error response indicates Azure Front Door Standard or Azure Front Door Premium or CDN service - is not able to process the incoming request. The reason is provided in the error message. + """Common error response for all Azure Resource Manager APIs to return error details for failed + operations. (This also follows the OData error response format.). :ivar error: The error object. :vartype error: ~azure.mgmt.cdn.models.ErrorDetail @@ -6122,7 +6427,7 @@ def __init__( *, relative_path: str, action: Union[str, "_models.GeoFilterActions"], - country_codes: List[str], + country_codes: list[str], **kwargs: Any ) -> None: """ @@ -6142,13 +6447,18 @@ def __init__( self.country_codes = country_codes -class HeaderActionParameters(_serialization.Model): +class HeaderActionParameters(DeliveryRuleActionParameters): """Defines the parameters for the request header action. All required parameters must be populated in order to send to server. - :ivar type_name: Required. "DeliveryRuleHeaderActionParameters" - :vartype type_name: str or ~azure.mgmt.cdn.models.HeaderActionParametersTypeName + :ivar type_name: Required. Known values are: "DeliveryRuleUrlRedirectActionParameters", + "DeliveryRuleUrlSigningActionParameters", "DeliveryRuleOriginGroupOverrideActionParameters", + "DeliveryRuleUrlRewriteActionParameters", "DeliveryRuleHeaderActionParameters", + "DeliveryRuleCacheExpirationActionParameters", + "DeliveryRuleCacheKeyQueryStringBehaviorActionParameters", and + "DeliveryRuleRouteConfigurationOverrideActionParameters". + :vartype type_name: str or ~azure.mgmt.cdn.models.DeliveryRuleActionParametersType :ivar header_action: Action to perform. Required. Known values are: "Append", "Overwrite", and "Delete". :vartype header_action: str or ~azure.mgmt.cdn.models.HeaderAction @@ -6174,15 +6484,12 @@ class HeaderActionParameters(_serialization.Model): def __init__( self, *, - type_name: Union[str, "_models.HeaderActionParametersTypeName"], header_action: Union[str, "_models.HeaderAction"], header_name: str, value: Optional[str] = None, **kwargs: Any ) -> None: """ - :keyword type_name: Required. "DeliveryRuleHeaderActionParameters" - :paramtype type_name: str or ~azure.mgmt.cdn.models.HeaderActionParametersTypeName :keyword header_action: Action to perform. Required. Known values are: "Append", "Overwrite", and "Delete". :paramtype header_action: str or ~azure.mgmt.cdn.models.HeaderAction @@ -6192,7 +6499,7 @@ def __init__( :paramtype value: str """ super().__init__(**kwargs) - self.type_name = type_name + self.type_name: str = "DeliveryRuleHeaderActionParameters" self.header_action = header_action self.header_name = header_name self.value = value @@ -6255,13 +6562,23 @@ def __init__( self.probe_interval_in_seconds = probe_interval_in_seconds -class HostNameMatchConditionParameters(_serialization.Model): +class HostNameMatchConditionParameters(DeliveryRuleConditionParameters): """Defines the parameters for HostName match conditions. All required parameters must be populated in order to send to server. - :ivar type_name: Required. "DeliveryRuleHostNameConditionParameters" - :vartype type_name: str or ~azure.mgmt.cdn.models.HostNameMatchConditionParametersTypeName + :ivar type_name: Required. Known values are: "DeliveryRuleRemoteAddressConditionParameters", + "DeliveryRuleRequestMethodConditionParameters", "DeliveryRuleQueryStringConditionParameters", + "DeliveryRulePostArgsConditionParameters", "DeliveryRuleRequestUriConditionParameters", + "DeliveryRuleRequestHeaderConditionParameters", "DeliveryRuleRequestBodyConditionParameters", + "DeliveryRuleRequestSchemeConditionParameters", "DeliveryRuleUrlPathMatchConditionParameters", + "DeliveryRuleUrlFileExtensionMatchConditionParameters", + "DeliveryRuleUrlFilenameConditionParameters", "DeliveryRuleHttpVersionConditionParameters", + "DeliveryRuleCookiesConditionParameters", "DeliveryRuleIsDeviceConditionParameters", + "DeliveryRuleSocketAddrConditionParameters", "DeliveryRuleClientPortConditionParameters", + "DeliveryRuleServerPortConditionParameters", "DeliveryRuleHostNameConditionParameters", and + "DeliveryRuleSslProtocolConditionParameters". + :vartype type_name: str or ~azure.mgmt.cdn.models.DeliveryRuleConditionParametersType :ivar operator: Describes operator to be matched. Required. Known values are: "Any", "Equal", "Contains", "BeginsWith", "EndsWith", "LessThan", "LessThanOrEqual", "GreaterThan", "GreaterThanOrEqual", and "RegEx". @@ -6290,16 +6607,13 @@ class HostNameMatchConditionParameters(_serialization.Model): def __init__( self, *, - type_name: Union[str, "_models.HostNameMatchConditionParametersTypeName"], operator: Union[str, "_models.HostNameOperator"], negate_condition: bool = False, - match_values: Optional[List[str]] = None, - transforms: Optional[List[Union[str, "_models.Transform"]]] = None, + match_values: Optional[list[str]] = None, + transforms: Optional[list[Union[str, "_models.Transform"]]] = None, **kwargs: Any ) -> None: """ - :keyword type_name: Required. "DeliveryRuleHostNameConditionParameters" - :paramtype type_name: str or ~azure.mgmt.cdn.models.HostNameMatchConditionParametersTypeName :keyword operator: Describes operator to be matched. Required. Known values are: "Any", "Equal", "Contains", "BeginsWith", "EndsWith", "LessThan", "LessThanOrEqual", "GreaterThan", "GreaterThanOrEqual", and "RegEx". @@ -6312,7 +6626,7 @@ def __init__( :paramtype transforms: list[str or ~azure.mgmt.cdn.models.Transform] """ super().__init__(**kwargs) - self.type_name = type_name + self.type_name: str = "DeliveryRuleHostNameConditionParameters" self.operator = operator self.negate_condition = negate_condition self.match_values = match_values @@ -6350,13 +6664,23 @@ def __init__(self, *, begin: Optional[int] = None, end: Optional[int] = None, ** self.end = end -class HttpVersionMatchConditionParameters(_serialization.Model): +class HttpVersionMatchConditionParameters(DeliveryRuleConditionParameters): """Defines the parameters for HttpVersion match conditions. All required parameters must be populated in order to send to server. - :ivar type_name: Required. "DeliveryRuleHttpVersionConditionParameters" - :vartype type_name: str or ~azure.mgmt.cdn.models.HttpVersionMatchConditionParametersTypeName + :ivar type_name: Required. Known values are: "DeliveryRuleRemoteAddressConditionParameters", + "DeliveryRuleRequestMethodConditionParameters", "DeliveryRuleQueryStringConditionParameters", + "DeliveryRulePostArgsConditionParameters", "DeliveryRuleRequestUriConditionParameters", + "DeliveryRuleRequestHeaderConditionParameters", "DeliveryRuleRequestBodyConditionParameters", + "DeliveryRuleRequestSchemeConditionParameters", "DeliveryRuleUrlPathMatchConditionParameters", + "DeliveryRuleUrlFileExtensionMatchConditionParameters", + "DeliveryRuleUrlFilenameConditionParameters", "DeliveryRuleHttpVersionConditionParameters", + "DeliveryRuleCookiesConditionParameters", "DeliveryRuleIsDeviceConditionParameters", + "DeliveryRuleSocketAddrConditionParameters", "DeliveryRuleClientPortConditionParameters", + "DeliveryRuleServerPortConditionParameters", "DeliveryRuleHostNameConditionParameters", and + "DeliveryRuleSslProtocolConditionParameters". + :vartype type_name: str or ~azure.mgmt.cdn.models.DeliveryRuleConditionParametersType :ivar operator: Describes operator to be matched. Required. "Equal" :vartype operator: str or ~azure.mgmt.cdn.models.HttpVersionOperator :ivar negate_condition: Describes if this is negate condition or not. @@ -6383,16 +6707,13 @@ class HttpVersionMatchConditionParameters(_serialization.Model): def __init__( self, *, - type_name: Union[str, "_models.HttpVersionMatchConditionParametersTypeName"], operator: Union[str, "_models.HttpVersionOperator"], negate_condition: bool = False, - match_values: Optional[List[str]] = None, - transforms: Optional[List[Union[str, "_models.Transform"]]] = None, + match_values: Optional[list[str]] = None, + transforms: Optional[list[Union[str, "_models.Transform"]]] = None, **kwargs: Any ) -> None: """ - :keyword type_name: Required. "DeliveryRuleHttpVersionConditionParameters" - :paramtype type_name: str or ~azure.mgmt.cdn.models.HttpVersionMatchConditionParametersTypeName :keyword operator: Describes operator to be matched. Required. "Equal" :paramtype operator: str or ~azure.mgmt.cdn.models.HttpVersionOperator :keyword negate_condition: Describes if this is negate condition or not. @@ -6403,7 +6724,7 @@ def __init__( :paramtype transforms: list[str or ~azure.mgmt.cdn.models.Transform] """ super().__init__(**kwargs) - self.type_name = type_name + self.type_name: str = "DeliveryRuleHttpVersionConditionParameters" self.operator = operator self.negate_condition = negate_condition self.match_values = match_values @@ -6431,8 +6752,8 @@ def __init__( self, *, delivery_region: Optional[str] = None, - ipv4_addresses: Optional[List["_models.CidrIpAddress"]] = None, - ipv6_addresses: Optional[List["_models.CidrIpAddress"]] = None, + ipv4_addresses: Optional[list["_models.CidrIpAddress"]] = None, + ipv6_addresses: Optional[list["_models.CidrIpAddress"]] = None, **kwargs: Any ) -> None: """ @@ -6449,20 +6770,29 @@ def __init__( self.ipv6_addresses = ipv6_addresses -class IsDeviceMatchConditionParameters(_serialization.Model): +class IsDeviceMatchConditionParameters(DeliveryRuleConditionParameters): """Defines the parameters for IsDevice match conditions. All required parameters must be populated in order to send to server. - :ivar type_name: Required. "DeliveryRuleIsDeviceConditionParameters" - :vartype type_name: str or ~azure.mgmt.cdn.models.IsDeviceMatchConditionParametersTypeName + :ivar type_name: Required. Known values are: "DeliveryRuleRemoteAddressConditionParameters", + "DeliveryRuleRequestMethodConditionParameters", "DeliveryRuleQueryStringConditionParameters", + "DeliveryRulePostArgsConditionParameters", "DeliveryRuleRequestUriConditionParameters", + "DeliveryRuleRequestHeaderConditionParameters", "DeliveryRuleRequestBodyConditionParameters", + "DeliveryRuleRequestSchemeConditionParameters", "DeliveryRuleUrlPathMatchConditionParameters", + "DeliveryRuleUrlFileExtensionMatchConditionParameters", + "DeliveryRuleUrlFilenameConditionParameters", "DeliveryRuleHttpVersionConditionParameters", + "DeliveryRuleCookiesConditionParameters", "DeliveryRuleIsDeviceConditionParameters", + "DeliveryRuleSocketAddrConditionParameters", "DeliveryRuleClientPortConditionParameters", + "DeliveryRuleServerPortConditionParameters", "DeliveryRuleHostNameConditionParameters", and + "DeliveryRuleSslProtocolConditionParameters". + :vartype type_name: str or ~azure.mgmt.cdn.models.DeliveryRuleConditionParametersType :ivar operator: Describes operator to be matched. Required. "Equal" :vartype operator: str or ~azure.mgmt.cdn.models.IsDeviceOperator :ivar negate_condition: Describes if this is negate condition or not. :vartype negate_condition: bool :ivar match_values: The match value for the condition of the delivery rule. - :vartype match_values: list[str or - ~azure.mgmt.cdn.models.IsDeviceMatchConditionParametersMatchValuesItem] + :vartype match_values: list[str or ~azure.mgmt.cdn.models.IsDeviceMatchValue] :ivar transforms: List of transforms. :vartype transforms: list[str or ~azure.mgmt.cdn.models.Transform] """ @@ -6483,41 +6813,38 @@ class IsDeviceMatchConditionParameters(_serialization.Model): def __init__( self, *, - type_name: Union[str, "_models.IsDeviceMatchConditionParametersTypeName"], operator: Union[str, "_models.IsDeviceOperator"], negate_condition: bool = False, - match_values: Optional[List[Union[str, "_models.IsDeviceMatchConditionParametersMatchValuesItem"]]] = None, - transforms: Optional[List[Union[str, "_models.Transform"]]] = None, + match_values: Optional[list[Union[str, "_models.IsDeviceMatchValue"]]] = None, + transforms: Optional[list[Union[str, "_models.Transform"]]] = None, **kwargs: Any ) -> None: """ - :keyword type_name: Required. "DeliveryRuleIsDeviceConditionParameters" - :paramtype type_name: str or ~azure.mgmt.cdn.models.IsDeviceMatchConditionParametersTypeName :keyword operator: Describes operator to be matched. Required. "Equal" :paramtype operator: str or ~azure.mgmt.cdn.models.IsDeviceOperator :keyword negate_condition: Describes if this is negate condition or not. :paramtype negate_condition: bool :keyword match_values: The match value for the condition of the delivery rule. - :paramtype match_values: list[str or - ~azure.mgmt.cdn.models.IsDeviceMatchConditionParametersMatchValuesItem] + :paramtype match_values: list[str or ~azure.mgmt.cdn.models.IsDeviceMatchValue] :keyword transforms: List of transforms. :paramtype transforms: list[str or ~azure.mgmt.cdn.models.Transform] """ super().__init__(**kwargs) - self.type_name = type_name + self.type_name: str = "DeliveryRuleIsDeviceConditionParameters" self.operator = operator self.negate_condition = negate_condition self.match_values = match_values self.transforms = transforms -class KeyVaultCertificateSourceParameters(_serialization.Model): +class KeyVaultCertificateSourceParameters(CertificateSourceParameters): """Describes the parameters for using a user's KeyVault certificate for securing custom domain. All required parameters must be populated in order to send to server. - :ivar type_name: Required. "KeyVaultCertificateSourceParameters" - :vartype type_name: str or ~azure.mgmt.cdn.models.KeyVaultCertificateSourceParametersTypeName + :ivar type_name: Required. Known values are: "CdnCertificateSourceParameters" and + "KeyVaultCertificateSourceParameters". + :vartype type_name: str or ~azure.mgmt.cdn.models.CertificateSourceParametersType :ivar subscription_id: Subscription Id of the user's Key Vault containing the SSL certificate. Required. :vartype subscription_id: str @@ -6563,7 +6890,6 @@ class KeyVaultCertificateSourceParameters(_serialization.Model): def __init__( self, *, - type_name: Union[str, "_models.KeyVaultCertificateSourceParametersTypeName"], subscription_id: str, resource_group_name: str, vault_name: str, @@ -6574,8 +6900,6 @@ def __init__( **kwargs: Any ) -> None: """ - :keyword type_name: Required. "KeyVaultCertificateSourceParameters" - :paramtype type_name: str or ~azure.mgmt.cdn.models.KeyVaultCertificateSourceParametersTypeName :keyword subscription_id: Subscription Id of the user's Key Vault containing the SSL certificate. Required. :paramtype subscription_id: str @@ -6597,7 +6921,7 @@ def __init__( :paramtype delete_rule: str or ~azure.mgmt.cdn.models.DeleteRule """ super().__init__(**kwargs) - self.type_name = type_name + self.type_name: str = "KeyVaultCertificateSourceParameters" self.subscription_id = subscription_id self.resource_group_name = resource_group_name self.vault_name = vault_name @@ -6613,7 +6937,7 @@ class KeyVaultSigningKeyParameters(_serialization.Model): All required parameters must be populated in order to send to server. :ivar type_name: Required. "KeyVaultSigningKeyParameters" - :vartype type_name: str or ~azure.mgmt.cdn.models.KeyVaultSigningKeyParametersTypeName + :vartype type_name: str or ~azure.mgmt.cdn.models.KeyVaultSigningKeyParametersType :ivar subscription_id: Subscription Id of the user's Key Vault containing the secret. Required. :vartype subscription_id: str :ivar resource_group_name: Resource group of the user's Key Vault containing the secret. @@ -6648,7 +6972,7 @@ class KeyVaultSigningKeyParameters(_serialization.Model): def __init__( self, *, - type_name: Union[str, "_models.KeyVaultSigningKeyParametersTypeName"], + type_name: Union[str, "_models.KeyVaultSigningKeyParametersType"], subscription_id: str, resource_group_name: str, vault_name: str, @@ -6658,7 +6982,7 @@ def __init__( ) -> None: """ :keyword type_name: Required. "KeyVaultSigningKeyParameters" - :paramtype type_name: str or ~azure.mgmt.cdn.models.KeyVaultSigningKeyParametersTypeName + :paramtype type_name: str or ~azure.mgmt.cdn.models.KeyVaultSigningKeyParametersType :keyword subscription_id: Subscription Id of the user's Key Vault containing the secret. Required. :paramtype subscription_id: str @@ -6742,7 +7066,7 @@ class LoadParameters(_serialization.Model): "content_paths": {"key": "contentPaths", "type": "[str]"}, } - def __init__(self, *, content_paths: List[str], **kwargs: Any) -> None: + def __init__(self, *, content_paths: list[str], **kwargs: Any) -> None: """ :keyword content_paths: The path to the content to be loaded. Path should be a relative file URL of the origin. Required. @@ -6845,8 +7169,8 @@ def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.type: str = "ManagedCertificate" - self.subject = None - self.expiration_date = None + self.subject: Optional[str] = None + self.expiration_date: Optional[str] = None class ManagedRuleDefinition(_serialization.Model): @@ -6873,8 +7197,8 @@ class ManagedRuleDefinition(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.rule_id = None - self.description = None + self.rule_id: Optional[str] = None + self.description: Optional[str] = None class ManagedRuleGroupDefinition(_serialization.Model): @@ -6905,9 +7229,9 @@ class ManagedRuleGroupDefinition(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.rule_group_name = None - self.description = None - self.rules = None + self.rule_group_name: Optional[str] = None + self.description: Optional[str] = None + self.rules: Optional[list["_models.ManagedRuleDefinition"]] = None class ManagedRuleGroupOverride(_serialization.Model): @@ -6933,7 +7257,7 @@ class ManagedRuleGroupOverride(_serialization.Model): } def __init__( - self, *, rule_group_name: str, rules: Optional[List["_models.ManagedRuleOverride"]] = None, **kwargs: Any + self, *, rule_group_name: str, rules: Optional[list["_models.ManagedRuleOverride"]] = None, **kwargs: Any ) -> None: """ :keyword rule_group_name: Describes the managed rule group within the rule set to override. @@ -7032,7 +7356,7 @@ def __init__( rule_set_type: str, rule_set_version: str, anomaly_score: Optional[int] = None, - rule_group_overrides: Optional[List["_models.ManagedRuleGroupOverride"]] = None, + rule_group_overrides: Optional[list["_models.ManagedRuleGroupOverride"]] = None, **kwargs: Any ) -> None: """ @@ -7058,13 +7382,16 @@ class ManagedRuleSetDefinition(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Resource ID. + :ivar id: Fully qualified resource ID for the resource. E.g. + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". :vartype id: str - :ivar name: Resource name. + :ivar name: The name of the resource. :vartype name: str - :ivar type: Resource type. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str - :ivar system_data: Read only system data. + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. :vartype system_data: ~azure.mgmt.cdn.models.SystemData :ivar sku: The pricing tier (defines a CDN provider, feature list and rate) of the CdnWebApplicationFirewallPolicy. @@ -7110,10 +7437,10 @@ def __init__(self, *, sku: Optional["_models.Sku"] = None, **kwargs: Any) -> Non """ super().__init__(**kwargs) self.sku = sku - self.provisioning_state = None - self.rule_set_type = None - self.rule_set_version = None - self.rule_groups = None + self.provisioning_state: Optional[str] = None + self.rule_set_type: Optional[str] = None + self.rule_set_version: Optional[str] = None + self.rule_groups: Optional[list["_models.ManagedRuleGroupDefinition"]] = None class ManagedRuleSetDefinitionList(_serialization.Model): @@ -7142,7 +7469,7 @@ def __init__(self, *, next_link: Optional[str] = None, **kwargs: Any) -> None: :paramtype next_link: str """ super().__init__(**kwargs) - self.value = None + self.value: Optional[list["_models.ManagedRuleSetDefinition"]] = None self.next_link = next_link @@ -7157,7 +7484,7 @@ class ManagedRuleSetList(_serialization.Model): "managed_rule_sets": {"key": "managedRuleSets", "type": "[ManagedRuleSet]"}, } - def __init__(self, *, managed_rule_sets: Optional[List["_models.ManagedRuleSet"]] = None, **kwargs: Any) -> None: + def __init__(self, *, managed_rule_sets: Optional[list["_models.ManagedRuleSet"]] = None, **kwargs: Any) -> None: """ :keyword managed_rule_sets: List of rule sets. :paramtype managed_rule_sets: list[~azure.mgmt.cdn.models.ManagedRuleSet] @@ -7181,11 +7508,11 @@ class ManagedServiceIdentity(_serialization.Model): :vartype tenant_id: str :ivar type: Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). Required. Known values are: "None", "SystemAssigned", "UserAssigned", and - "SystemAssigned, UserAssigned". + "SystemAssigned,UserAssigned". :vartype type: str or ~azure.mgmt.cdn.models.ManagedServiceIdentityType :ivar user_assigned_identities: The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. # pylint: disable=line-too-long + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. The dictionary values can be empty objects ({}) in requests. :vartype user_assigned_identities: dict[str, ~azure.mgmt.cdn.models.UserAssignedIdentity] """ @@ -7207,23 +7534,23 @@ def __init__( self, *, type: Union[str, "_models.ManagedServiceIdentityType"], - user_assigned_identities: Optional[Dict[str, "_models.UserAssignedIdentity"]] = None, + user_assigned_identities: Optional[dict[str, "_models.UserAssignedIdentity"]] = None, **kwargs: Any ) -> None: """ :keyword type: Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). Required. Known values are: "None", "SystemAssigned", "UserAssigned", and - "SystemAssigned, UserAssigned". + "SystemAssigned,UserAssigned". :paramtype type: str or ~azure.mgmt.cdn.models.ManagedServiceIdentityType :keyword user_assigned_identities: The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. # pylint: disable=line-too-long + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. The dictionary values can be empty objects ({}) in requests. :paramtype user_assigned_identities: dict[str, ~azure.mgmt.cdn.models.UserAssignedIdentity] """ super().__init__(**kwargs) - self.principal_id = None - self.tenant_id = None + self.principal_id: Optional[str] = None + self.tenant_id: Optional[str] = None self.type = type self.user_assigned_identities = user_assigned_identities @@ -7272,10 +7599,10 @@ def __init__( *, match_variable: Union[str, "_models.WafMatchVariable"], operator: Union[str, "_models.Operator"], - match_value: List[str], + match_value: list[str], selector: Optional[str] = None, negate_condition: Optional[bool] = None, - transforms: Optional[List[Union[str, "_models.TransformType"]]] = None, + transforms: Optional[list[Union[str, "_models.TransformType"]]] = None, **kwargs: Any ) -> None: """ @@ -7332,7 +7659,7 @@ def __init__(self, *, time_grain: Optional[str] = None, blob_duration: Optional[ self.blob_duration = blob_duration -class MetricSpecification(_serialization.Model): # pylint: disable=too-many-instance-attributes +class MetricSpecification(_serialization.Model): """Metric specification of operation. :ivar name: Name of metric specification. @@ -7382,9 +7709,9 @@ def __init__( display_description: Optional[str] = None, unit: Optional[str] = None, aggregation_type: Optional[str] = None, - availabilities: Optional[List["_models.MetricAvailability"]] = None, - supported_time_grain_types: Optional[List[str]] = None, - dimensions: Optional[List["_models.DimensionProperties"]] = None, + availabilities: Optional[list["_models.MetricAvailability"]] = None, + supported_time_grain_types: Optional[list[str]] = None, + dimensions: Optional[list["_models.DimensionProperties"]] = None, fill_gap_with_zero: Optional[bool] = None, metric_filter_pattern: Optional[str] = None, is_internal: Optional[bool] = None, @@ -7455,7 +7782,7 @@ def __init__( date_time_begin: Optional[datetime.datetime] = None, date_time_end: Optional[datetime.datetime] = None, granularity: Optional[Union[str, "_models.MetricsGranularity"]] = None, - series: Optional[List["_models.MetricsResponseSeriesItem"]] = None, + series: Optional[list["_models.MetricsResponseSeriesItem"]] = None, **kwargs: Any ) -> None: """ @@ -7504,9 +7831,9 @@ def __init__( *, metric: Optional[str] = None, unit: Optional[Union[str, "_models.MetricsSeriesUnit"]] = None, - groups: Optional[List["_models.MetricsResponseSeriesPropertiesItemsItem"]] = None, + groups: Optional[list["_models.MetricsResponseSeriesPropertiesItemsItem"]] = None, data: Optional[ - List["_models.Components1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsPropertiesDataItems"] + list["_models.Components1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsPropertiesDataItems"] ] = None, **kwargs: Any ) -> None: @@ -7582,9 +7909,39 @@ class MigrateResult(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.id = None - self.type = None - self.migrated_profile_resource_id = None + self.id: Optional[str] = None + self.type: Optional[str] = None + self.migrated_profile_resource_id: Optional["_models.ResourceReference"] = None + + +class MigrationEndpointMapping(_serialization.Model): + """CDN Endpoint Mapping. + + :ivar migrated_from: Name of the classic CDN profile endpoint. + :vartype migrated_from: str + :ivar migrated_to: Name of the newly created migrated Azure Frontdoor Standard/Premium profile + endpoint. This name will replace the name of the classic CDN endpoint resource. + :vartype migrated_to: str + """ + + _attribute_map = { + "migrated_from": {"key": "migratedFrom", "type": "str"}, + "migrated_to": {"key": "migratedTo", "type": "str"}, + } + + def __init__( + self, *, migrated_from: Optional[str] = None, migrated_to: Optional[str] = None, **kwargs: Any + ) -> None: + """ + :keyword migrated_from: Name of the classic CDN profile endpoint. + :paramtype migrated_from: str + :keyword migrated_to: Name of the newly created migrated Azure Frontdoor Standard/Premium + profile endpoint. This name will replace the name of the classic CDN endpoint resource. + :paramtype migrated_to: str + """ + super().__init__(**kwargs) + self.migrated_from = migrated_from + self.migrated_to = migrated_to class MigrationErrorType(_serialization.Model): @@ -7620,10 +7977,10 @@ class MigrationErrorType(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.code = None - self.resource_name = None - self.error_message = None - self.next_steps = None + self.code: Optional[str] = None + self.resource_name: Optional[str] = None + self.error_message: Optional[str] = None + self.next_steps: Optional[str] = None class MigrationParameters(_serialization.Model): @@ -7666,7 +8023,7 @@ def __init__( classic_resource_reference: "_models.ResourceReference", profile_name: str, migration_web_application_firewall_mappings: Optional[ - List["_models.MigrationWebApplicationFirewallMapping"] + list["_models.MigrationWebApplicationFirewallMapping"] ] = None, **kwargs: Any ) -> None: @@ -7768,10 +8125,10 @@ def __init__( :paramtype service_specification: ~azure.mgmt.cdn.models.ServiceSpecification """ super().__init__(**kwargs) - self.name = None + self.name: Optional[str] = None self.is_data_action = is_data_action self.display = display - self.origin = None + self.origin: Optional[str] = None self.service_specification = service_specification @@ -7807,10 +8164,10 @@ class OperationDisplay(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.provider = None - self.resource = None - self.operation = None - self.description = None + self.provider: Optional[str] = None + self.resource: Optional[str] = None + self.operation: Optional[str] = None + self.description: Optional[str] = None class OperationsListResult(_serialization.Model): @@ -7829,7 +8186,7 @@ class OperationsListResult(_serialization.Model): } def __init__( - self, *, value: Optional[List["_models.Operation"]] = None, next_link: Optional[str] = None, **kwargs: Any + self, *, value: Optional[list["_models.Operation"]] = None, next_link: Optional[str] = None, **kwargs: Any ) -> None: """ :keyword value: List of CDN operations supported by the CDN resource provider. @@ -7842,20 +8199,23 @@ def __init__( self.next_link = next_link -class Origin(ProxyResource): # pylint: disable=too-many-instance-attributes +class Origin(ProxyResource): """CDN origin is the source of the content being delivered via CDN. When the edge nodes represented by an endpoint do not have the requested content cached, they attempt to fetch it from one or more of the configured origins. Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Resource ID. + :ivar id: Fully qualified resource ID for the resource. E.g. + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". :vartype id: str - :ivar name: Resource name. + :ivar name: The name of the resource. :vartype name: str - :ivar type: Resource type. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str - :ivar system_data: Read only system data. + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. :vartype system_data: ~azure.mgmt.cdn.models.SystemData :ivar host_name: The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported.This should be unique across all origins in an endpoint. @@ -7999,9 +8359,54 @@ def __init__( self.private_link_resource_id = private_link_resource_id self.private_link_location = private_link_location self.private_link_approval_message = private_link_approval_message - self.resource_state = None - self.provisioning_state = None - self.private_endpoint_status = None + self.resource_state: Optional[Union[str, "_models.OriginResourceState"]] = None + self.provisioning_state: Optional[Union[str, "_models.OriginProvisioningState"]] = None + self.private_endpoint_status: Optional[Union[str, "_models.PrivateEndpointStatus"]] = None + + +class OriginAuthenticationProperties(_serialization.Model): + """The JSON object that contains the properties of the origin authentication settings. + + :ivar type: The type of the authentication for the origin. Known values are: + "SystemAssignedIdentity" and "UserAssignedIdentity". + :vartype type: str or ~azure.mgmt.cdn.models.OriginAuthenticationType + :ivar user_assigned_identity: The user assigned managed identity to use for the origin + authentication if type is UserAssignedIdentity. + :vartype user_assigned_identity: ~azure.mgmt.cdn.models.ResourceReference + :ivar scope: The scope used when requesting token from Microsoft Entra. For example, for Azure + Blob Storage, scope could be "https://storage.azure.com/.default". + :vartype scope: str + """ + + _attribute_map = { + "type": {"key": "type", "type": "str"}, + "user_assigned_identity": {"key": "userAssignedIdentity", "type": "ResourceReference"}, + "scope": {"key": "scope", "type": "str"}, + } + + def __init__( + self, + *, + type: Optional[Union[str, "_models.OriginAuthenticationType"]] = None, + user_assigned_identity: Optional["_models.ResourceReference"] = None, + scope: Optional[str] = None, + **kwargs: Any + ) -> None: + """ + :keyword type: The type of the authentication for the origin. Known values are: + "SystemAssignedIdentity" and "UserAssignedIdentity". + :paramtype type: str or ~azure.mgmt.cdn.models.OriginAuthenticationType + :keyword user_assigned_identity: The user assigned managed identity to use for the origin + authentication if type is UserAssignedIdentity. + :paramtype user_assigned_identity: ~azure.mgmt.cdn.models.ResourceReference + :keyword scope: The scope used when requesting token from Microsoft Entra. For example, for + Azure Blob Storage, scope could be "https://storage.azure.com/.default". + :paramtype scope: str + """ + super().__init__(**kwargs) + self.type = type + self.user_assigned_identity = user_assigned_identity + self.scope = scope class OriginGroup(ProxyResource): @@ -8010,13 +8415,16 @@ class OriginGroup(ProxyResource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Resource ID. + :ivar id: Fully qualified resource ID for the resource. E.g. + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". :vartype id: str - :ivar name: Resource name. + :ivar name: The name of the resource. :vartype name: str - :ivar type: Resource type. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str - :ivar system_data: Read only system data. + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. :vartype system_data: ~azure.mgmt.cdn.models.SystemData :ivar health_probe_settings: Health probe settings to the origin that is used to determine the health of the origin. @@ -8073,7 +8481,7 @@ def __init__( self, *, health_probe_settings: Optional["_models.HealthProbeParameters"] = None, - origins: Optional[List["_models.ResourceReference"]] = None, + origins: Optional[list["_models.ResourceReference"]] = None, traffic_restoration_time_to_healed_or_new_endpoints_in_minutes: Optional[int] = None, response_based_origin_error_detection_settings: Optional[ "_models.ResponseBasedOriginErrorDetectionParameters" @@ -8103,8 +8511,8 @@ def __init__( traffic_restoration_time_to_healed_or_new_endpoints_in_minutes ) self.response_based_origin_error_detection_settings = response_based_origin_error_detection_settings - self.resource_state = None - self.provisioning_state = None + self.resource_state: Optional[Union[str, "_models.OriginGroupResourceState"]] = None + self.provisioning_state: Optional[Union[str, "_models.OriginGroupProvisioningState"]] = None class OriginGroupListResult(_serialization.Model): @@ -8134,7 +8542,7 @@ def __init__(self, *, next_link: Optional[str] = None, **kwargs: Any) -> None: :paramtype next_link: str """ super().__init__(**kwargs) - self.value = None + self.value: Optional[list["_models.OriginGroup"]] = None self.next_link = next_link @@ -8208,13 +8616,18 @@ def __init__(self, *, parameters: "_models.OriginGroupOverrideActionParameters", self.parameters = parameters -class OriginGroupOverrideActionParameters(_serialization.Model): +class OriginGroupOverrideActionParameters(DeliveryRuleActionParameters): """Defines the parameters for the origin group override action. All required parameters must be populated in order to send to server. - :ivar type_name: Required. "DeliveryRuleOriginGroupOverrideActionParameters" - :vartype type_name: str or ~azure.mgmt.cdn.models.OriginGroupOverrideActionParametersTypeName + :ivar type_name: Required. Known values are: "DeliveryRuleUrlRedirectActionParameters", + "DeliveryRuleUrlSigningActionParameters", "DeliveryRuleOriginGroupOverrideActionParameters", + "DeliveryRuleUrlRewriteActionParameters", "DeliveryRuleHeaderActionParameters", + "DeliveryRuleCacheExpirationActionParameters", + "DeliveryRuleCacheKeyQueryStringBehaviorActionParameters", and + "DeliveryRuleRouteConfigurationOverrideActionParameters". + :vartype type_name: str or ~azure.mgmt.cdn.models.DeliveryRuleActionParametersType :ivar origin_group: defines the OriginGroup that would override the DefaultOriginGroup. Required. :vartype origin_group: ~azure.mgmt.cdn.models.ResourceReference @@ -8230,22 +8643,14 @@ class OriginGroupOverrideActionParameters(_serialization.Model): "origin_group": {"key": "originGroup", "type": "ResourceReference"}, } - def __init__( - self, - *, - type_name: Union[str, "_models.OriginGroupOverrideActionParametersTypeName"], - origin_group: "_models.ResourceReference", - **kwargs: Any - ) -> None: + def __init__(self, *, origin_group: "_models.ResourceReference", **kwargs: Any) -> None: """ - :keyword type_name: Required. "DeliveryRuleOriginGroupOverrideActionParameters" - :paramtype type_name: str or ~azure.mgmt.cdn.models.OriginGroupOverrideActionParametersTypeName :keyword origin_group: defines the OriginGroup that would override the DefaultOriginGroup. Required. :paramtype origin_group: ~azure.mgmt.cdn.models.ResourceReference """ super().__init__(**kwargs) - self.type_name = type_name + self.type_name: str = "DeliveryRuleOriginGroupOverrideActionParameters" self.origin_group = origin_group @@ -8289,7 +8694,7 @@ def __init__( self, *, health_probe_settings: Optional["_models.HealthProbeParameters"] = None, - origins: Optional[List["_models.ResourceReference"]] = None, + origins: Optional[list["_models.ResourceReference"]] = None, traffic_restoration_time_to_healed_or_new_endpoints_in_minutes: Optional[int] = None, response_based_origin_error_detection_settings: Optional[ "_models.ResponseBasedOriginErrorDetectionParameters" @@ -8373,7 +8778,7 @@ def __init__( self, *, health_probe_settings: Optional["_models.HealthProbeParameters"] = None, - origins: Optional[List["_models.ResourceReference"]] = None, + origins: Optional[list["_models.ResourceReference"]] = None, traffic_restoration_time_to_healed_or_new_endpoints_in_minutes: Optional[int] = None, response_based_origin_error_detection_settings: Optional[ "_models.ResponseBasedOriginErrorDetectionParameters" @@ -8403,8 +8808,8 @@ def __init__( response_based_origin_error_detection_settings=response_based_origin_error_detection_settings, **kwargs ) - self.resource_state = None - self.provisioning_state = None + self.resource_state: Optional[Union[str, "_models.OriginGroupResourceState"]] = None + self.provisioning_state: Optional[Union[str, "_models.OriginGroupProvisioningState"]] = None class OriginGroupUpdateParameters(_serialization.Model): @@ -8447,7 +8852,7 @@ def __init__( self, *, health_probe_settings: Optional["_models.HealthProbeParameters"] = None, - origins: Optional[List["_models.ResourceReference"]] = None, + origins: Optional[list["_models.ResourceReference"]] = None, traffic_restoration_time_to_healed_or_new_endpoints_in_minutes: Optional[int] = None, response_based_origin_error_detection_settings: Optional[ "_models.ResponseBasedOriginErrorDetectionParameters" @@ -8506,11 +8911,11 @@ def __init__(self, *, next_link: Optional[str] = None, **kwargs: Any) -> None: :paramtype next_link: str """ super().__init__(**kwargs) - self.value = None + self.value: Optional[list["_models.Origin"]] = None self.next_link = next_link -class OriginUpdatePropertiesParameters(_serialization.Model): # pylint: disable=too-many-instance-attributes +class OriginUpdatePropertiesParameters(_serialization.Model): """The JSON object that contains the properties of the origin. :ivar host_name: The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses @@ -8634,7 +9039,7 @@ def __init__( self.private_link_approval_message = private_link_approval_message -class OriginProperties(OriginUpdatePropertiesParameters): # pylint: disable=too-many-instance-attributes +class OriginProperties(OriginUpdatePropertiesParameters): """The JSON object that contains the properties of the origin. Variables are only populated by the server, and will be ignored when sending a request. @@ -8775,12 +9180,12 @@ def __init__( private_link_approval_message=private_link_approval_message, **kwargs ) - self.resource_state = None - self.provisioning_state = None - self.private_endpoint_status = None + self.resource_state: Optional[Union[str, "_models.OriginResourceState"]] = None + self.provisioning_state: Optional[Union[str, "_models.OriginProvisioningState"]] = None + self.private_endpoint_status: Optional[Union[str, "_models.PrivateEndpointStatus"]] = None -class OriginUpdateParameters(_serialization.Model): # pylint: disable=too-many-instance-attributes +class OriginUpdateParameters(_serialization.Model): """Origin properties needed for origin update. :ivar host_name: The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses @@ -8979,13 +9384,23 @@ def __init__( self.default_custom_block_response_body = default_custom_block_response_body -class PostArgsMatchConditionParameters(_serialization.Model): +class PostArgsMatchConditionParameters(DeliveryRuleConditionParameters): """Defines the parameters for PostArgs match conditions. All required parameters must be populated in order to send to server. - :ivar type_name: Required. "DeliveryRulePostArgsConditionParameters" - :vartype type_name: str or ~azure.mgmt.cdn.models.PostArgsMatchConditionParametersTypeName + :ivar type_name: Required. Known values are: "DeliveryRuleRemoteAddressConditionParameters", + "DeliveryRuleRequestMethodConditionParameters", "DeliveryRuleQueryStringConditionParameters", + "DeliveryRulePostArgsConditionParameters", "DeliveryRuleRequestUriConditionParameters", + "DeliveryRuleRequestHeaderConditionParameters", "DeliveryRuleRequestBodyConditionParameters", + "DeliveryRuleRequestSchemeConditionParameters", "DeliveryRuleUrlPathMatchConditionParameters", + "DeliveryRuleUrlFileExtensionMatchConditionParameters", + "DeliveryRuleUrlFilenameConditionParameters", "DeliveryRuleHttpVersionConditionParameters", + "DeliveryRuleCookiesConditionParameters", "DeliveryRuleIsDeviceConditionParameters", + "DeliveryRuleSocketAddrConditionParameters", "DeliveryRuleClientPortConditionParameters", + "DeliveryRuleServerPortConditionParameters", "DeliveryRuleHostNameConditionParameters", and + "DeliveryRuleSslProtocolConditionParameters". + :vartype type_name: str or ~azure.mgmt.cdn.models.DeliveryRuleConditionParametersType :ivar selector: Name of PostArg to be matched. :vartype selector: str :ivar operator: Describes operator to be matched. Required. Known values are: "Any", "Equal", @@ -9017,17 +9432,14 @@ class PostArgsMatchConditionParameters(_serialization.Model): def __init__( self, *, - type_name: Union[str, "_models.PostArgsMatchConditionParametersTypeName"], operator: Union[str, "_models.PostArgsOperator"], selector: Optional[str] = None, negate_condition: bool = False, - match_values: Optional[List[str]] = None, - transforms: Optional[List[Union[str, "_models.Transform"]]] = None, + match_values: Optional[list[str]] = None, + transforms: Optional[list[Union[str, "_models.Transform"]]] = None, **kwargs: Any ) -> None: """ - :keyword type_name: Required. "DeliveryRulePostArgsConditionParameters" - :paramtype type_name: str or ~azure.mgmt.cdn.models.PostArgsMatchConditionParametersTypeName :keyword selector: Name of PostArg to be matched. :paramtype selector: str :keyword operator: Describes operator to be matched. Required. Known values are: "Any", @@ -9042,7 +9454,7 @@ def __init__( :paramtype transforms: list[str or ~azure.mgmt.cdn.models.Transform] """ super().__init__(**kwargs) - self.type_name = type_name + self.type_name: str = "DeliveryRulePostArgsConditionParameters" self.selector = selector self.operator = operator self.negate_condition = negate_condition @@ -9050,25 +9462,28 @@ def __init__( self.transforms = transforms -class Profile(TrackedResource): # pylint: disable=too-many-instance-attributes +class Profile(TrackedResource): """A profile is a logical grouping of endpoints that share the same settings. Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to server. - :ivar id: Resource ID. + :ivar id: Fully qualified resource ID for the resource. E.g. + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". :vartype id: str - :ivar name: Resource name. + :ivar name: The name of the resource. :vartype name: str - :ivar type: Resource type. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str - :ivar system_data: Read only system data. + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. :vartype system_data: ~azure.mgmt.cdn.models.SystemData - :ivar location: Resource location. Required. - :vartype location: str :ivar tags: Resource tags. :vartype tags: dict[str, str] + :ivar location: The geo-location where the resource lives. Required. + :vartype location: str :ivar sku: The pricing tier (defines Azure Front Door Standard or Premium or a CDN provider, feature list and rate) of the profile. Required. :vartype sku: ~azure.mgmt.cdn.models.Sku @@ -9116,8 +9531,8 @@ class Profile(TrackedResource): # pylint: disable=too-many-instance-attributes "name": {"key": "name", "type": "str"}, "type": {"key": "type", "type": "str"}, "system_data": {"key": "systemData", "type": "SystemData"}, - "location": {"key": "location", "type": "str"}, "tags": {"key": "tags", "type": "{str}"}, + "location": {"key": "location", "type": "str"}, "sku": {"key": "sku", "type": "Sku"}, "kind": {"key": "kind", "type": "str"}, "identity": {"key": "identity", "type": "ManagedServiceIdentity"}, @@ -9134,17 +9549,17 @@ def __init__( *, location: str, sku: "_models.Sku", - tags: Optional[Dict[str, str]] = None, + tags: Optional[dict[str, str]] = None, identity: Optional["_models.ManagedServiceIdentity"] = None, origin_response_timeout_seconds: Optional[int] = None, log_scrubbing: Optional["_models.ProfileLogScrubbing"] = None, **kwargs: Any ) -> None: """ - :keyword location: Resource location. Required. - :paramtype location: str :keyword tags: Resource tags. :paramtype tags: dict[str, str] + :keyword location: The geo-location where the resource lives. Required. + :paramtype location: str :keyword sku: The pricing tier (defines Azure Front Door Standard or Premium or a CDN provider, feature list and rate) of the profile. Required. :paramtype sku: ~azure.mgmt.cdn.models.Sku @@ -9157,14 +9572,14 @@ def __init__( profile logs. :paramtype log_scrubbing: ~azure.mgmt.cdn.models.ProfileLogScrubbing """ - super().__init__(location=location, tags=tags, **kwargs) + super().__init__(tags=tags, location=location, **kwargs) self.sku = sku - self.kind = None + self.kind: Optional[str] = None self.identity = identity - self.resource_state = None - self.provisioning_state = None - self.extended_properties = None - self.front_door_id = None + self.resource_state: Optional[Union[str, "_models.ProfileResourceState"]] = None + self.provisioning_state: Optional[Union[str, "_models.ProfileProvisioningState"]] = None + self.extended_properties: Optional[dict[str, str]] = None + self.front_door_id: Optional[str] = None self.origin_response_timeout_seconds = origin_response_timeout_seconds self.log_scrubbing = log_scrubbing @@ -9231,7 +9646,7 @@ def __init__(self, *, next_link: Optional[str] = None, **kwargs: Any) -> None: :paramtype next_link: str """ super().__init__(**kwargs) - self.value = None + self.value: Optional[list["_models.Profile"]] = None self.next_link = next_link @@ -9255,7 +9670,7 @@ def __init__( self, *, state: Optional[Union[str, "_models.ProfileScrubbingState"]] = None, - scrubbing_rules: Optional[List["_models.ProfileScrubbingRules"]] = None, + scrubbing_rules: Optional[list["_models.ProfileScrubbingRules"]] = None, **kwargs: Any ) -> None: """ @@ -9361,7 +9776,7 @@ class ProfileUpdateParameters(_serialization.Model): def __init__( self, *, - tags: Optional[Dict[str, str]] = None, + tags: Optional[dict[str, str]] = None, identity: Optional["_models.ManagedServiceIdentity"] = None, origin_response_timeout_seconds: Optional[int] = None, log_scrubbing: Optional["_models.ProfileLogScrubbing"] = None, @@ -9403,7 +9818,7 @@ class ProfileUpgradeParameters(_serialization.Model): "waf_mapping_list": {"key": "wafMappingList", "type": "[ProfileChangeSkuWafMapping]"}, } - def __init__(self, *, waf_mapping_list: List["_models.ProfileChangeSkuWafMapping"], **kwargs: Any) -> None: + def __init__(self, *, waf_mapping_list: list["_models.ProfileChangeSkuWafMapping"], **kwargs: Any) -> None: """ :keyword waf_mapping_list: Web Application Firewall (WAF) and security policy mapping for the profile upgrade. Required. @@ -9431,7 +9846,7 @@ class PurgeParameters(_serialization.Model): "content_paths": {"key": "contentPaths", "type": "[str]"}, } - def __init__(self, *, content_paths: List[str], **kwargs: Any) -> None: + def __init__(self, *, content_paths: list[str], **kwargs: Any) -> None: """ :keyword content_paths: The path to the content to be purged. Can describe a file path or a wild card directory. Required. @@ -9441,13 +9856,23 @@ def __init__(self, *, content_paths: List[str], **kwargs: Any) -> None: self.content_paths = content_paths -class QueryStringMatchConditionParameters(_serialization.Model): +class QueryStringMatchConditionParameters(DeliveryRuleConditionParameters): """Defines the parameters for QueryString match conditions. All required parameters must be populated in order to send to server. - :ivar type_name: Required. "DeliveryRuleQueryStringConditionParameters" - :vartype type_name: str or ~azure.mgmt.cdn.models.QueryStringMatchConditionParametersTypeName + :ivar type_name: Required. Known values are: "DeliveryRuleRemoteAddressConditionParameters", + "DeliveryRuleRequestMethodConditionParameters", "DeliveryRuleQueryStringConditionParameters", + "DeliveryRulePostArgsConditionParameters", "DeliveryRuleRequestUriConditionParameters", + "DeliveryRuleRequestHeaderConditionParameters", "DeliveryRuleRequestBodyConditionParameters", + "DeliveryRuleRequestSchemeConditionParameters", "DeliveryRuleUrlPathMatchConditionParameters", + "DeliveryRuleUrlFileExtensionMatchConditionParameters", + "DeliveryRuleUrlFilenameConditionParameters", "DeliveryRuleHttpVersionConditionParameters", + "DeliveryRuleCookiesConditionParameters", "DeliveryRuleIsDeviceConditionParameters", + "DeliveryRuleSocketAddrConditionParameters", "DeliveryRuleClientPortConditionParameters", + "DeliveryRuleServerPortConditionParameters", "DeliveryRuleHostNameConditionParameters", and + "DeliveryRuleSslProtocolConditionParameters". + :vartype type_name: str or ~azure.mgmt.cdn.models.DeliveryRuleConditionParametersType :ivar operator: Describes operator to be matched. Required. Known values are: "Any", "Equal", "Contains", "BeginsWith", "EndsWith", "LessThan", "LessThanOrEqual", "GreaterThan", "GreaterThanOrEqual", and "RegEx". @@ -9476,16 +9901,13 @@ class QueryStringMatchConditionParameters(_serialization.Model): def __init__( self, *, - type_name: Union[str, "_models.QueryStringMatchConditionParametersTypeName"], operator: Union[str, "_models.QueryStringOperator"], negate_condition: bool = False, - match_values: Optional[List[str]] = None, - transforms: Optional[List[Union[str, "_models.Transform"]]] = None, + match_values: Optional[list[str]] = None, + transforms: Optional[list[Union[str, "_models.Transform"]]] = None, **kwargs: Any ) -> None: """ - :keyword type_name: Required. "DeliveryRuleQueryStringConditionParameters" - :paramtype type_name: str or ~azure.mgmt.cdn.models.QueryStringMatchConditionParametersTypeName :keyword operator: Describes operator to be matched. Required. Known values are: "Any", "Equal", "Contains", "BeginsWith", "EndsWith", "LessThan", "LessThanOrEqual", "GreaterThan", "GreaterThanOrEqual", and "RegEx". @@ -9498,7 +9920,7 @@ def __init__( :paramtype transforms: list[str or ~azure.mgmt.cdn.models.Transform] """ super().__init__(**kwargs) - self.type_name = type_name + self.type_name: str = "DeliveryRuleQueryStringConditionParameters" self.operator = operator self.negate_condition = negate_condition self.match_values = match_values @@ -9527,7 +9949,7 @@ def __init__( *, date_time_begin: Optional[datetime.datetime] = None, date_time_end: Optional[datetime.datetime] = None, - tables: Optional[List["_models.RankingsResponseTablesItem"]] = None, + tables: Optional[list["_models.RankingsResponseTablesItem"]] = None, **kwargs: Any ) -> None: """ @@ -9562,7 +9984,7 @@ def __init__( self, *, ranking: Optional[str] = None, - data: Optional[List["_models.RankingsResponseTablesPropertiesItemsItem"]] = None, + data: Optional[list["_models.RankingsResponseTablesPropertiesItemsItem"]] = None, **kwargs: Any ) -> None: """ @@ -9594,7 +10016,7 @@ def __init__( self, *, name: Optional[str] = None, - metrics: Optional[List["_models.RankingsResponseTablesPropertiesItemsMetricsItem"]] = None, + metrics: Optional[list["_models.RankingsResponseTablesPropertiesItemsMetricsItem"]] = None, **kwargs: Any ) -> None: """ @@ -9697,7 +10119,7 @@ def __init__( *, name: str, priority: int, - match_conditions: List["_models.MatchCondition"], + match_conditions: list["_models.MatchCondition"], action: Union[str, "_models.ActionType"], rate_limit_threshold: int, rate_limit_duration_in_minutes: int, @@ -9747,7 +10169,7 @@ class RateLimitRuleList(_serialization.Model): "rules": {"key": "rules", "type": "[RateLimitRule]"}, } - def __init__(self, *, rules: Optional[List["_models.RateLimitRule"]] = None, **kwargs: Any) -> None: + def __init__(self, *, rules: Optional[list["_models.RateLimitRule"]] = None, **kwargs: Any) -> None: """ :keyword rules: List of rules. :paramtype rules: list[~azure.mgmt.cdn.models.RateLimitRule] @@ -9756,13 +10178,23 @@ def __init__(self, *, rules: Optional[List["_models.RateLimitRule"]] = None, **k self.rules = rules -class RemoteAddressMatchConditionParameters(_serialization.Model): +class RemoteAddressMatchConditionParameters(DeliveryRuleConditionParameters): """Defines the parameters for RemoteAddress match conditions. All required parameters must be populated in order to send to server. - :ivar type_name: Required. "DeliveryRuleRemoteAddressConditionParameters" - :vartype type_name: str or ~azure.mgmt.cdn.models.RemoteAddressMatchConditionParametersTypeName + :ivar type_name: Required. Known values are: "DeliveryRuleRemoteAddressConditionParameters", + "DeliveryRuleRequestMethodConditionParameters", "DeliveryRuleQueryStringConditionParameters", + "DeliveryRulePostArgsConditionParameters", "DeliveryRuleRequestUriConditionParameters", + "DeliveryRuleRequestHeaderConditionParameters", "DeliveryRuleRequestBodyConditionParameters", + "DeliveryRuleRequestSchemeConditionParameters", "DeliveryRuleUrlPathMatchConditionParameters", + "DeliveryRuleUrlFileExtensionMatchConditionParameters", + "DeliveryRuleUrlFilenameConditionParameters", "DeliveryRuleHttpVersionConditionParameters", + "DeliveryRuleCookiesConditionParameters", "DeliveryRuleIsDeviceConditionParameters", + "DeliveryRuleSocketAddrConditionParameters", "DeliveryRuleClientPortConditionParameters", + "DeliveryRuleServerPortConditionParameters", "DeliveryRuleHostNameConditionParameters", and + "DeliveryRuleSslProtocolConditionParameters". + :vartype type_name: str or ~azure.mgmt.cdn.models.DeliveryRuleConditionParametersType :ivar operator: Describes operator to be matched. Required. Known values are: "Any", "IPMatch", and "GeoMatch". :vartype operator: str or ~azure.mgmt.cdn.models.RemoteAddressOperator @@ -9792,17 +10224,13 @@ class RemoteAddressMatchConditionParameters(_serialization.Model): def __init__( self, *, - type_name: Union[str, "_models.RemoteAddressMatchConditionParametersTypeName"], operator: Union[str, "_models.RemoteAddressOperator"], negate_condition: bool = False, - match_values: Optional[List[str]] = None, - transforms: Optional[List[Union[str, "_models.Transform"]]] = None, + match_values: Optional[list[str]] = None, + transforms: Optional[list[Union[str, "_models.Transform"]]] = None, **kwargs: Any ) -> None: """ - :keyword type_name: Required. "DeliveryRuleRemoteAddressConditionParameters" - :paramtype type_name: str or - ~azure.mgmt.cdn.models.RemoteAddressMatchConditionParametersTypeName :keyword operator: Describes operator to be matched. Required. Known values are: "Any", "IPMatch", and "GeoMatch". :paramtype operator: str or ~azure.mgmt.cdn.models.RemoteAddressOperator @@ -9816,20 +10244,30 @@ def __init__( :paramtype transforms: list[str or ~azure.mgmt.cdn.models.Transform] """ super().__init__(**kwargs) - self.type_name = type_name + self.type_name: str = "DeliveryRuleRemoteAddressConditionParameters" self.operator = operator self.negate_condition = negate_condition self.match_values = match_values self.transforms = transforms -class RequestBodyMatchConditionParameters(_serialization.Model): +class RequestBodyMatchConditionParameters(DeliveryRuleConditionParameters): """Defines the parameters for RequestBody match conditions. All required parameters must be populated in order to send to server. - :ivar type_name: Required. "DeliveryRuleRequestBodyConditionParameters" - :vartype type_name: str or ~azure.mgmt.cdn.models.RequestBodyMatchConditionParametersTypeName + :ivar type_name: Required. Known values are: "DeliveryRuleRemoteAddressConditionParameters", + "DeliveryRuleRequestMethodConditionParameters", "DeliveryRuleQueryStringConditionParameters", + "DeliveryRulePostArgsConditionParameters", "DeliveryRuleRequestUriConditionParameters", + "DeliveryRuleRequestHeaderConditionParameters", "DeliveryRuleRequestBodyConditionParameters", + "DeliveryRuleRequestSchemeConditionParameters", "DeliveryRuleUrlPathMatchConditionParameters", + "DeliveryRuleUrlFileExtensionMatchConditionParameters", + "DeliveryRuleUrlFilenameConditionParameters", "DeliveryRuleHttpVersionConditionParameters", + "DeliveryRuleCookiesConditionParameters", "DeliveryRuleIsDeviceConditionParameters", + "DeliveryRuleSocketAddrConditionParameters", "DeliveryRuleClientPortConditionParameters", + "DeliveryRuleServerPortConditionParameters", "DeliveryRuleHostNameConditionParameters", and + "DeliveryRuleSslProtocolConditionParameters". + :vartype type_name: str or ~azure.mgmt.cdn.models.DeliveryRuleConditionParametersType :ivar operator: Describes operator to be matched. Required. Known values are: "Any", "Equal", "Contains", "BeginsWith", "EndsWith", "LessThan", "LessThanOrEqual", "GreaterThan", "GreaterThanOrEqual", and "RegEx". @@ -9858,16 +10296,13 @@ class RequestBodyMatchConditionParameters(_serialization.Model): def __init__( self, *, - type_name: Union[str, "_models.RequestBodyMatchConditionParametersTypeName"], operator: Union[str, "_models.RequestBodyOperator"], negate_condition: bool = False, - match_values: Optional[List[str]] = None, - transforms: Optional[List[Union[str, "_models.Transform"]]] = None, + match_values: Optional[list[str]] = None, + transforms: Optional[list[Union[str, "_models.Transform"]]] = None, **kwargs: Any ) -> None: """ - :keyword type_name: Required. "DeliveryRuleRequestBodyConditionParameters" - :paramtype type_name: str or ~azure.mgmt.cdn.models.RequestBodyMatchConditionParametersTypeName :keyword operator: Describes operator to be matched. Required. Known values are: "Any", "Equal", "Contains", "BeginsWith", "EndsWith", "LessThan", "LessThanOrEqual", "GreaterThan", "GreaterThanOrEqual", and "RegEx". @@ -9880,20 +10315,30 @@ def __init__( :paramtype transforms: list[str or ~azure.mgmt.cdn.models.Transform] """ super().__init__(**kwargs) - self.type_name = type_name + self.type_name: str = "DeliveryRuleRequestBodyConditionParameters" self.operator = operator self.negate_condition = negate_condition self.match_values = match_values self.transforms = transforms -class RequestHeaderMatchConditionParameters(_serialization.Model): +class RequestHeaderMatchConditionParameters(DeliveryRuleConditionParameters): """Defines the parameters for RequestHeader match conditions. All required parameters must be populated in order to send to server. - :ivar type_name: Required. "DeliveryRuleRequestHeaderConditionParameters" - :vartype type_name: str or ~azure.mgmt.cdn.models.RequestHeaderMatchConditionParametersTypeName + :ivar type_name: Required. Known values are: "DeliveryRuleRemoteAddressConditionParameters", + "DeliveryRuleRequestMethodConditionParameters", "DeliveryRuleQueryStringConditionParameters", + "DeliveryRulePostArgsConditionParameters", "DeliveryRuleRequestUriConditionParameters", + "DeliveryRuleRequestHeaderConditionParameters", "DeliveryRuleRequestBodyConditionParameters", + "DeliveryRuleRequestSchemeConditionParameters", "DeliveryRuleUrlPathMatchConditionParameters", + "DeliveryRuleUrlFileExtensionMatchConditionParameters", + "DeliveryRuleUrlFilenameConditionParameters", "DeliveryRuleHttpVersionConditionParameters", + "DeliveryRuleCookiesConditionParameters", "DeliveryRuleIsDeviceConditionParameters", + "DeliveryRuleSocketAddrConditionParameters", "DeliveryRuleClientPortConditionParameters", + "DeliveryRuleServerPortConditionParameters", "DeliveryRuleHostNameConditionParameters", and + "DeliveryRuleSslProtocolConditionParameters". + :vartype type_name: str or ~azure.mgmt.cdn.models.DeliveryRuleConditionParametersType :ivar selector: Name of Header to be matched. :vartype selector: str :ivar operator: Describes operator to be matched. Required. Known values are: "Any", "Equal", @@ -9925,18 +10370,14 @@ class RequestHeaderMatchConditionParameters(_serialization.Model): def __init__( self, *, - type_name: Union[str, "_models.RequestHeaderMatchConditionParametersTypeName"], operator: Union[str, "_models.RequestHeaderOperator"], selector: Optional[str] = None, negate_condition: bool = False, - match_values: Optional[List[str]] = None, - transforms: Optional[List[Union[str, "_models.Transform"]]] = None, + match_values: Optional[list[str]] = None, + transforms: Optional[list[Union[str, "_models.Transform"]]] = None, **kwargs: Any ) -> None: """ - :keyword type_name: Required. "DeliveryRuleRequestHeaderConditionParameters" - :paramtype type_name: str or - ~azure.mgmt.cdn.models.RequestHeaderMatchConditionParametersTypeName :keyword selector: Name of Header to be matched. :paramtype selector: str :keyword operator: Describes operator to be matched. Required. Known values are: "Any", @@ -9951,7 +10392,7 @@ def __init__( :paramtype transforms: list[str or ~azure.mgmt.cdn.models.Transform] """ super().__init__(**kwargs) - self.type_name = type_name + self.type_name: str = "DeliveryRuleRequestHeaderConditionParameters" self.selector = selector self.operator = operator self.negate_condition = negate_condition @@ -9959,13 +10400,23 @@ def __init__( self.transforms = transforms -class RequestMethodMatchConditionParameters(_serialization.Model): +class RequestMethodMatchConditionParameters(DeliveryRuleConditionParameters): """Defines the parameters for RequestMethod match conditions. All required parameters must be populated in order to send to server. - :ivar type_name: Required. "DeliveryRuleRequestMethodConditionParameters" - :vartype type_name: str or ~azure.mgmt.cdn.models.RequestMethodMatchConditionParametersTypeName + :ivar type_name: Required. Known values are: "DeliveryRuleRemoteAddressConditionParameters", + "DeliveryRuleRequestMethodConditionParameters", "DeliveryRuleQueryStringConditionParameters", + "DeliveryRulePostArgsConditionParameters", "DeliveryRuleRequestUriConditionParameters", + "DeliveryRuleRequestHeaderConditionParameters", "DeliveryRuleRequestBodyConditionParameters", + "DeliveryRuleRequestSchemeConditionParameters", "DeliveryRuleUrlPathMatchConditionParameters", + "DeliveryRuleUrlFileExtensionMatchConditionParameters", + "DeliveryRuleUrlFilenameConditionParameters", "DeliveryRuleHttpVersionConditionParameters", + "DeliveryRuleCookiesConditionParameters", "DeliveryRuleIsDeviceConditionParameters", + "DeliveryRuleSocketAddrConditionParameters", "DeliveryRuleClientPortConditionParameters", + "DeliveryRuleServerPortConditionParameters", "DeliveryRuleHostNameConditionParameters", and + "DeliveryRuleSslProtocolConditionParameters". + :vartype type_name: str or ~azure.mgmt.cdn.models.DeliveryRuleConditionParametersType :ivar operator: Describes operator to be matched. Required. "Equal" :vartype operator: str or ~azure.mgmt.cdn.models.RequestMethodOperator :ivar negate_condition: Describes if this is negate condition or not. @@ -9973,8 +10424,7 @@ class RequestMethodMatchConditionParameters(_serialization.Model): :ivar transforms: List of transforms. :vartype transforms: list[str or ~azure.mgmt.cdn.models.Transform] :ivar match_values: The match value for the condition of the delivery rule. - :vartype match_values: list[str or - ~azure.mgmt.cdn.models.RequestMethodMatchConditionParametersMatchValuesItem] + :vartype match_values: list[str or ~azure.mgmt.cdn.models.RequestMethodMatchValue] """ _validation = { @@ -9993,17 +10443,13 @@ class RequestMethodMatchConditionParameters(_serialization.Model): def __init__( self, *, - type_name: Union[str, "_models.RequestMethodMatchConditionParametersTypeName"], operator: Union[str, "_models.RequestMethodOperator"], negate_condition: bool = False, - transforms: Optional[List[Union[str, "_models.Transform"]]] = None, - match_values: Optional[List[Union[str, "_models.RequestMethodMatchConditionParametersMatchValuesItem"]]] = None, + transforms: Optional[list[Union[str, "_models.Transform"]]] = None, + match_values: Optional[list[Union[str, "_models.RequestMethodMatchValue"]]] = None, **kwargs: Any ) -> None: """ - :keyword type_name: Required. "DeliveryRuleRequestMethodConditionParameters" - :paramtype type_name: str or - ~azure.mgmt.cdn.models.RequestMethodMatchConditionParametersTypeName :keyword operator: Describes operator to be matched. Required. "Equal" :paramtype operator: str or ~azure.mgmt.cdn.models.RequestMethodOperator :keyword negate_condition: Describes if this is negate condition or not. @@ -10011,24 +10457,33 @@ def __init__( :keyword transforms: List of transforms. :paramtype transforms: list[str or ~azure.mgmt.cdn.models.Transform] :keyword match_values: The match value for the condition of the delivery rule. - :paramtype match_values: list[str or - ~azure.mgmt.cdn.models.RequestMethodMatchConditionParametersMatchValuesItem] + :paramtype match_values: list[str or ~azure.mgmt.cdn.models.RequestMethodMatchValue] """ super().__init__(**kwargs) - self.type_name = type_name + self.type_name: str = "DeliveryRuleRequestMethodConditionParameters" self.operator = operator self.negate_condition = negate_condition self.transforms = transforms self.match_values = match_values -class RequestSchemeMatchConditionParameters(_serialization.Model): +class RequestSchemeMatchConditionParameters(DeliveryRuleConditionParameters): """Defines the parameters for RequestScheme match conditions. All required parameters must be populated in order to send to server. - :ivar type_name: Required. "DeliveryRuleRequestSchemeConditionParameters" - :vartype type_name: str or ~azure.mgmt.cdn.models.RequestSchemeMatchConditionParametersTypeName + :ivar type_name: Required. Known values are: "DeliveryRuleRemoteAddressConditionParameters", + "DeliveryRuleRequestMethodConditionParameters", "DeliveryRuleQueryStringConditionParameters", + "DeliveryRulePostArgsConditionParameters", "DeliveryRuleRequestUriConditionParameters", + "DeliveryRuleRequestHeaderConditionParameters", "DeliveryRuleRequestBodyConditionParameters", + "DeliveryRuleRequestSchemeConditionParameters", "DeliveryRuleUrlPathMatchConditionParameters", + "DeliveryRuleUrlFileExtensionMatchConditionParameters", + "DeliveryRuleUrlFilenameConditionParameters", "DeliveryRuleHttpVersionConditionParameters", + "DeliveryRuleCookiesConditionParameters", "DeliveryRuleIsDeviceConditionParameters", + "DeliveryRuleSocketAddrConditionParameters", "DeliveryRuleClientPortConditionParameters", + "DeliveryRuleServerPortConditionParameters", "DeliveryRuleHostNameConditionParameters", and + "DeliveryRuleSslProtocolConditionParameters". + :vartype type_name: str or ~azure.mgmt.cdn.models.DeliveryRuleConditionParametersType :ivar operator: Describes operator to be matched. Required. "Equal" :vartype operator: str or ~azure.mgmt.cdn.models.RequestSchemeMatchConditionParametersOperator :ivar negate_condition: Describes if this is negate condition or not. @@ -10036,8 +10491,7 @@ class RequestSchemeMatchConditionParameters(_serialization.Model): :ivar transforms: List of transforms. :vartype transforms: list[str or ~azure.mgmt.cdn.models.Transform] :ivar match_values: The match value for the condition of the delivery rule. - :vartype match_values: list[str or - ~azure.mgmt.cdn.models.RequestSchemeMatchConditionParametersMatchValuesItem] + :vartype match_values: list[str or ~azure.mgmt.cdn.models.RequestSchemeMatchValue] """ _validation = { @@ -10056,17 +10510,13 @@ class RequestSchemeMatchConditionParameters(_serialization.Model): def __init__( self, *, - type_name: Union[str, "_models.RequestSchemeMatchConditionParametersTypeName"], operator: Union[str, "_models.RequestSchemeMatchConditionParametersOperator"], negate_condition: bool = False, - transforms: Optional[List[Union[str, "_models.Transform"]]] = None, - match_values: Optional[List[Union[str, "_models.RequestSchemeMatchConditionParametersMatchValuesItem"]]] = None, + transforms: Optional[list[Union[str, "_models.Transform"]]] = None, + match_values: Optional[list[Union[str, "_models.RequestSchemeMatchValue"]]] = None, **kwargs: Any ) -> None: """ - :keyword type_name: Required. "DeliveryRuleRequestSchemeConditionParameters" - :paramtype type_name: str or - ~azure.mgmt.cdn.models.RequestSchemeMatchConditionParametersTypeName :keyword operator: Describes operator to be matched. Required. "Equal" :paramtype operator: str or ~azure.mgmt.cdn.models.RequestSchemeMatchConditionParametersOperator @@ -10075,24 +10525,33 @@ def __init__( :keyword transforms: List of transforms. :paramtype transforms: list[str or ~azure.mgmt.cdn.models.Transform] :keyword match_values: The match value for the condition of the delivery rule. - :paramtype match_values: list[str or - ~azure.mgmt.cdn.models.RequestSchemeMatchConditionParametersMatchValuesItem] + :paramtype match_values: list[str or ~azure.mgmt.cdn.models.RequestSchemeMatchValue] """ super().__init__(**kwargs) - self.type_name = type_name + self.type_name: str = "DeliveryRuleRequestSchemeConditionParameters" self.operator = operator self.negate_condition = negate_condition self.transforms = transforms self.match_values = match_values -class RequestUriMatchConditionParameters(_serialization.Model): +class RequestUriMatchConditionParameters(DeliveryRuleConditionParameters): """Defines the parameters for RequestUri match conditions. All required parameters must be populated in order to send to server. - :ivar type_name: Required. "DeliveryRuleRequestUriConditionParameters" - :vartype type_name: str or ~azure.mgmt.cdn.models.RequestUriMatchConditionParametersTypeName + :ivar type_name: Required. Known values are: "DeliveryRuleRemoteAddressConditionParameters", + "DeliveryRuleRequestMethodConditionParameters", "DeliveryRuleQueryStringConditionParameters", + "DeliveryRulePostArgsConditionParameters", "DeliveryRuleRequestUriConditionParameters", + "DeliveryRuleRequestHeaderConditionParameters", "DeliveryRuleRequestBodyConditionParameters", + "DeliveryRuleRequestSchemeConditionParameters", "DeliveryRuleUrlPathMatchConditionParameters", + "DeliveryRuleUrlFileExtensionMatchConditionParameters", + "DeliveryRuleUrlFilenameConditionParameters", "DeliveryRuleHttpVersionConditionParameters", + "DeliveryRuleCookiesConditionParameters", "DeliveryRuleIsDeviceConditionParameters", + "DeliveryRuleSocketAddrConditionParameters", "DeliveryRuleClientPortConditionParameters", + "DeliveryRuleServerPortConditionParameters", "DeliveryRuleHostNameConditionParameters", and + "DeliveryRuleSslProtocolConditionParameters". + :vartype type_name: str or ~azure.mgmt.cdn.models.DeliveryRuleConditionParametersType :ivar operator: Describes operator to be matched. Required. Known values are: "Any", "Equal", "Contains", "BeginsWith", "EndsWith", "LessThan", "LessThanOrEqual", "GreaterThan", "GreaterThanOrEqual", and "RegEx". @@ -10121,16 +10580,13 @@ class RequestUriMatchConditionParameters(_serialization.Model): def __init__( self, *, - type_name: Union[str, "_models.RequestUriMatchConditionParametersTypeName"], operator: Union[str, "_models.RequestUriOperator"], negate_condition: bool = False, - match_values: Optional[List[str]] = None, - transforms: Optional[List[Union[str, "_models.Transform"]]] = None, + match_values: Optional[list[str]] = None, + transforms: Optional[list[Union[str, "_models.Transform"]]] = None, **kwargs: Any ) -> None: """ - :keyword type_name: Required. "DeliveryRuleRequestUriConditionParameters" - :paramtype type_name: str or ~azure.mgmt.cdn.models.RequestUriMatchConditionParametersTypeName :keyword operator: Describes operator to be matched. Required. Known values are: "Any", "Equal", "Contains", "BeginsWith", "EndsWith", "LessThan", "LessThanOrEqual", "GreaterThan", "GreaterThanOrEqual", and "RegEx". @@ -10143,7 +10599,7 @@ def __init__( :paramtype transforms: list[str or ~azure.mgmt.cdn.models.Transform] """ super().__init__(**kwargs) - self.type_name = type_name + self.type_name: str = "DeliveryRuleRequestUriConditionParameters" self.operator = operator self.negate_condition = negate_condition self.match_values = match_values @@ -10187,8 +10643,8 @@ class ResourcesResponse(_serialization.Model): def __init__( self, *, - endpoints: Optional[List["_models.ResourcesResponseEndpointsItem"]] = None, - custom_domains: Optional[List["_models.ResourcesResponseCustomDomainsItem"]] = None, + endpoints: Optional[list["_models.ResourcesResponseEndpointsItem"]] = None, + custom_domains: Optional[list["_models.ResourcesResponseCustomDomainsItem"]] = None, **kwargs: Any ) -> None: """ @@ -10275,7 +10731,7 @@ def __init__( id: Optional[str] = None, # pylint: disable=redefined-builtin name: Optional[str] = None, history: Optional[bool] = None, - custom_domains: Optional[List["_models.ResourcesResponseEndpointsPropertiesItemsItem"]] = None, + custom_domains: Optional[list["_models.ResourcesResponseEndpointsPropertiesItemsItem"]] = None, **kwargs: Any ) -> None: """ @@ -10374,10 +10830,10 @@ class ResourceUsage(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.resource_type = None - self.unit = None - self.current_value = None - self.limit = None + self.resource_type: Optional[str] = None + self.unit: Optional[Union[str, "_models.ResourceUsageUnit"]] = None + self.current_value: Optional[int] = None + self.limit: Optional[int] = None class ResourceUsageListResult(_serialization.Model): @@ -10406,7 +10862,7 @@ def __init__(self, *, next_link: Optional[str] = None, **kwargs: Any) -> None: :paramtype next_link: str """ super().__init__(**kwargs) - self.value = None + self.value: Optional[list["_models.ResourceUsage"]] = None self.next_link = next_link @@ -10445,7 +10901,7 @@ def __init__( *, response_based_detected_error_types: Optional[Union[str, "_models.ResponseBasedDetectedErrorTypes"]] = None, response_based_failover_threshold_percentage: Optional[int] = None, - http_error_ranges: Optional[List["_models.HttpErrorRangeParameters"]] = None, + http_error_ranges: Optional[list["_models.HttpErrorRangeParameters"]] = None, **kwargs: Any ) -> None: """ @@ -10467,18 +10923,21 @@ def __init__( self.http_error_ranges = http_error_ranges -class Route(ProxyResource): # pylint: disable=too-many-instance-attributes +class Route(ProxyResource): """Friendly Routes name mapping to the any Routes or secret related information. Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Resource ID. + :ivar id: Fully qualified resource ID for the resource. E.g. + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". :vartype id: str - :ivar name: Resource name. + :ivar name: The name of the resource. :vartype name: str - :ivar type: Resource type. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str - :ivar system_data: Read only system data. + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. :vartype system_data: ~azure.mgmt.cdn.models.SystemData :ivar endpoint_name: The name of the endpoint which holds the route. :vartype endpoint_name: str @@ -10553,12 +11012,12 @@ class Route(ProxyResource): # pylint: disable=too-many-instance-attributes def __init__( self, *, - custom_domains: Optional[List["_models.ActivatedResourceReference"]] = None, + custom_domains: Optional[list["_models.ActivatedResourceReference"]] = None, origin_group: Optional["_models.ResourceReference"] = None, origin_path: Optional[str] = None, - rule_sets: Optional[List["_models.ResourceReference"]] = None, - supported_protocols: List[Union[str, "_models.AFDEndpointProtocols"]] = ["Http", "Https"], - patterns_to_match: Optional[List[str]] = None, + rule_sets: Optional[list["_models.ResourceReference"]] = None, + supported_protocols: list[Union[str, "_models.AFDEndpointProtocols"]] = ["Http", "Https"], + patterns_to_match: Optional[list[str]] = None, cache_configuration: Optional["_models.AfdRouteCacheConfiguration"] = None, forwarding_protocol: Optional[Union[str, "_models.ForwardingProtocol"]] = None, link_to_default_domain: Union[str, "_models.LinkToDefaultDomain"] = "Disabled", @@ -10598,7 +11057,7 @@ def __init__( :paramtype enabled_state: str or ~azure.mgmt.cdn.models.EnabledState """ super().__init__(**kwargs) - self.endpoint_name = None + self.endpoint_name: Optional[str] = None self.custom_domains = custom_domains self.origin_group = origin_group self.origin_path = origin_path @@ -10610,18 +11069,22 @@ def __init__( self.link_to_default_domain = link_to_default_domain self.https_redirect = https_redirect self.enabled_state = enabled_state - self.provisioning_state = None - self.deployment_status = None + self.provisioning_state: Optional[Union[str, "_models.AfdProvisioningState"]] = None + self.deployment_status: Optional[Union[str, "_models.DeploymentStatus"]] = None -class RouteConfigurationOverrideActionParameters(_serialization.Model): # pylint: disable=name-too-long +class RouteConfigurationOverrideActionParameters(DeliveryRuleActionParameters): # pylint: disable=name-too-long """Defines the parameters for the route configuration override action. All required parameters must be populated in order to send to server. - :ivar type_name: Required. "DeliveryRuleRouteConfigurationOverrideActionParameters" - :vartype type_name: str or - ~azure.mgmt.cdn.models.RouteConfigurationOverrideActionParametersTypeName + :ivar type_name: Required. Known values are: "DeliveryRuleUrlRedirectActionParameters", + "DeliveryRuleUrlSigningActionParameters", "DeliveryRuleOriginGroupOverrideActionParameters", + "DeliveryRuleUrlRewriteActionParameters", "DeliveryRuleHeaderActionParameters", + "DeliveryRuleCacheExpirationActionParameters", + "DeliveryRuleCacheKeyQueryStringBehaviorActionParameters", and + "DeliveryRuleRouteConfigurationOverrideActionParameters". + :vartype type_name: str or ~azure.mgmt.cdn.models.DeliveryRuleActionParametersType :ivar origin_group_override: A reference to the origin group override configuration. Leave empty to use the default origin group on route. :vartype origin_group_override: ~azure.mgmt.cdn.models.OriginGroupOverride @@ -10643,15 +11106,11 @@ class RouteConfigurationOverrideActionParameters(_serialization.Model): # pylin def __init__( self, *, - type_name: Union[str, "_models.RouteConfigurationOverrideActionParametersTypeName"], origin_group_override: Optional["_models.OriginGroupOverride"] = None, cache_configuration: Optional["_models.CacheConfiguration"] = None, **kwargs: Any ) -> None: """ - :keyword type_name: Required. "DeliveryRuleRouteConfigurationOverrideActionParameters" - :paramtype type_name: str or - ~azure.mgmt.cdn.models.RouteConfigurationOverrideActionParametersTypeName :keyword origin_group_override: A reference to the origin group override configuration. Leave empty to use the default origin group on route. :paramtype origin_group_override: ~azure.mgmt.cdn.models.OriginGroupOverride @@ -10660,7 +11119,7 @@ def __init__( :paramtype cache_configuration: ~azure.mgmt.cdn.models.CacheConfiguration """ super().__init__(**kwargs) - self.type_name = type_name + self.type_name: str = "DeliveryRuleRouteConfigurationOverrideActionParameters" self.origin_group_override = origin_group_override self.cache_configuration = cache_configuration @@ -10692,11 +11151,11 @@ def __init__(self, *, next_link: Optional[str] = None, **kwargs: Any) -> None: :paramtype next_link: str """ super().__init__(**kwargs) - self.value = None + self.value: Optional[list["_models.Route"]] = None self.next_link = next_link -class RouteUpdatePropertiesParameters(_serialization.Model): # pylint: disable=too-many-instance-attributes +class RouteUpdatePropertiesParameters(_serialization.Model): """The JSON object that contains the properties of the domain to create. Variables are only populated by the server, and will be ignored when sending a request. @@ -10756,12 +11215,12 @@ class RouteUpdatePropertiesParameters(_serialization.Model): # pylint: disable= def __init__( self, *, - custom_domains: Optional[List["_models.ActivatedResourceReference"]] = None, + custom_domains: Optional[list["_models.ActivatedResourceReference"]] = None, origin_group: Optional["_models.ResourceReference"] = None, origin_path: Optional[str] = None, - rule_sets: Optional[List["_models.ResourceReference"]] = None, - supported_protocols: List[Union[str, "_models.AFDEndpointProtocols"]] = ["Http", "Https"], - patterns_to_match: Optional[List[str]] = None, + rule_sets: Optional[list["_models.ResourceReference"]] = None, + supported_protocols: list[Union[str, "_models.AFDEndpointProtocols"]] = ["Http", "Https"], + patterns_to_match: Optional[list[str]] = None, cache_configuration: Optional["_models.AfdRouteCacheConfiguration"] = None, forwarding_protocol: Optional[Union[str, "_models.ForwardingProtocol"]] = None, link_to_default_domain: Union[str, "_models.LinkToDefaultDomain"] = "Disabled", @@ -10801,7 +11260,7 @@ def __init__( :paramtype enabled_state: str or ~azure.mgmt.cdn.models.EnabledState """ super().__init__(**kwargs) - self.endpoint_name = None + self.endpoint_name: Optional[str] = None self.custom_domains = custom_domains self.origin_group = origin_group self.origin_path = origin_path @@ -10815,9 +11274,7 @@ def __init__( self.enabled_state = enabled_state -class RouteProperties( - RouteUpdatePropertiesParameters, AFDStateProperties -): # pylint: disable=too-many-instance-attributes +class RouteProperties(RouteUpdatePropertiesParameters, AFDStateProperties): """The JSON object that contains the properties of the Routes to create. Variables are only populated by the server, and will be ignored when sending a request. @@ -10887,12 +11344,12 @@ class RouteProperties( def __init__( self, *, - custom_domains: Optional[List["_models.ActivatedResourceReference"]] = None, + custom_domains: Optional[list["_models.ActivatedResourceReference"]] = None, origin_group: Optional["_models.ResourceReference"] = None, origin_path: Optional[str] = None, - rule_sets: Optional[List["_models.ResourceReference"]] = None, - supported_protocols: List[Union[str, "_models.AFDEndpointProtocols"]] = ["Http", "Https"], - patterns_to_match: Optional[List[str]] = None, + rule_sets: Optional[list["_models.ResourceReference"]] = None, + supported_protocols: list[Union[str, "_models.AFDEndpointProtocols"]] = ["Http", "Https"], + patterns_to_match: Optional[list[str]] = None, cache_configuration: Optional["_models.AfdRouteCacheConfiguration"] = None, forwarding_protocol: Optional[Union[str, "_models.ForwardingProtocol"]] = None, link_to_default_domain: Union[str, "_models.LinkToDefaultDomain"] = "Disabled", @@ -10945,9 +11402,9 @@ def __init__( enabled_state=enabled_state, **kwargs ) - self.provisioning_state = None - self.deployment_status = None - self.endpoint_name = None + self.provisioning_state: Optional[Union[str, "_models.AfdProvisioningState"]] = None + self.deployment_status: Optional[Union[str, "_models.DeploymentStatus"]] = None + self.endpoint_name: Optional[str] = None self.custom_domains = custom_domains self.origin_group = origin_group self.origin_path = origin_path @@ -10961,7 +11418,7 @@ def __init__( self.enabled_state = enabled_state -class RouteUpdateParameters(_serialization.Model): # pylint: disable=too-many-instance-attributes +class RouteUpdateParameters(_serialization.Model): """The domain JSON object required for domain creation or update. Variables are only populated by the server, and will be ignored when sending a request. @@ -11021,12 +11478,12 @@ class RouteUpdateParameters(_serialization.Model): # pylint: disable=too-many-i def __init__( self, *, - custom_domains: Optional[List["_models.ActivatedResourceReference"]] = None, + custom_domains: Optional[list["_models.ActivatedResourceReference"]] = None, origin_group: Optional["_models.ResourceReference"] = None, origin_path: Optional[str] = None, - rule_sets: Optional[List["_models.ResourceReference"]] = None, - supported_protocols: List[Union[str, "_models.AFDEndpointProtocols"]] = ["Http", "Https"], - patterns_to_match: Optional[List[str]] = None, + rule_sets: Optional[list["_models.ResourceReference"]] = None, + supported_protocols: list[Union[str, "_models.AFDEndpointProtocols"]] = ["Http", "Https"], + patterns_to_match: Optional[list[str]] = None, cache_configuration: Optional["_models.AfdRouteCacheConfiguration"] = None, forwarding_protocol: Optional[Union[str, "_models.ForwardingProtocol"]] = None, link_to_default_domain: Union[str, "_models.LinkToDefaultDomain"] = "Disabled", @@ -11066,7 +11523,7 @@ def __init__( :paramtype enabled_state: str or ~azure.mgmt.cdn.models.EnabledState """ super().__init__(**kwargs) - self.endpoint_name = None + self.endpoint_name: Optional[str] = None self.custom_domains = custom_domains self.origin_group = origin_group self.origin_path = origin_path @@ -11080,18 +11537,21 @@ def __init__( self.enabled_state = enabled_state -class Rule(ProxyResource): # pylint: disable=too-many-instance-attributes +class Rule(ProxyResource): """Friendly Rules name mapping to the any Rules or secret related information. Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Resource ID. + :ivar id: Fully qualified resource ID for the resource. E.g. + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". :vartype id: str - :ivar name: Resource name. + :ivar name: The name of the resource. :vartype name: str - :ivar type: Resource type. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str - :ivar system_data: Read only system data. + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. :vartype system_data: ~azure.mgmt.cdn.models.SystemData :ivar rule_set_name: The name of the rule set containing the rule. :vartype rule_set_name: str @@ -11145,8 +11605,8 @@ def __init__( self, *, order: Optional[int] = None, - conditions: Optional[List["_models.DeliveryRuleCondition"]] = None, - actions: Optional[List["_models.DeliveryRuleAction"]] = None, + conditions: Optional[list["_models.DeliveryRuleCondition"]] = None, + actions: Optional[list["_models.DeliveryRuleAction"]] = None, match_processing_behavior: Union[str, "_models.MatchProcessingBehavior"] = "Continue", **kwargs: Any ) -> None: @@ -11167,13 +11627,13 @@ def __init__( :paramtype match_processing_behavior: str or ~azure.mgmt.cdn.models.MatchProcessingBehavior """ super().__init__(**kwargs) - self.rule_set_name = None + self.rule_set_name: Optional[str] = None self.order = order self.conditions = conditions self.actions = actions self.match_processing_behavior = match_processing_behavior - self.provisioning_state = None - self.deployment_status = None + self.provisioning_state: Optional[Union[str, "_models.AfdProvisioningState"]] = None + self.deployment_status: Optional[Union[str, "_models.DeploymentStatus"]] = None class RuleListResult(_serialization.Model): @@ -11203,7 +11663,7 @@ def __init__(self, *, next_link: Optional[str] = None, **kwargs: Any) -> None: :paramtype next_link: str """ super().__init__(**kwargs) - self.value = None + self.value: Optional[list["_models.Rule"]] = None self.next_link = next_link @@ -11246,8 +11706,8 @@ def __init__( self, *, order: Optional[int] = None, - conditions: Optional[List["_models.DeliveryRuleCondition"]] = None, - actions: Optional[List["_models.DeliveryRuleAction"]] = None, + conditions: Optional[list["_models.DeliveryRuleCondition"]] = None, + actions: Optional[list["_models.DeliveryRuleAction"]] = None, match_processing_behavior: Union[str, "_models.MatchProcessingBehavior"] = "Continue", **kwargs: Any ) -> None: @@ -11268,7 +11728,7 @@ def __init__( :paramtype match_processing_behavior: str or ~azure.mgmt.cdn.models.MatchProcessingBehavior """ super().__init__(**kwargs) - self.rule_set_name = None + self.rule_set_name: Optional[str] = None self.order = order self.conditions = conditions self.actions = actions @@ -11324,8 +11784,8 @@ def __init__( self, *, order: Optional[int] = None, - conditions: Optional[List["_models.DeliveryRuleCondition"]] = None, - actions: Optional[List["_models.DeliveryRuleAction"]] = None, + conditions: Optional[list["_models.DeliveryRuleCondition"]] = None, + actions: Optional[list["_models.DeliveryRuleAction"]] = None, match_processing_behavior: Union[str, "_models.MatchProcessingBehavior"] = "Continue", **kwargs: Any ) -> None: @@ -11352,9 +11812,9 @@ def __init__( match_processing_behavior=match_processing_behavior, **kwargs ) - self.provisioning_state = None - self.deployment_status = None - self.rule_set_name = None + self.provisioning_state: Optional[Union[str, "_models.AfdProvisioningState"]] = None + self.deployment_status: Optional[Union[str, "_models.DeploymentStatus"]] = None + self.rule_set_name: Optional[str] = None self.order = order self.conditions = conditions self.actions = actions @@ -11366,13 +11826,16 @@ class RuleSet(ProxyResource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Resource ID. + :ivar id: Fully qualified resource ID for the resource. E.g. + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". :vartype id: str - :ivar name: Resource name. + :ivar name: The name of the resource. :vartype name: str - :ivar type: Resource type. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str - :ivar system_data: Read only system data. + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. :vartype system_data: ~azure.mgmt.cdn.models.SystemData :ivar provisioning_state: Provisioning status. Known values are: "Succeeded", "Failed", "Updating", "Deleting", and "Creating". @@ -11407,9 +11870,9 @@ class RuleSet(ProxyResource): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.provisioning_state = None - self.deployment_status = None - self.profile_name = None + self.provisioning_state: Optional[Union[str, "_models.AfdProvisioningState"]] = None + self.deployment_status: Optional[Union[str, "_models.DeploymentStatus"]] = None + self.profile_name: Optional[str] = None class RuleSetListResult(_serialization.Model): @@ -11439,7 +11902,7 @@ def __init__(self, *, next_link: Optional[str] = None, **kwargs: Any) -> None: :paramtype next_link: str """ super().__init__(**kwargs) - self.value = None + self.value: Optional[list["_models.RuleSet"]] = None self.next_link = next_link @@ -11473,7 +11936,7 @@ class RuleSetProperties(AFDStateProperties): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.profile_name = None + self.profile_name: Optional[str] = None class RuleUpdateParameters(_serialization.Model): @@ -11515,8 +11978,8 @@ def __init__( self, *, order: Optional[int] = None, - conditions: Optional[List["_models.DeliveryRuleCondition"]] = None, - actions: Optional[List["_models.DeliveryRuleAction"]] = None, + conditions: Optional[list["_models.DeliveryRuleCondition"]] = None, + actions: Optional[list["_models.DeliveryRuleAction"]] = None, match_processing_behavior: Union[str, "_models.MatchProcessingBehavior"] = "Continue", **kwargs: Any ) -> None: @@ -11537,7 +12000,7 @@ def __init__( :paramtype match_processing_behavior: str or ~azure.mgmt.cdn.models.MatchProcessingBehavior """ super().__init__(**kwargs) - self.rule_set_name = None + self.rule_set_name: Optional[str] = None self.order = order self.conditions = conditions self.actions = actions @@ -11549,13 +12012,16 @@ class Secret(ProxyResource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Resource ID. + :ivar id: Fully qualified resource ID for the resource. E.g. + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". :vartype id: str - :ivar name: Resource name. + :ivar name: The name of the resource. :vartype name: str - :ivar type: Resource type. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str - :ivar system_data: Read only system data. + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. :vartype system_data: ~azure.mgmt.cdn.models.SystemData :ivar provisioning_state: Provisioning status. Known values are: "Succeeded", "Failed", "Updating", "Deleting", and "Creating". @@ -11596,9 +12062,9 @@ def __init__(self, *, parameters: Optional["_models.SecretParameters"] = None, * :paramtype parameters: ~azure.mgmt.cdn.models.SecretParameters """ super().__init__(**kwargs) - self.provisioning_state = None - self.deployment_status = None - self.profile_name = None + self.provisioning_state: Optional[Union[str, "_models.AfdProvisioningState"]] = None + self.deployment_status: Optional[Union[str, "_models.DeploymentStatus"]] = None + self.profile_name: Optional[str] = None self.parameters = parameters @@ -11629,7 +12095,7 @@ def __init__(self, *, next_link: Optional[str] = None, **kwargs: Any) -> None: :paramtype next_link: str """ super().__init__(**kwargs) - self.value = None + self.value: Optional[list["_models.Secret"]] = None self.next_link = next_link @@ -11669,7 +12135,7 @@ def __init__(self, *, parameters: Optional["_models.SecretParameters"] = None, * :paramtype parameters: ~azure.mgmt.cdn.models.SecretParameters """ super().__init__(**kwargs) - self.profile_name = None + self.profile_name: Optional[str] = None self.parameters = parameters @@ -11678,13 +12144,16 @@ class SecurityPolicy(ProxyResource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Resource ID. + :ivar id: Fully qualified resource ID for the resource. E.g. + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". :vartype id: str - :ivar name: Resource name. + :ivar name: The name of the resource. :vartype name: str - :ivar type: Resource type. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str - :ivar system_data: Read only system data. + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. :vartype system_data: ~azure.mgmt.cdn.models.SystemData :ivar provisioning_state: Provisioning status. Known values are: "Succeeded", "Failed", "Updating", "Deleting", and "Creating". @@ -11727,9 +12196,9 @@ def __init__( :paramtype parameters: ~azure.mgmt.cdn.models.SecurityPolicyPropertiesParameters """ super().__init__(**kwargs) - self.provisioning_state = None - self.deployment_status = None - self.profile_name = None + self.provisioning_state: Optional[Union[str, "_models.AfdProvisioningState"]] = None + self.deployment_status: Optional[Union[str, "_models.DeploymentStatus"]] = None + self.profile_name: Optional[str] = None self.parameters = parameters @@ -11760,7 +12229,7 @@ def __init__(self, *, next_link: Optional[str] = None, **kwargs: Any) -> None: :paramtype next_link: str """ super().__init__(**kwargs) - self.value = None + self.value: Optional[list["_models.SecurityPolicy"]] = None self.next_link = next_link @@ -11802,7 +12271,7 @@ def __init__( :paramtype parameters: ~azure.mgmt.cdn.models.SecurityPolicyPropertiesParameters """ super().__init__(**kwargs) - self.profile_name = None + self.profile_name: Optional[str] = None self.parameters = parameters @@ -11873,8 +12342,8 @@ class SecurityPolicyWebApplicationFirewallAssociation(_serialization.Model): # def __init__( self, *, - domains: Optional[List["_models.ActivatedResourceReference"]] = None, - patterns_to_match: Optional[List[str]] = None, + domains: Optional[list["_models.ActivatedResourceReference"]] = None, + patterns_to_match: Optional[list[str]] = None, **kwargs: Any ) -> None: """ @@ -11918,7 +12387,7 @@ def __init__( self, *, waf_policy: Optional["_models.ResourceReference"] = None, - associations: Optional[List["_models.SecurityPolicyWebApplicationFirewallAssociation"]] = None, + associations: Optional[list["_models.SecurityPolicyWebApplicationFirewallAssociation"]] = None, **kwargs: Any ) -> None: """ @@ -11934,13 +12403,23 @@ def __init__( self.associations = associations -class ServerPortMatchConditionParameters(_serialization.Model): +class ServerPortMatchConditionParameters(DeliveryRuleConditionParameters): """Defines the parameters for ServerPort match conditions. All required parameters must be populated in order to send to server. - :ivar type_name: Required. "DeliveryRuleServerPortConditionParameters" - :vartype type_name: str or ~azure.mgmt.cdn.models.ServerPortMatchConditionParametersTypeName + :ivar type_name: Required. Known values are: "DeliveryRuleRemoteAddressConditionParameters", + "DeliveryRuleRequestMethodConditionParameters", "DeliveryRuleQueryStringConditionParameters", + "DeliveryRulePostArgsConditionParameters", "DeliveryRuleRequestUriConditionParameters", + "DeliveryRuleRequestHeaderConditionParameters", "DeliveryRuleRequestBodyConditionParameters", + "DeliveryRuleRequestSchemeConditionParameters", "DeliveryRuleUrlPathMatchConditionParameters", + "DeliveryRuleUrlFileExtensionMatchConditionParameters", + "DeliveryRuleUrlFilenameConditionParameters", "DeliveryRuleHttpVersionConditionParameters", + "DeliveryRuleCookiesConditionParameters", "DeliveryRuleIsDeviceConditionParameters", + "DeliveryRuleSocketAddrConditionParameters", "DeliveryRuleClientPortConditionParameters", + "DeliveryRuleServerPortConditionParameters", "DeliveryRuleHostNameConditionParameters", and + "DeliveryRuleSslProtocolConditionParameters". + :vartype type_name: str or ~azure.mgmt.cdn.models.DeliveryRuleConditionParametersType :ivar operator: Describes operator to be matched. Required. Known values are: "Any", "Equal", "Contains", "BeginsWith", "EndsWith", "LessThan", "LessThanOrEqual", "GreaterThan", "GreaterThanOrEqual", and "RegEx". @@ -11969,16 +12448,13 @@ class ServerPortMatchConditionParameters(_serialization.Model): def __init__( self, *, - type_name: Union[str, "_models.ServerPortMatchConditionParametersTypeName"], operator: Union[str, "_models.ServerPortOperator"], negate_condition: bool = False, - match_values: Optional[List[str]] = None, - transforms: Optional[List[Union[str, "_models.Transform"]]] = None, + match_values: Optional[list[str]] = None, + transforms: Optional[list[Union[str, "_models.Transform"]]] = None, **kwargs: Any ) -> None: """ - :keyword type_name: Required. "DeliveryRuleServerPortConditionParameters" - :paramtype type_name: str or ~azure.mgmt.cdn.models.ServerPortMatchConditionParametersTypeName :keyword operator: Describes operator to be matched. Required. Known values are: "Any", "Equal", "Contains", "BeginsWith", "EndsWith", "LessThan", "LessThanOrEqual", "GreaterThan", "GreaterThanOrEqual", and "RegEx". @@ -11991,7 +12467,7 @@ def __init__( :paramtype transforms: list[str or ~azure.mgmt.cdn.models.Transform] """ super().__init__(**kwargs) - self.type_name = type_name + self.type_name: str = "DeliveryRuleServerPortConditionParameters" self.operator = operator self.negate_condition = negate_condition self.match_values = match_values @@ -12015,8 +12491,8 @@ class ServiceSpecification(_serialization.Model): def __init__( self, *, - log_specifications: Optional[List["_models.LogSpecification"]] = None, - metric_specifications: Optional[List["_models.MetricSpecification"]] = None, + log_specifications: Optional[list["_models.LogSpecification"]] = None, + metric_specifications: Optional[list["_models.MetricSpecification"]] = None, **kwargs: Any ) -> None: """ @@ -12093,25 +12569,20 @@ def __init__( class Sku(_serialization.Model): - """Standard_Verizon = The SKU name for a Standard Verizon CDN profile. - Premium_Verizon = The SKU name for a Premium Verizon CDN profile. - Custom_Verizon = The SKU name for a Custom Verizon CDN profile. - Standard_Akamai = The SKU name for an Akamai CDN profile. - Standard_ChinaCdn = The SKU name for a China CDN profile for VOD, Web and download scenarios - using GB based billing model. - Standard_Microsoft = The SKU name for a Standard Microsoft CDN profile. - Standard_AzureFrontDoor = The SKU name for an Azure Front Door Standard profile. - Premium_AzureFrontDoor = The SKU name for an Azure Front Door Premium profile. - Standard_955BandWidth_ChinaCdn = The SKU name for a China CDN profile for VOD, Web and download - scenarios using 95-5 peak bandwidth billing model. + """Standard_Verizon = The SKU name for a Standard Verizon CDN profile. Premium_Verizon = The SKU + name for a Premium Verizon CDN profile. Custom_Verizon = The SKU name for a Custom Verizon CDN + profile. Standard_Akamai = The SKU name for an Akamai CDN profile. Standard_ChinaCdn = The SKU + name for a China CDN profile for VOD, Web and download scenarios using GB based billing model. + Standard_Microsoft = The SKU name for a Standard Microsoft CDN profile. Standard_AzureFrontDoor + = The SKU name for an Azure Front Door Standard profile. Premium_AzureFrontDoor = The SKU name + for an Azure Front Door Premium profile. Standard_955BandWidth_ChinaCdn = The SKU name for a + China CDN profile for VOD, Web and download scenarios using 95-5 peak bandwidth billing model. Standard_AvgBandWidth_ChinaCdn = The SKU name for a China CDN profile for VOD, Web and download - scenarios using monthly average peak bandwidth billing model. - StandardPlus_ChinaCdn = The SKU name for a China CDN profile for live-streaming using GB based - billing model. + scenarios using monthly average peak bandwidth billing model. StandardPlus_ChinaCdn = The SKU + name for a China CDN profile for live-streaming using GB based billing model. StandardPlus_955BandWidth_ChinaCdn = The SKU name for a China CDN live-streaming profile using - 95-5 peak bandwidth billing model. - StandardPlus_AvgBandWidth_ChinaCdn = The SKU name for a China CDN live-streaming profile using - monthly average peak bandwidth billing model. + 95-5 peak bandwidth billing model. StandardPlus_AvgBandWidth_ChinaCdn = The SKU name for a + China CDN live-streaming profile using monthly average peak bandwidth billing model. :ivar name: Name of the pricing tier. Known values are: "Standard_Verizon", "Premium_Verizon", "Custom_Verizon", "Standard_Akamai", "Standard_ChinaCdn", "Standard_Microsoft", @@ -12138,13 +12609,23 @@ def __init__(self, *, name: Optional[Union[str, "_models.SkuName"]] = None, **kw self.name = name -class SocketAddrMatchConditionParameters(_serialization.Model): +class SocketAddrMatchConditionParameters(DeliveryRuleConditionParameters): """Defines the parameters for SocketAddress match conditions. All required parameters must be populated in order to send to server. - :ivar type_name: Required. "DeliveryRuleSocketAddrConditionParameters" - :vartype type_name: str or ~azure.mgmt.cdn.models.SocketAddrMatchConditionParametersTypeName + :ivar type_name: Required. Known values are: "DeliveryRuleRemoteAddressConditionParameters", + "DeliveryRuleRequestMethodConditionParameters", "DeliveryRuleQueryStringConditionParameters", + "DeliveryRulePostArgsConditionParameters", "DeliveryRuleRequestUriConditionParameters", + "DeliveryRuleRequestHeaderConditionParameters", "DeliveryRuleRequestBodyConditionParameters", + "DeliveryRuleRequestSchemeConditionParameters", "DeliveryRuleUrlPathMatchConditionParameters", + "DeliveryRuleUrlFileExtensionMatchConditionParameters", + "DeliveryRuleUrlFilenameConditionParameters", "DeliveryRuleHttpVersionConditionParameters", + "DeliveryRuleCookiesConditionParameters", "DeliveryRuleIsDeviceConditionParameters", + "DeliveryRuleSocketAddrConditionParameters", "DeliveryRuleClientPortConditionParameters", + "DeliveryRuleServerPortConditionParameters", "DeliveryRuleHostNameConditionParameters", and + "DeliveryRuleSslProtocolConditionParameters". + :vartype type_name: str or ~azure.mgmt.cdn.models.DeliveryRuleConditionParametersType :ivar operator: Describes operator to be matched. Required. Known values are: "Any" and "IPMatch". :vartype operator: str or ~azure.mgmt.cdn.models.SocketAddrOperator @@ -12172,16 +12653,13 @@ class SocketAddrMatchConditionParameters(_serialization.Model): def __init__( self, *, - type_name: Union[str, "_models.SocketAddrMatchConditionParametersTypeName"], operator: Union[str, "_models.SocketAddrOperator"], negate_condition: bool = False, - match_values: Optional[List[str]] = None, - transforms: Optional[List[Union[str, "_models.Transform"]]] = None, + match_values: Optional[list[str]] = None, + transforms: Optional[list[Union[str, "_models.Transform"]]] = None, **kwargs: Any ) -> None: """ - :keyword type_name: Required. "DeliveryRuleSocketAddrConditionParameters" - :paramtype type_name: str or ~azure.mgmt.cdn.models.SocketAddrMatchConditionParametersTypeName :keyword operator: Describes operator to be matched. Required. Known values are: "Any" and "IPMatch". :paramtype operator: str or ~azure.mgmt.cdn.models.SocketAddrOperator @@ -12193,20 +12671,30 @@ def __init__( :paramtype transforms: list[str or ~azure.mgmt.cdn.models.Transform] """ super().__init__(**kwargs) - self.type_name = type_name + self.type_name: str = "DeliveryRuleSocketAddrConditionParameters" self.operator = operator self.negate_condition = negate_condition self.match_values = match_values self.transforms = transforms -class SslProtocolMatchConditionParameters(_serialization.Model): +class SslProtocolMatchConditionParameters(DeliveryRuleConditionParameters): """Defines the parameters for SslProtocol match conditions. All required parameters must be populated in order to send to server. - :ivar type_name: Required. "DeliveryRuleSslProtocolConditionParameters" - :vartype type_name: str or ~azure.mgmt.cdn.models.SslProtocolMatchConditionParametersTypeName + :ivar type_name: Required. Known values are: "DeliveryRuleRemoteAddressConditionParameters", + "DeliveryRuleRequestMethodConditionParameters", "DeliveryRuleQueryStringConditionParameters", + "DeliveryRulePostArgsConditionParameters", "DeliveryRuleRequestUriConditionParameters", + "DeliveryRuleRequestHeaderConditionParameters", "DeliveryRuleRequestBodyConditionParameters", + "DeliveryRuleRequestSchemeConditionParameters", "DeliveryRuleUrlPathMatchConditionParameters", + "DeliveryRuleUrlFileExtensionMatchConditionParameters", + "DeliveryRuleUrlFilenameConditionParameters", "DeliveryRuleHttpVersionConditionParameters", + "DeliveryRuleCookiesConditionParameters", "DeliveryRuleIsDeviceConditionParameters", + "DeliveryRuleSocketAddrConditionParameters", "DeliveryRuleClientPortConditionParameters", + "DeliveryRuleServerPortConditionParameters", "DeliveryRuleHostNameConditionParameters", and + "DeliveryRuleSslProtocolConditionParameters". + :vartype type_name: str or ~azure.mgmt.cdn.models.DeliveryRuleConditionParametersType :ivar operator: Describes operator to be matched. Required. "Equal" :vartype operator: str or ~azure.mgmt.cdn.models.SslProtocolOperator :ivar negate_condition: Describes if this is negate condition or not. @@ -12233,16 +12721,13 @@ class SslProtocolMatchConditionParameters(_serialization.Model): def __init__( self, *, - type_name: Union[str, "_models.SslProtocolMatchConditionParametersTypeName"], operator: Union[str, "_models.SslProtocolOperator"], negate_condition: bool = False, - match_values: Optional[List[Union[str, "_models.SslProtocol"]]] = None, - transforms: Optional[List[Union[str, "_models.Transform"]]] = None, + match_values: Optional[list[Union[str, "_models.SslProtocol"]]] = None, + transforms: Optional[list[Union[str, "_models.Transform"]]] = None, **kwargs: Any ) -> None: """ - :keyword type_name: Required. "DeliveryRuleSslProtocolConditionParameters" - :paramtype type_name: str or ~azure.mgmt.cdn.models.SslProtocolMatchConditionParametersTypeName :keyword operator: Describes operator to be matched. Required. "Equal" :paramtype operator: str or ~azure.mgmt.cdn.models.SslProtocolOperator :keyword negate_condition: Describes if this is negate condition or not. @@ -12253,7 +12738,7 @@ def __init__( :paramtype transforms: list[str or ~azure.mgmt.cdn.models.Transform] """ super().__init__(**kwargs) - self.type_name = type_name + self.type_name: str = "DeliveryRuleSslProtocolConditionParameters" self.operator = operator self.negate_condition = negate_condition self.match_values = match_values @@ -12280,7 +12765,7 @@ class SsoUri(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.sso_uri_value = None + self.sso_uri_value: Optional[str] = None class SupportedOptimizationTypesListResult(_serialization.Model): @@ -12303,24 +12788,24 @@ class SupportedOptimizationTypesListResult(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.supported_optimization_types = None + self.supported_optimization_types: Optional[list[Union[str, "_models.OptimizationType"]]] = None class SystemData(_serialization.Model): - """Read only system data. + """Metadata pertaining to creation and last modification of the resource. - :ivar created_by: An identifier for the identity that created the resource. + :ivar created_by: The identity that created the resource. :vartype created_by: str :ivar created_by_type: The type of identity that created the resource. Known values are: - "user", "application", "managedIdentity", and "key". - :vartype created_by_type: str or ~azure.mgmt.cdn.models.IdentityType + "User", "Application", "ManagedIdentity", and "Key". + :vartype created_by_type: str or ~azure.mgmt.cdn.models.CreatedByType :ivar created_at: The timestamp of resource creation (UTC). :vartype created_at: ~datetime.datetime - :ivar last_modified_by: An identifier for the identity that last modified the resource. + :ivar last_modified_by: The identity that last modified the resource. :vartype last_modified_by: str :ivar last_modified_by_type: The type of identity that last modified the resource. Known values - are: "user", "application", "managedIdentity", and "key". - :vartype last_modified_by_type: str or ~azure.mgmt.cdn.models.IdentityType + are: "User", "Application", "ManagedIdentity", and "Key". + :vartype last_modified_by_type: str or ~azure.mgmt.cdn.models.CreatedByType :ivar last_modified_at: The timestamp of resource last modification (UTC). :vartype last_modified_at: ~datetime.datetime """ @@ -12338,26 +12823,26 @@ def __init__( self, *, created_by: Optional[str] = None, - created_by_type: Optional[Union[str, "_models.IdentityType"]] = None, + created_by_type: Optional[Union[str, "_models.CreatedByType"]] = None, created_at: Optional[datetime.datetime] = None, last_modified_by: Optional[str] = None, - last_modified_by_type: Optional[Union[str, "_models.IdentityType"]] = None, + last_modified_by_type: Optional[Union[str, "_models.CreatedByType"]] = None, last_modified_at: Optional[datetime.datetime] = None, **kwargs: Any ) -> None: """ - :keyword created_by: An identifier for the identity that created the resource. + :keyword created_by: The identity that created the resource. :paramtype created_by: str :keyword created_by_type: The type of identity that created the resource. Known values are: - "user", "application", "managedIdentity", and "key". - :paramtype created_by_type: str or ~azure.mgmt.cdn.models.IdentityType + "User", "Application", "ManagedIdentity", and "Key". + :paramtype created_by_type: str or ~azure.mgmt.cdn.models.CreatedByType :keyword created_at: The timestamp of resource creation (UTC). :paramtype created_at: ~datetime.datetime - :keyword last_modified_by: An identifier for the identity that last modified the resource. + :keyword last_modified_by: The identity that last modified the resource. :paramtype last_modified_by: str :keyword last_modified_by_type: The type of identity that last modified the resource. Known - values are: "user", "application", "managedIdentity", and "key". - :paramtype last_modified_by_type: str or ~azure.mgmt.cdn.models.IdentityType + values are: "User", "Application", "ManagedIdentity", and "Key". + :paramtype last_modified_by_type: str or ~azure.mgmt.cdn.models.CreatedByType :keyword last_modified_at: The timestamp of resource last modification (UTC). :paramtype last_modified_at: ~datetime.datetime """ @@ -12370,14 +12855,23 @@ def __init__( self.last_modified_at = last_modified_at -class UrlFileExtensionMatchConditionParameters(_serialization.Model): +class UrlFileExtensionMatchConditionParameters(DeliveryRuleConditionParameters): """Defines the parameters for UrlFileExtension match conditions. All required parameters must be populated in order to send to server. - :ivar type_name: Required. "DeliveryRuleUrlFileExtensionMatchConditionParameters" - :vartype type_name: str or - ~azure.mgmt.cdn.models.UrlFileExtensionMatchConditionParametersTypeName + :ivar type_name: Required. Known values are: "DeliveryRuleRemoteAddressConditionParameters", + "DeliveryRuleRequestMethodConditionParameters", "DeliveryRuleQueryStringConditionParameters", + "DeliveryRulePostArgsConditionParameters", "DeliveryRuleRequestUriConditionParameters", + "DeliveryRuleRequestHeaderConditionParameters", "DeliveryRuleRequestBodyConditionParameters", + "DeliveryRuleRequestSchemeConditionParameters", "DeliveryRuleUrlPathMatchConditionParameters", + "DeliveryRuleUrlFileExtensionMatchConditionParameters", + "DeliveryRuleUrlFilenameConditionParameters", "DeliveryRuleHttpVersionConditionParameters", + "DeliveryRuleCookiesConditionParameters", "DeliveryRuleIsDeviceConditionParameters", + "DeliveryRuleSocketAddrConditionParameters", "DeliveryRuleClientPortConditionParameters", + "DeliveryRuleServerPortConditionParameters", "DeliveryRuleHostNameConditionParameters", and + "DeliveryRuleSslProtocolConditionParameters". + :vartype type_name: str or ~azure.mgmt.cdn.models.DeliveryRuleConditionParametersType :ivar operator: Describes operator to be matched. Required. Known values are: "Any", "Equal", "Contains", "BeginsWith", "EndsWith", "LessThan", "LessThanOrEqual", "GreaterThan", "GreaterThanOrEqual", and "RegEx". @@ -12406,17 +12900,13 @@ class UrlFileExtensionMatchConditionParameters(_serialization.Model): def __init__( self, *, - type_name: Union[str, "_models.UrlFileExtensionMatchConditionParametersTypeName"], operator: Union[str, "_models.UrlFileExtensionOperator"], negate_condition: bool = False, - match_values: Optional[List[str]] = None, - transforms: Optional[List[Union[str, "_models.Transform"]]] = None, + match_values: Optional[list[str]] = None, + transforms: Optional[list[Union[str, "_models.Transform"]]] = None, **kwargs: Any ) -> None: """ - :keyword type_name: Required. "DeliveryRuleUrlFileExtensionMatchConditionParameters" - :paramtype type_name: str or - ~azure.mgmt.cdn.models.UrlFileExtensionMatchConditionParametersTypeName :keyword operator: Describes operator to be matched. Required. Known values are: "Any", "Equal", "Contains", "BeginsWith", "EndsWith", "LessThan", "LessThanOrEqual", "GreaterThan", "GreaterThanOrEqual", and "RegEx". @@ -12429,20 +12919,30 @@ def __init__( :paramtype transforms: list[str or ~azure.mgmt.cdn.models.Transform] """ super().__init__(**kwargs) - self.type_name = type_name + self.type_name: str = "DeliveryRuleUrlFileExtensionMatchConditionParameters" self.operator = operator self.negate_condition = negate_condition self.match_values = match_values self.transforms = transforms -class UrlFileNameMatchConditionParameters(_serialization.Model): +class UrlFileNameMatchConditionParameters(DeliveryRuleConditionParameters): """Defines the parameters for UrlFilename match conditions. All required parameters must be populated in order to send to server. - :ivar type_name: Required. "DeliveryRuleUrlFilenameConditionParameters" - :vartype type_name: str or ~azure.mgmt.cdn.models.UrlFileNameMatchConditionParametersTypeName + :ivar type_name: Required. Known values are: "DeliveryRuleRemoteAddressConditionParameters", + "DeliveryRuleRequestMethodConditionParameters", "DeliveryRuleQueryStringConditionParameters", + "DeliveryRulePostArgsConditionParameters", "DeliveryRuleRequestUriConditionParameters", + "DeliveryRuleRequestHeaderConditionParameters", "DeliveryRuleRequestBodyConditionParameters", + "DeliveryRuleRequestSchemeConditionParameters", "DeliveryRuleUrlPathMatchConditionParameters", + "DeliveryRuleUrlFileExtensionMatchConditionParameters", + "DeliveryRuleUrlFilenameConditionParameters", "DeliveryRuleHttpVersionConditionParameters", + "DeliveryRuleCookiesConditionParameters", "DeliveryRuleIsDeviceConditionParameters", + "DeliveryRuleSocketAddrConditionParameters", "DeliveryRuleClientPortConditionParameters", + "DeliveryRuleServerPortConditionParameters", "DeliveryRuleHostNameConditionParameters", and + "DeliveryRuleSslProtocolConditionParameters". + :vartype type_name: str or ~azure.mgmt.cdn.models.DeliveryRuleConditionParametersType :ivar operator: Describes operator to be matched. Required. Known values are: "Any", "Equal", "Contains", "BeginsWith", "EndsWith", "LessThan", "LessThanOrEqual", "GreaterThan", "GreaterThanOrEqual", and "RegEx". @@ -12471,16 +12971,13 @@ class UrlFileNameMatchConditionParameters(_serialization.Model): def __init__( self, *, - type_name: Union[str, "_models.UrlFileNameMatchConditionParametersTypeName"], operator: Union[str, "_models.UrlFileNameOperator"], negate_condition: bool = False, - match_values: Optional[List[str]] = None, - transforms: Optional[List[Union[str, "_models.Transform"]]] = None, + match_values: Optional[list[str]] = None, + transforms: Optional[list[Union[str, "_models.Transform"]]] = None, **kwargs: Any ) -> None: """ - :keyword type_name: Required. "DeliveryRuleUrlFilenameConditionParameters" - :paramtype type_name: str or ~azure.mgmt.cdn.models.UrlFileNameMatchConditionParametersTypeName :keyword operator: Describes operator to be matched. Required. Known values are: "Any", "Equal", "Contains", "BeginsWith", "EndsWith", "LessThan", "LessThanOrEqual", "GreaterThan", "GreaterThanOrEqual", and "RegEx". @@ -12493,20 +12990,30 @@ def __init__( :paramtype transforms: list[str or ~azure.mgmt.cdn.models.Transform] """ super().__init__(**kwargs) - self.type_name = type_name + self.type_name: str = "DeliveryRuleUrlFilenameConditionParameters" self.operator = operator self.negate_condition = negate_condition self.match_values = match_values self.transforms = transforms -class UrlPathMatchConditionParameters(_serialization.Model): +class UrlPathMatchConditionParameters(DeliveryRuleConditionParameters): """Defines the parameters for UrlPath match conditions. All required parameters must be populated in order to send to server. - :ivar type_name: Required. "DeliveryRuleUrlPathMatchConditionParameters" - :vartype type_name: str or ~azure.mgmt.cdn.models.UrlPathMatchConditionParametersTypeName + :ivar type_name: Required. Known values are: "DeliveryRuleRemoteAddressConditionParameters", + "DeliveryRuleRequestMethodConditionParameters", "DeliveryRuleQueryStringConditionParameters", + "DeliveryRulePostArgsConditionParameters", "DeliveryRuleRequestUriConditionParameters", + "DeliveryRuleRequestHeaderConditionParameters", "DeliveryRuleRequestBodyConditionParameters", + "DeliveryRuleRequestSchemeConditionParameters", "DeliveryRuleUrlPathMatchConditionParameters", + "DeliveryRuleUrlFileExtensionMatchConditionParameters", + "DeliveryRuleUrlFilenameConditionParameters", "DeliveryRuleHttpVersionConditionParameters", + "DeliveryRuleCookiesConditionParameters", "DeliveryRuleIsDeviceConditionParameters", + "DeliveryRuleSocketAddrConditionParameters", "DeliveryRuleClientPortConditionParameters", + "DeliveryRuleServerPortConditionParameters", "DeliveryRuleHostNameConditionParameters", and + "DeliveryRuleSslProtocolConditionParameters". + :vartype type_name: str or ~azure.mgmt.cdn.models.DeliveryRuleConditionParametersType :ivar operator: Describes operator to be matched. Required. Known values are: "Any", "Equal", "Contains", "BeginsWith", "EndsWith", "LessThan", "LessThanOrEqual", "GreaterThan", "GreaterThanOrEqual", "Wildcard", and "RegEx". @@ -12535,16 +13042,13 @@ class UrlPathMatchConditionParameters(_serialization.Model): def __init__( self, *, - type_name: Union[str, "_models.UrlPathMatchConditionParametersTypeName"], operator: Union[str, "_models.UrlPathOperator"], negate_condition: bool = False, - match_values: Optional[List[str]] = None, - transforms: Optional[List[Union[str, "_models.Transform"]]] = None, + match_values: Optional[list[str]] = None, + transforms: Optional[list[Union[str, "_models.Transform"]]] = None, **kwargs: Any ) -> None: """ - :keyword type_name: Required. "DeliveryRuleUrlPathMatchConditionParameters" - :paramtype type_name: str or ~azure.mgmt.cdn.models.UrlPathMatchConditionParametersTypeName :keyword operator: Describes operator to be matched. Required. Known values are: "Any", "Equal", "Contains", "BeginsWith", "EndsWith", "LessThan", "LessThanOrEqual", "GreaterThan", "GreaterThanOrEqual", "Wildcard", and "RegEx". @@ -12557,7 +13061,7 @@ def __init__( :paramtype transforms: list[str or ~azure.mgmt.cdn.models.Transform] """ super().__init__(**kwargs) - self.type_name = type_name + self.type_name: str = "DeliveryRuleUrlPathMatchConditionParameters" self.operator = operator self.negate_condition = negate_condition self.match_values = match_values @@ -12598,13 +13102,18 @@ def __init__(self, *, parameters: "_models.UrlRedirectActionParameters", **kwarg self.parameters = parameters -class UrlRedirectActionParameters(_serialization.Model): +class UrlRedirectActionParameters(DeliveryRuleActionParameters): """Defines the parameters for the url redirect action. All required parameters must be populated in order to send to server. - :ivar type_name: Required. "DeliveryRuleUrlRedirectActionParameters" - :vartype type_name: str or ~azure.mgmt.cdn.models.UrlRedirectActionParametersTypeName + :ivar type_name: Required. Known values are: "DeliveryRuleUrlRedirectActionParameters", + "DeliveryRuleUrlSigningActionParameters", "DeliveryRuleOriginGroupOverrideActionParameters", + "DeliveryRuleUrlRewriteActionParameters", "DeliveryRuleHeaderActionParameters", + "DeliveryRuleCacheExpirationActionParameters", + "DeliveryRuleCacheKeyQueryStringBehaviorActionParameters", and + "DeliveryRuleRouteConfigurationOverrideActionParameters". + :vartype type_name: str or ~azure.mgmt.cdn.models.DeliveryRuleActionParametersType :ivar redirect_type: The redirect type the rule will use when redirecting traffic. Required. Known values are: "Moved", "Found", "TemporaryRedirect", and "PermanentRedirect". :vartype redirect_type: str or ~azure.mgmt.cdn.models.RedirectType @@ -12619,7 +13128,7 @@ class UrlRedirectActionParameters(_serialization.Model): :vartype custom_hostname: str :ivar custom_query_string: The set of query strings to be placed in the redirect URL. Setting this value would replace any existing query string; leave empty to preserve the incoming query - string. Query string must be in :code:``=:code:`` format. ? and & will be added + string. Query string must be in :code:``=\\ :code:`` format. ? and & will be added automatically so do not include them. :vartype custom_query_string: str :ivar custom_fragment: Fragment to add to the redirect URL. Fragment is the part of the URL @@ -12645,7 +13154,6 @@ class UrlRedirectActionParameters(_serialization.Model): def __init__( self, *, - type_name: Union[str, "_models.UrlRedirectActionParametersTypeName"], redirect_type: Union[str, "_models.RedirectType"], destination_protocol: Optional[Union[str, "_models.DestinationProtocol"]] = None, custom_path: Optional[str] = None, @@ -12655,8 +13163,6 @@ def __init__( **kwargs: Any ) -> None: """ - :keyword type_name: Required. "DeliveryRuleUrlRedirectActionParameters" - :paramtype type_name: str or ~azure.mgmt.cdn.models.UrlRedirectActionParametersTypeName :keyword redirect_type: The redirect type the rule will use when redirecting traffic. Required. Known values are: "Moved", "Found", "TemporaryRedirect", and "PermanentRedirect". :paramtype redirect_type: str or ~azure.mgmt.cdn.models.RedirectType @@ -12671,7 +13177,7 @@ def __init__( :paramtype custom_hostname: str :keyword custom_query_string: The set of query strings to be placed in the redirect URL. Setting this value would replace any existing query string; leave empty to preserve the - incoming query string. Query string must be in :code:``=:code:`` format. ? and & + incoming query string. Query string must be in :code:``=\\ :code:`` format. ? and & will be added automatically so do not include them. :paramtype custom_query_string: str :keyword custom_fragment: Fragment to add to the redirect URL. Fragment is the part of the URL @@ -12679,7 +13185,7 @@ def __init__( :paramtype custom_fragment: str """ super().__init__(**kwargs) - self.type_name = type_name + self.type_name: str = "DeliveryRuleUrlRedirectActionParameters" self.redirect_type = redirect_type self.destination_protocol = destination_protocol self.custom_path = custom_path @@ -12722,13 +13228,18 @@ def __init__(self, *, parameters: "_models.UrlRewriteActionParameters", **kwargs self.parameters = parameters -class UrlRewriteActionParameters(_serialization.Model): +class UrlRewriteActionParameters(DeliveryRuleActionParameters): """Defines the parameters for the url rewrite action. All required parameters must be populated in order to send to server. - :ivar type_name: Required. "DeliveryRuleUrlRewriteActionParameters" - :vartype type_name: str or ~azure.mgmt.cdn.models.UrlRewriteActionParametersTypeName + :ivar type_name: Required. Known values are: "DeliveryRuleUrlRedirectActionParameters", + "DeliveryRuleUrlSigningActionParameters", "DeliveryRuleOriginGroupOverrideActionParameters", + "DeliveryRuleUrlRewriteActionParameters", "DeliveryRuleHeaderActionParameters", + "DeliveryRuleCacheExpirationActionParameters", + "DeliveryRuleCacheKeyQueryStringBehaviorActionParameters", and + "DeliveryRuleRouteConfigurationOverrideActionParameters". + :vartype type_name: str or ~azure.mgmt.cdn.models.DeliveryRuleActionParametersType :ivar source_pattern: define a request URI pattern that identifies the type of requests that may be rewritten. If value is blank, all strings are matched. Required. :vartype source_pattern: str @@ -12753,17 +13264,9 @@ class UrlRewriteActionParameters(_serialization.Model): } def __init__( - self, - *, - type_name: Union[str, "_models.UrlRewriteActionParametersTypeName"], - source_pattern: str, - destination: str, - preserve_unmatched_path: Optional[bool] = None, - **kwargs: Any + self, *, source_pattern: str, destination: str, preserve_unmatched_path: Optional[bool] = None, **kwargs: Any ) -> None: """ - :keyword type_name: Required. "DeliveryRuleUrlRewriteActionParameters" - :paramtype type_name: str or ~azure.mgmt.cdn.models.UrlRewriteActionParametersTypeName :keyword source_pattern: define a request URI pattern that identifies the type of requests that may be rewritten. If value is blank, all strings are matched. Required. :paramtype source_pattern: str @@ -12774,7 +13277,7 @@ def __init__( :paramtype preserve_unmatched_path: bool """ super().__init__(**kwargs) - self.type_name = type_name + self.type_name: str = "DeliveryRuleUrlRewriteActionParameters" self.source_pattern = source_pattern self.destination = destination self.preserve_unmatched_path = preserve_unmatched_path @@ -12814,13 +13317,18 @@ def __init__(self, *, parameters: "_models.UrlSigningActionParameters", **kwargs self.parameters = parameters -class UrlSigningActionParameters(_serialization.Model): +class UrlSigningActionParameters(DeliveryRuleActionParameters): """Defines the parameters for the Url Signing action. All required parameters must be populated in order to send to server. - :ivar type_name: Required. "DeliveryRuleUrlSigningActionParameters" - :vartype type_name: str or ~azure.mgmt.cdn.models.UrlSigningActionParametersTypeName + :ivar type_name: Required. Known values are: "DeliveryRuleUrlRedirectActionParameters", + "DeliveryRuleUrlSigningActionParameters", "DeliveryRuleOriginGroupOverrideActionParameters", + "DeliveryRuleUrlRewriteActionParameters", "DeliveryRuleHeaderActionParameters", + "DeliveryRuleCacheExpirationActionParameters", + "DeliveryRuleCacheKeyQueryStringBehaviorActionParameters", and + "DeliveryRuleRouteConfigurationOverrideActionParameters". + :vartype type_name: str or ~azure.mgmt.cdn.models.DeliveryRuleActionParametersType :ivar algorithm: Algorithm to use for URL signing. "SHA256" :vartype algorithm: str or ~azure.mgmt.cdn.models.Algorithm :ivar parameter_name_override: Defines which query string parameters in the url to be @@ -12841,14 +13349,11 @@ class UrlSigningActionParameters(_serialization.Model): def __init__( self, *, - type_name: Union[str, "_models.UrlSigningActionParametersTypeName"], algorithm: Optional[Union[str, "_models.Algorithm"]] = None, - parameter_name_override: Optional[List["_models.UrlSigningParamIdentifier"]] = None, + parameter_name_override: Optional[list["_models.UrlSigningParamIdentifier"]] = None, **kwargs: Any ) -> None: """ - :keyword type_name: Required. "DeliveryRuleUrlSigningActionParameters" - :paramtype type_name: str or ~azure.mgmt.cdn.models.UrlSigningActionParametersTypeName :keyword algorithm: Algorithm to use for URL signing. "SHA256" :paramtype algorithm: str or ~azure.mgmt.cdn.models.Algorithm :keyword parameter_name_override: Defines which query string parameters in the url to be @@ -12856,7 +13361,7 @@ def __init__( :paramtype parameter_name_override: list[~azure.mgmt.cdn.models.UrlSigningParamIdentifier] """ super().__init__(**kwargs) - self.type_name = type_name + self.type_name: str = "DeliveryRuleUrlSigningActionParameters" self.algorithm = algorithm self.parameter_name_override = parameter_name_override @@ -12913,10 +13418,10 @@ class UrlSigningKeyParameters(SecretParameters): :vartype key_id: str :ivar secret_source: Resource reference to the Azure Key Vault secret. Expected to be in format of - /subscriptions/{​​​​​​​​​subscriptionId}​​​​​​​​​/resourceGroups/{​​​​​​​​​resourceGroupName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/providers/Microsoft.KeyVault/vaults/{vaultName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/secrets/{secretName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​. # pylint: disable=line-too-long + /subscriptions/{​​​​​​​​​subscriptionId}​​​​​​​​​/resourceGroups/{​​​​​​​​​resourceGroupName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/providers/Microsoft.KeyVault/vaults/{vaultName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/secrets/{secretName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​. Required. :vartype secret_source: ~azure.mgmt.cdn.models.ResourceReference - :ivar secret_version: Version of the secret to be used. + :ivar secret_version: Version of the secret to be used. Required. :vartype secret_version: str """ @@ -12924,6 +13429,7 @@ class UrlSigningKeyParameters(SecretParameters): "type": {"required": True}, "key_id": {"required": True}, "secret_source": {"required": True}, + "secret_version": {"required": True}, } _attribute_map = { @@ -12934,12 +13440,7 @@ class UrlSigningKeyParameters(SecretParameters): } def __init__( - self, - *, - key_id: str, - secret_source: "_models.ResourceReference", - secret_version: Optional[str] = None, - **kwargs: Any + self, *, key_id: str, secret_source: "_models.ResourceReference", secret_version: str, **kwargs: Any ) -> None: """ :keyword key_id: Defines the customer defined key Id. This id will exist in the incoming @@ -12947,10 +13448,10 @@ def __init__( :paramtype key_id: str :keyword secret_source: Resource reference to the Azure Key Vault secret. Expected to be in format of - /subscriptions/{​​​​​​​​​subscriptionId}​​​​​​​​​/resourceGroups/{​​​​​​​​​resourceGroupName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/providers/Microsoft.KeyVault/vaults/{vaultName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/secrets/{secretName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​. # pylint: disable=line-too-long + /subscriptions/{​​​​​​​​​subscriptionId}​​​​​​​​​/resourceGroups/{​​​​​​​​​resourceGroupName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/providers/Microsoft.KeyVault/vaults/{vaultName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/secrets/{secretName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​. Required. :paramtype secret_source: ~azure.mgmt.cdn.models.ResourceReference - :keyword secret_version: Version of the secret to be used. + :keyword secret_version: Version of the secret to be used. Required. :paramtype secret_version: str """ super().__init__(**kwargs) @@ -13052,7 +13553,7 @@ def __init__( :paramtype name: ~azure.mgmt.cdn.models.UsageName """ super().__init__(**kwargs) - self.id = None + self.id: Optional[str] = None self.unit = unit self.current_value = current_value self.limit = limit @@ -13100,7 +13601,7 @@ class UsagesListResult(_serialization.Model): } def __init__( - self, *, value: Optional[List["_models.Usage"]] = None, next_link: Optional[str] = None, **kwargs: Any + self, *, value: Optional[list["_models.Usage"]] = None, next_link: Optional[str] = None, **kwargs: Any ) -> None: """ :keyword value: The list of resource usages. @@ -13137,8 +13638,8 @@ class UserAssignedIdentity(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.principal_id = None - self.client_id = None + self.principal_id: Optional[str] = None + self.client_id: Optional[str] = None class UserManagedHttpsParameters(CustomDomainHttpsParameters): @@ -13256,9 +13757,9 @@ class ValidateCustomDomainOutput(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.custom_domain_validated = None - self.reason = None - self.message = None + self.custom_domain_validated: Optional[bool] = None + self.reason: Optional[str] = None + self.message: Optional[str] = None class ValidateProbeInput(_serialization.Model): @@ -13315,9 +13816,9 @@ class ValidateProbeOutput(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.is_valid = None - self.error_code = None - self.message = None + self.is_valid: Optional[bool] = None + self.error_code: Optional[str] = None + self.message: Optional[str] = None class ValidateSecretInput(_serialization.Model): @@ -13330,7 +13831,7 @@ class ValidateSecretInput(_serialization.Model): :vartype secret_type: str or ~azure.mgmt.cdn.models.SecretType :ivar secret_source: Resource reference to the Azure Key Vault secret. Expected to be in format of - /subscriptions/{​​​​​​​​​subscriptionId}​​​​​​​​​/resourceGroups/{​​​​​​​​​resourceGroupName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/providers/Microsoft.KeyVault/vaults/{vaultName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/secrets/{secretName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​. # pylint: disable=line-too-long + /subscriptions/{​​​​​​​​​subscriptionId}​​​​​​​​​/resourceGroups/{​​​​​​​​​resourceGroupName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/providers/Microsoft.KeyVault/vaults/{vaultName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/secrets/{secretName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​. Required. :vartype secret_source: ~azure.mgmt.cdn.models.ResourceReference :ivar secret_version: Secret version, if customer is using a specific version. @@ -13362,7 +13863,7 @@ def __init__( :paramtype secret_type: str or ~azure.mgmt.cdn.models.SecretType :keyword secret_source: Resource reference to the Azure Key Vault secret. Expected to be in format of - /subscriptions/{​​​​​​​​​subscriptionId}​​​​​​​​​/resourceGroups/{​​​​​​​​​resourceGroupName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/providers/Microsoft.KeyVault/vaults/{vaultName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/secrets/{secretName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​. # pylint: disable=line-too-long + /subscriptions/{​​​​​​​​​subscriptionId}​​​​​​​​​/resourceGroups/{​​​​​​​​​resourceGroupName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/providers/Microsoft.KeyVault/vaults/{vaultName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/secrets/{secretName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​. Required. :paramtype secret_source: ~azure.mgmt.cdn.models.ResourceReference :keyword secret_version: Secret version, if customer is using a specific version. @@ -13424,7 +13925,7 @@ class ValidationToken(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.token = None + self.token: Optional[str] = None class WafMetricsResponse(_serialization.Model): @@ -13453,7 +13954,7 @@ def __init__( date_time_begin: Optional[datetime.datetime] = None, date_time_end: Optional[datetime.datetime] = None, granularity: Optional[Union[str, "_models.WafMetricsGranularity"]] = None, - series: Optional[List["_models.WafMetricsResponseSeriesItem"]] = None, + series: Optional[list["_models.WafMetricsResponseSeriesItem"]] = None, **kwargs: Any ) -> None: """ @@ -13502,9 +14003,9 @@ def __init__( *, metric: Optional[str] = None, unit: Optional[Union[str, "_models.WafMetricsSeriesUnit"]] = None, - groups: Optional[List["_models.WafMetricsResponseSeriesPropertiesItemsItem"]] = None, + groups: Optional[list["_models.WafMetricsResponseSeriesPropertiesItemsItem"]] = None, data: Optional[ - List["_models.Components18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsPropertiesDataItems"] + list["_models.Components18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsPropertiesDataItems"] ] = None, **kwargs: Any ) -> None: @@ -13577,8 +14078,8 @@ def __init__( *, date_time_begin: Optional[datetime.datetime] = None, date_time_end: Optional[datetime.datetime] = None, - groups: Optional[List[str]] = None, - data: Optional[List["_models.WafRankingsResponseDataItem"]] = None, + groups: Optional[list[str]] = None, + data: Optional[list["_models.WafRankingsResponseDataItem"]] = None, **kwargs: Any ) -> None: """ @@ -13619,9 +14120,9 @@ class WafRankingsResponseDataItem(_serialization.Model): def __init__( self, *, - group_values: Optional[List[str]] = None, + group_values: Optional[list[str]] = None, metrics: Optional[ - List["_models.ComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItems"] + list["_models.ComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItems"] ] = None, **kwargs: Any ) -> None: @@ -13630,7 +14131,7 @@ def __init__( :paramtype group_values: list[str] :keyword metrics: :paramtype metrics: - list[~azure.mgmt.cdn.models.ComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItems] # pylint: disable=line-too-long + list[~azure.mgmt.cdn.models.ComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItems] """ super().__init__(**kwargs) self.group_values = group_values diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/_patch.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/_patch.py index f7dd32510333..49900f6ab120 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/_patch.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/_patch.py @@ -2,6 +2,7 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ + """Customize generated code here. Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/__init__.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/__init__.py index ebcf7eb37437..8fc333a2c406 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/__init__.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/__init__.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,36 +6,41 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._cdn_management_client_operations import CdnManagementClientOperationsMixin -from ._afd_profiles_operations import AFDProfilesOperations -from ._afd_custom_domains_operations import AFDCustomDomainsOperations -from ._afd_endpoints_operations import AFDEndpointsOperations -from ._afd_origin_groups_operations import AFDOriginGroupsOperations -from ._afd_origins_operations import AFDOriginsOperations -from ._routes_operations import RoutesOperations -from ._rule_sets_operations import RuleSetsOperations -from ._rules_operations import RulesOperations -from ._security_policies_operations import SecurityPoliciesOperations -from ._secrets_operations import SecretsOperations -from ._log_analytics_operations import LogAnalyticsOperations -from ._profiles_operations import ProfilesOperations -from ._endpoints_operations import EndpointsOperations -from ._origins_operations import OriginsOperations -from ._origin_groups_operations import OriginGroupsOperations -from ._custom_domains_operations import CustomDomainsOperations -from ._resource_usage_operations import ResourceUsageOperations -from ._operations import Operations -from ._edge_nodes_operations import EdgeNodesOperations -from ._policies_operations import PoliciesOperations -from ._managed_rule_sets_operations import ManagedRuleSetsOperations +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._cdn_management_client_operations import _CdnManagementClientOperationsMixin # type: ignore # pylint: disable=unused-import +from ._afd_profiles_operations import AFDProfilesOperations # type: ignore +from ._afd_custom_domains_operations import AFDCustomDomainsOperations # type: ignore +from ._afd_endpoints_operations import AFDEndpointsOperations # type: ignore +from ._afd_origin_groups_operations import AFDOriginGroupsOperations # type: ignore +from ._afd_origins_operations import AFDOriginsOperations # type: ignore +from ._routes_operations import RoutesOperations # type: ignore +from ._rule_sets_operations import RuleSetsOperations # type: ignore +from ._rules_operations import RulesOperations # type: ignore +from ._security_policies_operations import SecurityPoliciesOperations # type: ignore +from ._secrets_operations import SecretsOperations # type: ignore +from ._log_analytics_operations import LogAnalyticsOperations # type: ignore +from ._profiles_operations import ProfilesOperations # type: ignore +from ._endpoints_operations import EndpointsOperations # type: ignore +from ._origins_operations import OriginsOperations # type: ignore +from ._origin_groups_operations import OriginGroupsOperations # type: ignore +from ._custom_domains_operations import CustomDomainsOperations # type: ignore +from ._resource_usage_operations import ResourceUsageOperations # type: ignore +from ._operations import Operations # type: ignore +from ._edge_nodes_operations import EdgeNodesOperations # type: ignore +from ._policies_operations import PoliciesOperations # type: ignore +from ._managed_rule_sets_operations import ManagedRuleSetsOperations # type: ignore from ._patch import __all__ as _patch_all -from ._patch import * # pylint: disable=unused-wildcard-import +from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "CdnManagementClientOperationsMixin", "AFDProfilesOperations", "AFDCustomDomainsOperations", "AFDEndpointsOperations", @@ -57,5 +63,5 @@ "PoliciesOperations", "ManagedRuleSetsOperations", ] -__all__.extend([p for p in _patch_all if p not in __all__]) +__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_afd_custom_domains_operations.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_afd_custom_domains_operations.py index 43dffe70d382..bdd074136527 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_afd_custom_domains_operations.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_afd_custom_domains_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,39 +6,38 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Iterable, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, ResourceNotModifiedError, + StreamClosedError, + StreamConsumedError, map_error, ) from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpResponse from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest +from azure.core.rest import HttpRequest, HttpResponse from azure.core.tracing.decorator import distributed_trace from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling from .. import models as _models -from .._serialization import Serializer -from .._vendor import CdnManagementClientMixinABC, _convert_request +from .._configuration import CdnManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -50,19 +49,21 @@ def build_list_by_profile_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/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\._\(\)]+$" + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "profileName": _SERIALIZER.url( + "profile_name", profile_name, "str", max_length=260, min_length=1, pattern=r"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$" ), - "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), } @@ -83,19 +84,21 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/customDomains/{customDomainName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._\(\)]+$" + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "profileName": _SERIALIZER.url( + "profile_name", profile_name, "str", max_length=260, min_length=1, pattern=r"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$" ), - "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), "customDomainName": _SERIALIZER.url("custom_domain_name", custom_domain_name, "str"), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), } @@ -117,7 +120,7 @@ def build_create_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -125,12 +128,14 @@ def build_create_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/customDomains/{customDomainName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._\(\)]+$" + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "profileName": _SERIALIZER.url( + "profile_name", profile_name, "str", max_length=260, min_length=1, pattern=r"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$" ), - "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), "customDomainName": _SERIALIZER.url("custom_domain_name", custom_domain_name, "str"), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), } @@ -154,7 +159,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -162,12 +167,14 @@ def build_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/customDomains/{customDomainName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._\(\)]+$" + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "profileName": _SERIALIZER.url( + "profile_name", profile_name, "str", max_length=260, min_length=1, pattern=r"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$" ), - "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), "customDomainName": _SERIALIZER.url("custom_domain_name", custom_domain_name, "str"), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), } @@ -191,19 +198,21 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/customDomains/{customDomainName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._\(\)]+$" + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "profileName": _SERIALIZER.url( + "profile_name", profile_name, "str", max_length=260, min_length=1, pattern=r"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$" ), - "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), "customDomainName": _SERIALIZER.url("custom_domain_name", custom_domain_name, "str"), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), } @@ -225,19 +234,21 @@ def build_refresh_validation_token_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/customDomains/{customDomainName}/refreshValidationToken", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._\(\)]+$" + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "profileName": _SERIALIZER.url( + "profile_name", profile_name, "str", max_length=260, min_length=1, pattern=r"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$" ), - "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), "customDomainName": _SERIALIZER.url("custom_domain_name", custom_domain_name, "str"), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), } @@ -265,23 +276,24 @@ class AFDCustomDomainsOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CdnManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_profile( self, resource_group_name: str, profile_name: str, **kwargs: Any - ) -> Iterable["_models.AFDDomain"]: + ) -> ItemPaged["_models.AFDDomain"]: """Lists existing AzureFrontDoor domains. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :return: An iterator like instance of either AFDDomain or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cdn.models.AFDDomain] @@ -293,7 +305,7 @@ def list_by_profile( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.AFDDomainListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -312,7 +324,6 @@ def prepare_request(next_link=None): headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) else: @@ -328,7 +339,6 @@ def prepare_request(next_link=None): _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _request.method = "GET" return _request @@ -351,7 +361,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -365,10 +378,11 @@ def get( """Gets an existing AzureFrontDoor domain with the specified domain name under the specified subscription, resource group and profile. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param custom_domain_name: Name of the domain under the profile which is unique globally. Required. @@ -377,7 +391,7 @@ def get( :rtype: ~azure.mgmt.cdn.models.AFDDomain :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -400,7 +414,6 @@ def get( headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False @@ -412,10 +425,13 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("AFDDomain", pipeline_response) + deserialized = self._deserialize("AFDDomain", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -429,8 +445,8 @@ def _create_initial( custom_domain_name: str, custom_domain: Union[_models.AFDDomain, IO[bytes]], **kwargs: Any - ) -> _models.AFDDomain: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -443,7 +459,7 @@ def _create_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.AFDDomain] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -465,10 +481,10 @@ def _create_initial( headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) @@ -476,21 +492,22 @@ def _create_initial( response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("AFDDomain", pipeline_response) - if response.status_code == 201: response_headers["location"] = self._deserialize("str", response.headers.get("location")) - deserialized = self._deserialize("AFDDomain", pipeline_response) - - if response.status_code == 202: - deserialized = self._deserialize("AFDDomain", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore @@ -510,10 +527,11 @@ def begin_create( ) -> LROPoller[_models.AFDDomain]: """Creates a new domain within the specified profile. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param custom_domain_name: Name of the domain under the profile which is unique globally. Required. @@ -541,10 +559,11 @@ def begin_create( ) -> LROPoller[_models.AFDDomain]: """Creates a new domain within the specified profile. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param custom_domain_name: Name of the domain under the profile which is unique globally. Required. @@ -570,10 +589,11 @@ def begin_create( ) -> LROPoller[_models.AFDDomain]: """Creates a new domain within the specified profile. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param custom_domain_name: Name of the domain under the profile which is unique globally. Required. @@ -607,10 +627,11 @@ def begin_create( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("AFDDomain", pipeline_response) + deserialized = self._deserialize("AFDDomain", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized @@ -641,8 +662,8 @@ def _update_initial( custom_domain_name: str, custom_domain_update_properties: Union[_models.AFDDomainUpdateParameters, IO[bytes]], **kwargs: Any - ) -> _models.AFDDomain: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -655,7 +676,7 @@ def _update_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.AFDDomain] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -677,10 +698,10 @@ def _update_initial( headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) @@ -688,18 +709,22 @@ def _update_initial( response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("AFDDomain", pipeline_response) - if response.status_code == 202: response_headers["location"] = self._deserialize("str", response.headers.get("location")) - deserialized = self._deserialize("AFDDomain", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore @@ -719,10 +744,11 @@ def begin_update( ) -> LROPoller[_models.AFDDomain]: """Updates an existing domain within a profile. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param custom_domain_name: Name of the domain under the profile which is unique globally. Required. @@ -750,10 +776,11 @@ def begin_update( ) -> LROPoller[_models.AFDDomain]: """Updates an existing domain within a profile. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param custom_domain_name: Name of the domain under the profile which is unique globally. Required. @@ -779,10 +806,11 @@ def begin_update( ) -> LROPoller[_models.AFDDomain]: """Updates an existing domain within a profile. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param custom_domain_name: Name of the domain under the profile which is unique globally. Required. @@ -817,10 +845,11 @@ def begin_update( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("AFDDomain", pipeline_response) + deserialized = self._deserialize("AFDDomain", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized @@ -844,10 +873,10 @@ def get_long_running_output(pipeline_response): self._client, raw_result, get_long_running_output, polling_method # type: ignore ) - def _delete_initial( # pylint: disable=inconsistent-return-statements + def _delete_initial( self, resource_group_name: str, profile_name: str, custom_domain_name: str, **kwargs: Any - ) -> None: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -859,7 +888,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) _request = build_delete_request( resource_group_name=resource_group_name, @@ -870,10 +899,10 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) @@ -881,16 +910,27 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} if response.status_code == 202: response_headers["location"] = self._deserialize("str", response.headers.get("location")) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + if cls: - return cls(pipeline_response, None, response_headers) # type: ignore + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore @distributed_trace def begin_delete( @@ -899,10 +939,11 @@ def begin_delete( """Deletes an existing AzureFrontDoor domain with the specified domain name under the specified subscription, resource group and profile. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param custom_domain_name: Name of the domain under the profile which is unique globally. Required. @@ -920,7 +961,7 @@ def begin_delete( lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: - raw_result = self._delete_initial( # type: ignore + raw_result = self._delete_initial( resource_group_name=resource_group_name, profile_name=profile_name, custom_domain_name=custom_domain_name, @@ -930,6 +971,7 @@ def begin_delete( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements @@ -953,10 +995,10 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- ) return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - def _refresh_validation_token_initial( # pylint: disable=inconsistent-return-statements + def _refresh_validation_token_initial( self, resource_group_name: str, profile_name: str, custom_domain_name: str, **kwargs: Any - ) -> None: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -968,7 +1010,7 @@ def _refresh_validation_token_initial( # pylint: disable=inconsistent-return-st _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) _request = build_refresh_validation_token_request( resource_group_name=resource_group_name, @@ -979,10 +1021,10 @@ def _refresh_validation_token_initial( # pylint: disable=inconsistent-return-st headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) @@ -990,16 +1032,27 @@ def _refresh_validation_token_initial( # pylint: disable=inconsistent-return-st response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} if response.status_code == 202: response_headers["location"] = self._deserialize("str", response.headers.get("location")) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + if cls: - return cls(pipeline_response, None, response_headers) # type: ignore + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore @distributed_trace def begin_refresh_validation_token( @@ -1007,10 +1060,11 @@ def begin_refresh_validation_token( ) -> LROPoller[None]: """Updates the domain validation token. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param custom_domain_name: Name of the domain under the profile which is unique globally. Required. @@ -1028,7 +1082,7 @@ def begin_refresh_validation_token( lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: - raw_result = self._refresh_validation_token_initial( # type: ignore + raw_result = self._refresh_validation_token_initial( resource_group_name=resource_group_name, profile_name=profile_name, custom_domain_name=custom_domain_name, @@ -1038,6 +1092,7 @@ def begin_refresh_validation_token( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_afd_endpoints_operations.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_afd_endpoints_operations.py index f4f0f3e5c5c8..0fb96b0423c1 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_afd_endpoints_operations.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_afd_endpoints_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,39 +6,38 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Iterable, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, ResourceNotModifiedError, + StreamClosedError, + StreamConsumedError, map_error, ) from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpResponse from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest +from azure.core.rest import HttpRequest, HttpResponse from azure.core.tracing.decorator import distributed_trace from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling from .. import models as _models -from .._serialization import Serializer -from .._vendor import CdnManagementClientMixinABC, _convert_request +from .._configuration import CdnManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -50,19 +49,21 @@ def build_list_by_profile_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._\(\)]+$" + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "profileName": _SERIALIZER.url( + "profile_name", profile_name, "str", max_length=260, min_length=1, pattern=r"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$" ), - "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), } @@ -83,19 +84,21 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints/{endpointName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._\(\)]+$" + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "profileName": _SERIALIZER.url( + "profile_name", profile_name, "str", max_length=260, min_length=1, pattern=r"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$" ), - "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, "str"), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), } @@ -117,7 +120,7 @@ def build_create_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -125,12 +128,14 @@ def build_create_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints/{endpointName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._\(\)]+$" + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "profileName": _SERIALIZER.url( + "profile_name", profile_name, "str", max_length=260, min_length=1, pattern=r"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$" ), - "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, "str"), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), } @@ -154,7 +159,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -162,12 +167,14 @@ def build_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints/{endpointName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._\(\)]+$" + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "profileName": _SERIALIZER.url( + "profile_name", profile_name, "str", max_length=260, min_length=1, pattern=r"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$" ), - "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, "str"), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), } @@ -191,19 +198,21 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints/{endpointName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._\(\)]+$" + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "profileName": _SERIALIZER.url( + "profile_name", profile_name, "str", max_length=260, min_length=1, pattern=r"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$" ), - "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, "str"), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), } @@ -225,7 +234,7 @@ def build_purge_content_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -233,12 +242,14 @@ def build_purge_content_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints/{endpointName}/purge", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._\(\)]+$" + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "profileName": _SERIALIZER.url( + "profile_name", profile_name, "str", max_length=260, min_length=1, pattern=r"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$" ), - "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, "str"), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), } @@ -262,19 +273,21 @@ def build_list_resource_usage_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints/{endpointName}/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\._\(\)]+$" + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "profileName": _SERIALIZER.url( + "profile_name", profile_name, "str", max_length=260, min_length=1, pattern=r"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$" ), - "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, "str"), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), } @@ -296,7 +309,7 @@ def build_validate_custom_domain_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -304,12 +317,14 @@ def build_validate_custom_domain_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints/{endpointName}/validateCustomDomain", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._\(\)]+$" + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "profileName": _SERIALIZER.url( + "profile_name", profile_name, "str", max_length=260, min_length=1, pattern=r"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$" ), - "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, "str"), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), } @@ -339,23 +354,24 @@ class AFDEndpointsOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CdnManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_profile( self, resource_group_name: str, profile_name: str, **kwargs: Any - ) -> Iterable["_models.AFDEndpoint"]: + ) -> ItemPaged["_models.AFDEndpoint"]: """Lists existing AzureFrontDoor endpoints. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :return: An iterator like instance of either AFDEndpoint or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cdn.models.AFDEndpoint] @@ -367,7 +383,7 @@ def list_by_profile( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.AFDEndpointListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -386,7 +402,6 @@ def prepare_request(next_link=None): headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) else: @@ -402,7 +417,6 @@ def prepare_request(next_link=None): _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _request.method = "GET" return _request @@ -425,7 +439,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -439,10 +456,11 @@ def get( """Gets an existing AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, resource group and profile. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param endpoint_name: Name of the endpoint under the profile which is unique globally. Required. @@ -451,7 +469,7 @@ def get( :rtype: ~azure.mgmt.cdn.models.AFDEndpoint :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -474,7 +492,6 @@ def get( headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False @@ -486,10 +503,13 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("AFDEndpoint", pipeline_response) + deserialized = self._deserialize("AFDEndpoint", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -503,8 +523,8 @@ def _create_initial( endpoint_name: str, endpoint: Union[_models.AFDEndpoint, IO[bytes]], **kwargs: Any - ) -> _models.AFDEndpoint: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -517,7 +537,7 @@ def _create_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.AFDEndpoint] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -539,10 +559,10 @@ def _create_initial( headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) @@ -550,21 +570,22 @@ def _create_initial( response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("AFDEndpoint", pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize("AFDEndpoint", pipeline_response) - if response.status_code == 202: response_headers["location"] = self._deserialize("str", response.headers.get("location")) - deserialized = self._deserialize("AFDEndpoint", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore @@ -585,10 +606,11 @@ def begin_create( """Creates a new AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, resource group and profile. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param endpoint_name: Name of the endpoint under the profile which is unique globally. Required. @@ -618,10 +640,11 @@ def begin_create( """Creates a new AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, resource group and profile. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param endpoint_name: Name of the endpoint under the profile which is unique globally. Required. @@ -649,10 +672,11 @@ def begin_create( """Creates a new AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, resource group and profile. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param endpoint_name: Name of the endpoint under the profile which is unique globally. Required. @@ -687,10 +711,11 @@ def begin_create( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("AFDEndpoint", pipeline_response) + deserialized = self._deserialize("AFDEndpoint", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized @@ -721,8 +746,8 @@ def _update_initial( endpoint_name: str, endpoint_update_properties: Union[_models.AFDEndpointUpdateParameters, IO[bytes]], **kwargs: Any - ) -> _models.AFDEndpoint: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -735,7 +760,7 @@ def _update_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.AFDEndpoint] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -757,10 +782,10 @@ def _update_initial( headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) @@ -768,18 +793,22 @@ def _update_initial( response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("AFDEndpoint", pipeline_response) - if response.status_code == 202: response_headers["location"] = self._deserialize("str", response.headers.get("location")) - deserialized = self._deserialize("AFDEndpoint", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore @@ -802,10 +831,11 @@ def begin_update( endpoint. To update origins, use the Update Origin operation. To update origin groups, use the Update Origin group operation. To update domains, use the Update Custom Domain operation. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param endpoint_name: Name of the endpoint under the profile which is unique globally. Required. @@ -837,10 +867,11 @@ def begin_update( endpoint. To update origins, use the Update Origin operation. To update origin groups, use the Update Origin group operation. To update domains, use the Update Custom Domain operation. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param endpoint_name: Name of the endpoint under the profile which is unique globally. Required. @@ -870,10 +901,11 @@ def begin_update( endpoint. To update origins, use the Update Origin operation. To update origin groups, use the Update Origin group operation. To update domains, use the Update Custom Domain operation. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param endpoint_name: Name of the endpoint under the profile which is unique globally. Required. @@ -909,10 +941,11 @@ def begin_update( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("AFDEndpoint", pipeline_response) + deserialized = self._deserialize("AFDEndpoint", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized @@ -936,10 +969,10 @@ def get_long_running_output(pipeline_response): self._client, raw_result, get_long_running_output, polling_method # type: ignore ) - def _delete_initial( # pylint: disable=inconsistent-return-statements + def _delete_initial( self, resource_group_name: str, profile_name: str, endpoint_name: str, **kwargs: Any - ) -> None: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -951,7 +984,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) _request = build_delete_request( resource_group_name=resource_group_name, @@ -962,10 +995,10 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) @@ -973,16 +1006,27 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} if response.status_code == 202: response_headers["location"] = self._deserialize("str", response.headers.get("location")) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + if cls: - return cls(pipeline_response, None, response_headers) # type: ignore + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore @distributed_trace def begin_delete( @@ -991,10 +1035,11 @@ def begin_delete( """Deletes an existing AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, resource group and profile. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param endpoint_name: Name of the endpoint under the profile which is unique globally. Required. @@ -1012,7 +1057,7 @@ def begin_delete( lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: - raw_result = self._delete_initial( # type: ignore + raw_result = self._delete_initial( resource_group_name=resource_group_name, profile_name=profile_name, endpoint_name=endpoint_name, @@ -1022,6 +1067,7 @@ def begin_delete( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements @@ -1045,15 +1091,15 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- ) return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - def _purge_content_initial( # pylint: disable=inconsistent-return-statements + def _purge_content_initial( self, resource_group_name: str, profile_name: str, endpoint_name: str, contents: Union[_models.AfdPurgeParameters, IO[bytes]], **kwargs: Any - ) -> None: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1066,7 +1112,7 @@ def _purge_content_initial( # pylint: disable=inconsistent-return-statements api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[None] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -1088,10 +1134,10 @@ def _purge_content_initial( # pylint: disable=inconsistent-return-statements headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) @@ -1099,16 +1145,27 @@ def _purge_content_initial( # pylint: disable=inconsistent-return-statements response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} if response.status_code == 202: response_headers["location"] = self._deserialize("str", response.headers.get("location")) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + if cls: - return cls(pipeline_response, None, response_headers) # type: ignore + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore @overload def begin_purge_content( @@ -1123,10 +1180,11 @@ def begin_purge_content( ) -> LROPoller[None]: """Removes a content from AzureFrontDoor. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param endpoint_name: Name of the endpoint under the profile which is unique globally. Required. @@ -1157,10 +1215,11 @@ def begin_purge_content( ) -> LROPoller[None]: """Removes a content from AzureFrontDoor. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param endpoint_name: Name of the endpoint under the profile which is unique globally. Required. @@ -1189,10 +1248,11 @@ def begin_purge_content( ) -> LROPoller[None]: """Removes a content from AzureFrontDoor. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param endpoint_name: Name of the endpoint under the profile which is unique globally. Required. @@ -1216,7 +1276,7 @@ def begin_purge_content( lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: - raw_result = self._purge_content_initial( # type: ignore + raw_result = self._purge_content_initial( resource_group_name=resource_group_name, profile_name=profile_name, endpoint_name=endpoint_name, @@ -1228,6 +1288,7 @@ def begin_purge_content( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements @@ -1254,13 +1315,14 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- @distributed_trace def list_resource_usage( self, resource_group_name: str, profile_name: str, endpoint_name: str, **kwargs: Any - ) -> Iterable["_models.Usage"]: + ) -> ItemPaged["_models.Usage"]: """Checks the quota and actual usage of endpoints under the given Azure Front Door profile. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param endpoint_name: Name of the endpoint under the profile which is unique globally. Required. @@ -1275,7 +1337,7 @@ def list_resource_usage( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.UsagesListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1295,7 +1357,6 @@ def prepare_request(next_link=None): headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) else: @@ -1311,7 +1372,6 @@ def prepare_request(next_link=None): _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _request.method = "GET" return _request @@ -1334,7 +1394,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -1355,10 +1418,11 @@ def validate_custom_domain( """Validates the custom domain mapping to ensure it maps to the correct Azure Front Door endpoint in DNS. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param endpoint_name: Name of the endpoint under the profile which is unique globally. Required. @@ -1387,10 +1451,11 @@ def validate_custom_domain( """Validates the custom domain mapping to ensure it maps to the correct Azure Front Door endpoint in DNS. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param endpoint_name: Name of the endpoint under the profile which is unique globally. Required. @@ -1417,10 +1482,11 @@ def validate_custom_domain( """Validates the custom domain mapping to ensure it maps to the correct Azure Front Door endpoint in DNS. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param endpoint_name: Name of the endpoint under the profile which is unique globally. Required. @@ -1432,7 +1498,7 @@ def validate_custom_domain( :rtype: ~azure.mgmt.cdn.models.ValidateCustomDomainOutput :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1467,7 +1533,6 @@ def validate_custom_domain( headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False @@ -1479,10 +1544,13 @@ def validate_custom_domain( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("ValidateCustomDomainOutput", pipeline_response) + deserialized = self._deserialize("ValidateCustomDomainOutput", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_afd_origin_groups_operations.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_afd_origin_groups_operations.py index 4280339143c6..562db291bf98 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_afd_origin_groups_operations.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_afd_origin_groups_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,39 +6,38 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Iterable, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, ResourceNotModifiedError, + StreamClosedError, + StreamConsumedError, map_error, ) from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpResponse from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest +from azure.core.rest import HttpRequest, HttpResponse from azure.core.tracing.decorator import distributed_trace from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling from .. import models as _models -from .._serialization import Serializer -from .._vendor import CdnManagementClientMixinABC, _convert_request +from .._configuration import CdnManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -50,19 +49,21 @@ def build_list_by_profile_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/originGroups", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._\(\)]+$" + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "profileName": _SERIALIZER.url( + "profile_name", profile_name, "str", max_length=260, min_length=1, pattern=r"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$" ), - "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), } @@ -83,19 +84,21 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/originGroups/{originGroupName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._\(\)]+$" + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "profileName": _SERIALIZER.url( + "profile_name", profile_name, "str", max_length=260, min_length=1, pattern=r"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$" ), - "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), "originGroupName": _SERIALIZER.url("origin_group_name", origin_group_name, "str"), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), } @@ -117,7 +120,7 @@ def build_create_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -125,12 +128,14 @@ def build_create_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/originGroups/{originGroupName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._\(\)]+$" + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "profileName": _SERIALIZER.url( + "profile_name", profile_name, "str", max_length=260, min_length=1, pattern=r"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$" ), - "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), "originGroupName": _SERIALIZER.url("origin_group_name", origin_group_name, "str"), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), } @@ -154,7 +159,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -162,12 +167,14 @@ def build_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/originGroups/{originGroupName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._\(\)]+$" + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "profileName": _SERIALIZER.url( + "profile_name", profile_name, "str", max_length=260, min_length=1, pattern=r"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$" ), - "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), "originGroupName": _SERIALIZER.url("origin_group_name", origin_group_name, "str"), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), } @@ -191,19 +198,21 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/originGroups/{originGroupName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._\(\)]+$" + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "profileName": _SERIALIZER.url( + "profile_name", profile_name, "str", max_length=260, min_length=1, pattern=r"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$" ), - "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), "originGroupName": _SERIALIZER.url("origin_group_name", origin_group_name, "str"), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), } @@ -225,19 +234,21 @@ def build_list_resource_usage_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/originGroups/{originGroupName}/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\._\(\)]+$" + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "profileName": _SERIALIZER.url( + "profile_name", profile_name, "str", max_length=260, min_length=1, pattern=r"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$" ), - "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), "originGroupName": _SERIALIZER.url("origin_group_name", origin_group_name, "str"), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), } @@ -265,23 +276,24 @@ class AFDOriginGroupsOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CdnManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_profile( self, resource_group_name: str, profile_name: str, **kwargs: Any - ) -> Iterable["_models.AFDOriginGroup"]: + ) -> ItemPaged["_models.AFDOriginGroup"]: """Lists all of the existing origin groups within a profile. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :return: An iterator like instance of either AFDOriginGroup or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cdn.models.AFDOriginGroup] @@ -293,7 +305,7 @@ def list_by_profile( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.AFDOriginGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -312,7 +324,6 @@ def prepare_request(next_link=None): headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) else: @@ -328,7 +339,6 @@ def prepare_request(next_link=None): _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _request.method = "GET" return _request @@ -351,7 +361,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -364,10 +377,11 @@ def get( ) -> _models.AFDOriginGroup: """Gets an existing origin group within a profile. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param origin_group_name: Name of the origin group which is unique within the endpoint. Required. @@ -376,7 +390,7 @@ def get( :rtype: ~azure.mgmt.cdn.models.AFDOriginGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -399,7 +413,6 @@ def get( headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False @@ -411,10 +424,13 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("AFDOriginGroup", pipeline_response) + deserialized = self._deserialize("AFDOriginGroup", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -428,8 +444,8 @@ def _create_initial( origin_group_name: str, origin_group: Union[_models.AFDOriginGroup, IO[bytes]], **kwargs: Any - ) -> _models.AFDOriginGroup: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -442,7 +458,7 @@ def _create_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.AFDOriginGroup] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -464,10 +480,10 @@ def _create_initial( headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) @@ -475,21 +491,22 @@ def _create_initial( response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("AFDOriginGroup", pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize("AFDOriginGroup", pipeline_response) - if response.status_code == 202: response_headers["location"] = self._deserialize("str", response.headers.get("location")) - deserialized = self._deserialize("AFDOriginGroup", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore @@ -509,10 +526,11 @@ def begin_create( ) -> LROPoller[_models.AFDOriginGroup]: """Creates a new origin group within the specified profile. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param origin_group_name: Name of the origin group which is unique within the endpoint. Required. @@ -541,10 +559,11 @@ def begin_create( ) -> LROPoller[_models.AFDOriginGroup]: """Creates a new origin group within the specified profile. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param origin_group_name: Name of the origin group which is unique within the endpoint. Required. @@ -571,10 +590,11 @@ def begin_create( ) -> LROPoller[_models.AFDOriginGroup]: """Creates a new origin group within the specified profile. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param origin_group_name: Name of the origin group which is unique within the endpoint. Required. @@ -609,10 +629,11 @@ def begin_create( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("AFDOriginGroup", pipeline_response) + deserialized = self._deserialize("AFDOriginGroup", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized @@ -643,8 +664,8 @@ def _update_initial( origin_group_name: str, origin_group_update_properties: Union[_models.AFDOriginGroupUpdateParameters, IO[bytes]], **kwargs: Any - ) -> _models.AFDOriginGroup: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -657,7 +678,7 @@ def _update_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.AFDOriginGroup] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -679,10 +700,10 @@ def _update_initial( headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) @@ -690,18 +711,22 @@ def _update_initial( response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("AFDOriginGroup", pipeline_response) - if response.status_code == 202: response_headers["location"] = self._deserialize("str", response.headers.get("location")) - deserialized = self._deserialize("AFDOriginGroup", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore @@ -721,10 +746,11 @@ def begin_update( ) -> LROPoller[_models.AFDOriginGroup]: """Updates an existing origin group within a profile. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param origin_group_name: Name of the origin group which is unique within the profile. Required. @@ -753,10 +779,11 @@ def begin_update( ) -> LROPoller[_models.AFDOriginGroup]: """Updates an existing origin group within a profile. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param origin_group_name: Name of the origin group which is unique within the profile. Required. @@ -783,10 +810,11 @@ def begin_update( ) -> LROPoller[_models.AFDOriginGroup]: """Updates an existing origin group within a profile. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param origin_group_name: Name of the origin group which is unique within the profile. Required. @@ -822,10 +850,11 @@ def begin_update( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("AFDOriginGroup", pipeline_response) + deserialized = self._deserialize("AFDOriginGroup", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized @@ -849,10 +878,10 @@ def get_long_running_output(pipeline_response): self._client, raw_result, get_long_running_output, polling_method # type: ignore ) - def _delete_initial( # pylint: disable=inconsistent-return-statements + def _delete_initial( self, resource_group_name: str, profile_name: str, origin_group_name: str, **kwargs: Any - ) -> None: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -864,7 +893,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) _request = build_delete_request( resource_group_name=resource_group_name, @@ -875,10 +904,10 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) @@ -886,16 +915,27 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} if response.status_code == 202: response_headers["location"] = self._deserialize("str", response.headers.get("location")) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + if cls: - return cls(pipeline_response, None, response_headers) # type: ignore + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore @distributed_trace def begin_delete( @@ -903,10 +943,11 @@ def begin_delete( ) -> LROPoller[None]: """Deletes an existing origin group within a profile. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param origin_group_name: Name of the origin group which is unique within the profile. Required. @@ -924,7 +965,7 @@ def begin_delete( lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: - raw_result = self._delete_initial( # type: ignore + raw_result = self._delete_initial( resource_group_name=resource_group_name, profile_name=profile_name, origin_group_name=origin_group_name, @@ -934,6 +975,7 @@ def begin_delete( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements @@ -960,13 +1002,14 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- @distributed_trace def list_resource_usage( self, resource_group_name: str, profile_name: str, origin_group_name: str, **kwargs: Any - ) -> Iterable["_models.Usage"]: + ) -> ItemPaged["_models.Usage"]: """Checks the quota and actual usage of endpoints under the given Azure Front Door profile.. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param origin_group_name: Name of the origin group which is unique within the endpoint. Required. @@ -981,7 +1024,7 @@ def list_resource_usage( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.UsagesListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1001,7 +1044,6 @@ def prepare_request(next_link=None): headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) else: @@ -1017,7 +1059,6 @@ def prepare_request(next_link=None): _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _request.method = "GET" return _request @@ -1040,7 +1081,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_afd_origins_operations.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_afd_origins_operations.py index 72245c2a7c7f..686ec0ad31b2 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_afd_origins_operations.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_afd_origins_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,39 +6,38 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Iterable, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, ResourceNotModifiedError, + StreamClosedError, + StreamConsumedError, map_error, ) from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpResponse from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest +from azure.core.rest import HttpRequest, HttpResponse from azure.core.tracing.decorator import distributed_trace from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling from .. import models as _models -from .._serialization import Serializer -from .._vendor import CdnManagementClientMixinABC, _convert_request +from .._configuration import CdnManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -50,19 +49,21 @@ def build_list_by_origin_group_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/originGroups/{originGroupName}/origins", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._\(\)]+$" + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "profileName": _SERIALIZER.url( + "profile_name", profile_name, "str", max_length=260, min_length=1, pattern=r"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$" ), - "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), "originGroupName": _SERIALIZER.url("origin_group_name", origin_group_name, "str"), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), } @@ -89,19 +90,21 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/originGroups/{originGroupName}/origins/{originName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._\(\)]+$" + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "profileName": _SERIALIZER.url( + "profile_name", profile_name, "str", max_length=260, min_length=1, pattern=r"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$" ), - "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), "originGroupName": _SERIALIZER.url("origin_group_name", origin_group_name, "str"), "originName": _SERIALIZER.url("origin_name", origin_name, "str"), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), @@ -129,7 +132,7 @@ def build_create_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -137,12 +140,14 @@ def build_create_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/originGroups/{originGroupName}/origins/{originName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._\(\)]+$" + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "profileName": _SERIALIZER.url( + "profile_name", profile_name, "str", max_length=260, min_length=1, pattern=r"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$" ), - "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), "originGroupName": _SERIALIZER.url("origin_group_name", origin_group_name, "str"), "originName": _SERIALIZER.url("origin_name", origin_name, "str"), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), @@ -172,7 +177,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -180,12 +185,14 @@ def build_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/originGroups/{originGroupName}/origins/{originName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._\(\)]+$" + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "profileName": _SERIALIZER.url( + "profile_name", profile_name, "str", max_length=260, min_length=1, pattern=r"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$" ), - "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), "originGroupName": _SERIALIZER.url("origin_group_name", origin_group_name, "str"), "originName": _SERIALIZER.url("origin_name", origin_name, "str"), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), @@ -215,19 +222,21 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/originGroups/{originGroupName}/origins/{originName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._\(\)]+$" + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "profileName": _SERIALIZER.url( + "profile_name", profile_name, "str", max_length=260, min_length=1, pattern=r"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$" ), - "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), "originGroupName": _SERIALIZER.url("origin_group_name", origin_group_name, "str"), "originName": _SERIALIZER.url("origin_name", origin_name, "str"), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), @@ -256,23 +265,24 @@ class AFDOriginsOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CdnManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_origin_group( self, resource_group_name: str, profile_name: str, origin_group_name: str, **kwargs: Any - ) -> Iterable["_models.AFDOrigin"]: + ) -> ItemPaged["_models.AFDOrigin"]: """Lists all of the existing origins within an origin group. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param origin_group_name: Name of the origin group which is unique within the profile. Required. @@ -287,7 +297,7 @@ def list_by_origin_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.AFDOriginListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -307,7 +317,6 @@ def prepare_request(next_link=None): headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) else: @@ -323,7 +332,6 @@ def prepare_request(next_link=None): _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _request.method = "GET" return _request @@ -346,7 +354,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -359,10 +370,11 @@ def get( ) -> _models.AFDOrigin: """Gets an existing origin within an origin group. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param origin_group_name: Name of the origin group which is unique within the profile. Required. @@ -373,7 +385,7 @@ def get( :rtype: ~azure.mgmt.cdn.models.AFDOrigin :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -397,7 +409,6 @@ def get( headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False @@ -409,10 +420,13 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("AFDOrigin", pipeline_response) + deserialized = self._deserialize("AFDOrigin", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -427,8 +441,8 @@ def _create_initial( origin_name: str, origin: Union[_models.AFDOrigin, IO[bytes]], **kwargs: Any - ) -> _models.AFDOrigin: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -441,7 +455,7 @@ def _create_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.AFDOrigin] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -464,10 +478,10 @@ def _create_initial( headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) @@ -475,21 +489,22 @@ def _create_initial( response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("AFDOrigin", pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize("AFDOrigin", pipeline_response) - if response.status_code == 202: response_headers["location"] = self._deserialize("str", response.headers.get("location")) - deserialized = self._deserialize("AFDOrigin", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore @@ -510,10 +525,11 @@ def begin_create( ) -> LROPoller[_models.AFDOrigin]: """Creates a new origin within the specified origin group. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param origin_group_name: Name of the origin group which is unique within the profile. Required. @@ -544,10 +560,11 @@ def begin_create( ) -> LROPoller[_models.AFDOrigin]: """Creates a new origin within the specified origin group. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param origin_group_name: Name of the origin group which is unique within the profile. Required. @@ -576,10 +593,11 @@ def begin_create( ) -> LROPoller[_models.AFDOrigin]: """Creates a new origin within the specified origin group. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param origin_group_name: Name of the origin group which is unique within the profile. Required. @@ -615,10 +633,11 @@ def begin_create( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("AFDOrigin", pipeline_response) + deserialized = self._deserialize("AFDOrigin", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized @@ -650,8 +669,8 @@ def _update_initial( origin_name: str, origin_update_properties: Union[_models.AFDOriginUpdateParameters, IO[bytes]], **kwargs: Any - ) -> _models.AFDOrigin: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -664,7 +683,7 @@ def _update_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.AFDOrigin] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -687,10 +706,10 @@ def _update_initial( headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) @@ -698,18 +717,22 @@ def _update_initial( response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("AFDOrigin", pipeline_response) - if response.status_code == 202: response_headers["location"] = self._deserialize("str", response.headers.get("location")) - deserialized = self._deserialize("AFDOrigin", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore @@ -730,10 +753,11 @@ def begin_update( ) -> LROPoller[_models.AFDOrigin]: """Updates an existing origin within an origin group. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param origin_group_name: Name of the origin group which is unique within the profile. Required. @@ -764,10 +788,11 @@ def begin_update( ) -> LROPoller[_models.AFDOrigin]: """Updates an existing origin within an origin group. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param origin_group_name: Name of the origin group which is unique within the profile. Required. @@ -796,10 +821,11 @@ def begin_update( ) -> LROPoller[_models.AFDOrigin]: """Updates an existing origin within an origin group. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param origin_group_name: Name of the origin group which is unique within the profile. Required. @@ -836,10 +862,11 @@ def begin_update( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("AFDOrigin", pipeline_response) + deserialized = self._deserialize("AFDOrigin", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized @@ -863,10 +890,10 @@ def get_long_running_output(pipeline_response): self._client, raw_result, get_long_running_output, polling_method # type: ignore ) - def _delete_initial( # pylint: disable=inconsistent-return-statements + def _delete_initial( self, resource_group_name: str, profile_name: str, origin_group_name: str, origin_name: str, **kwargs: Any - ) -> None: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -878,7 +905,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) _request = build_delete_request( resource_group_name=resource_group_name, @@ -890,10 +917,10 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) @@ -901,16 +928,27 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} if response.status_code == 202: response_headers["location"] = self._deserialize("str", response.headers.get("location")) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + if cls: - return cls(pipeline_response, None, response_headers) # type: ignore + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore @distributed_trace def begin_delete( @@ -918,10 +956,11 @@ def begin_delete( ) -> LROPoller[None]: """Deletes an existing origin within an origin group. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param origin_group_name: Name of the origin group which is unique within the profile. Required. @@ -941,7 +980,7 @@ def begin_delete( lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: - raw_result = self._delete_initial( # type: ignore + raw_result = self._delete_initial( resource_group_name=resource_group_name, profile_name=profile_name, origin_group_name=origin_group_name, @@ -952,6 +991,7 @@ def begin_delete( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_afd_profiles_operations.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_afd_profiles_operations.py index fee3bbbd97ad..cb7b1f6a61cd 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_afd_profiles_operations.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_afd_profiles_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,39 +6,38 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Iterable, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, ResourceNotModifiedError, + StreamClosedError, + StreamConsumedError, map_error, ) from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpResponse from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest +from azure.core.rest import HttpRequest, HttpResponse from azure.core.tracing.decorator import distributed_trace from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling from .. import models as _models -from .._serialization import Serializer -from .._vendor import CdnManagementClientMixinABC, _convert_request +from .._configuration import CdnManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -50,7 +49,7 @@ def build_check_endpoint_name_availability_request( # pylint: disable=name-too- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -58,11 +57,11 @@ def build_check_endpoint_name_availability_request( # pylint: disable=name-too- _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/checkEndpointNameAvailability", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._\(\)]+$" + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 ), "profileName": _SERIALIZER.url( "profile_name", profile_name, "str", max_length=260, min_length=1, pattern=r"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$" @@ -88,19 +87,21 @@ def build_list_resource_usage_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/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\._\(\)]+$" + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "profileName": _SERIALIZER.url( + "profile_name", profile_name, "str", max_length=260, min_length=1, pattern=r"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$" ), - "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), } @@ -121,7 +122,7 @@ def build_check_host_name_availability_request( # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -129,12 +130,14 @@ def build_check_host_name_availability_request( # pylint: disable=name-too-long _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/checkHostNameAvailability", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._\(\)]+$" + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "profileName": _SERIALIZER.url( + "profile_name", profile_name, "str", max_length=260, min_length=1, pattern=r"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$" ), - "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), } @@ -157,7 +160,7 @@ def build_validate_secret_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -165,10 +168,10 @@ def build_validate_secret_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/validateSecret", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._\(\)]+$" + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 ), "profileName": _SERIALIZER.url( "profile_name", profile_name, "str", max_length=260, min_length=1, pattern=r"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$" @@ -195,7 +198,7 @@ def build_upgrade_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -203,10 +206,10 @@ def build_upgrade_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/upgrade", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._\(\)]+$" + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 ), "profileName": _SERIALIZER.url( "profile_name", profile_name, "str", max_length=260, min_length=1, pattern=r"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$" @@ -239,12 +242,12 @@ class AFDProfilesOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CdnManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @overload def check_endpoint_name_availability( @@ -259,7 +262,8 @@ def check_endpoint_name_availability( """Check the availability of an afdx endpoint name, and return the globally unique endpoint host name. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. Required. @@ -288,7 +292,8 @@ def check_endpoint_name_availability( """Check the availability of an afdx endpoint name, and return the globally unique endpoint host name. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. Required. @@ -314,7 +319,8 @@ def check_endpoint_name_availability( """Check the availability of an afdx endpoint name, and return the globally unique endpoint host name. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. Required. @@ -327,7 +333,7 @@ def check_endpoint_name_availability( :rtype: ~azure.mgmt.cdn.models.CheckEndpointNameAvailabilityOutput :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -361,7 +367,6 @@ def check_endpoint_name_availability( headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False @@ -373,10 +378,13 @@ def check_endpoint_name_availability( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("CheckEndpointNameAvailabilityOutput", pipeline_response) + deserialized = self._deserialize("CheckEndpointNameAvailabilityOutput", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -386,13 +394,14 @@ def check_endpoint_name_availability( @distributed_trace def list_resource_usage( self, resource_group_name: str, profile_name: str, **kwargs: Any - ) -> Iterable["_models.Usage"]: + ) -> ItemPaged["_models.Usage"]: """Checks the quota and actual usage of endpoints under the given Azure Front Door profile. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :return: An iterator like instance of either Usage or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cdn.models.Usage] @@ -404,7 +413,7 @@ def list_resource_usage( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.UsagesListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -423,7 +432,6 @@ def prepare_request(next_link=None): headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) else: @@ -439,7 +447,6 @@ def prepare_request(next_link=None): _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _request.method = "GET" return _request @@ -462,7 +469,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -482,10 +492,11 @@ def check_host_name_availability( """Validates the custom domain mapping to ensure it maps to the correct Azure Front Door endpoint in DNS. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param check_host_name_availability_input: Custom domain to be validated. Required. :type check_host_name_availability_input: ~azure.mgmt.cdn.models.CheckHostNameAvailabilityInput @@ -510,10 +521,11 @@ def check_host_name_availability( """Validates the custom domain mapping to ensure it maps to the correct Azure Front Door endpoint in DNS. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param check_host_name_availability_input: Custom domain to be validated. Required. :type check_host_name_availability_input: IO[bytes] @@ -536,10 +548,11 @@ def check_host_name_availability( """Validates the custom domain mapping to ensure it maps to the correct Azure Front Door endpoint in DNS. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param check_host_name_availability_input: Custom domain to be validated. Is either a CheckHostNameAvailabilityInput type or a IO[bytes] type. Required. @@ -549,7 +562,7 @@ def check_host_name_availability( :rtype: ~azure.mgmt.cdn.models.CheckNameAvailabilityOutput :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -583,7 +596,6 @@ def check_host_name_availability( headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False @@ -595,10 +607,13 @@ def check_host_name_availability( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("CheckNameAvailabilityOutput", pipeline_response) + deserialized = self._deserialize("CheckNameAvailabilityOutput", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -617,7 +632,8 @@ def validate_secret( ) -> _models.ValidateSecretOutput: """Validate a Secret in the profile. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. Required. @@ -644,7 +660,8 @@ def validate_secret( ) -> _models.ValidateSecretOutput: """Validate a Secret in the profile. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. Required. @@ -669,7 +686,8 @@ def validate_secret( ) -> _models.ValidateSecretOutput: """Validate a Secret in the profile. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. Required. @@ -681,7 +699,7 @@ def validate_secret( :rtype: ~azure.mgmt.cdn.models.ValidateSecretOutput :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -715,7 +733,6 @@ def validate_secret( headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False @@ -727,10 +744,13 @@ def validate_secret( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("ValidateSecretOutput", pipeline_response) + deserialized = self._deserialize("ValidateSecretOutput", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -743,8 +763,8 @@ def _upgrade_initial( profile_name: str, profile_upgrade_parameters: Union[_models.ProfileUpgradeParameters, IO[bytes]], **kwargs: Any - ) -> _models.Profile: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -757,7 +777,7 @@ def _upgrade_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.Profile] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -778,10 +798,10 @@ def _upgrade_initial( headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) @@ -789,18 +809,22 @@ def _upgrade_initial( response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("Profile", pipeline_response) - if response.status_code == 202: response_headers["location"] = self._deserialize("str", response.headers.get("location")) - deserialized = self._deserialize("Profile", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore @@ -819,7 +843,8 @@ def begin_upgrade( ) -> LROPoller[_models.Profile]: """Upgrade a profile from Standard_AzureFrontDoor to Premium_AzureFrontDoor. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. Required. @@ -846,7 +871,8 @@ def begin_upgrade( ) -> LROPoller[_models.Profile]: """Upgrade a profile from Standard_AzureFrontDoor to Premium_AzureFrontDoor. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. Required. @@ -871,7 +897,8 @@ def begin_upgrade( ) -> LROPoller[_models.Profile]: """Upgrade a profile from Standard_AzureFrontDoor to Premium_AzureFrontDoor. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. Required. @@ -904,10 +931,11 @@ def begin_upgrade( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("Profile", pipeline_response) + deserialized = self._deserialize("Profile", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_cdn_management_client_operations.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_cdn_management_client_operations.py index 0040b37a9a66..ee180c116620 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_cdn_management_client_operations.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_cdn_management_client_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,10 +6,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -19,22 +20,19 @@ map_error, ) from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpResponse -from azure.core.rest import HttpRequest +from azure.core.rest import HttpRequest, HttpResponse from azure.core.tracing.decorator import distributed_trace from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer -from .._vendor import CdnManagementClientMixinABC, _convert_request +from .._configuration import CdnManagementClientConfiguration +from .._utils.serialization import Serializer +from .._utils.utils import ClientMixinABC -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -46,7 +44,7 @@ def build_check_endpoint_name_availability_request( # pylint: disable=name-too- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -54,11 +52,11 @@ def build_check_endpoint_name_availability_request( # pylint: disable=name-too- _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/checkEndpointNameAvailability", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._\(\)]+$" + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 ), } @@ -79,7 +77,7 @@ def build_check_name_availability_request(**kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -103,7 +101,7 @@ def build_check_name_availability_with_subscription_request( # pylint: disable= _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -130,7 +128,7 @@ def build_validate_probe_request(subscription_id: str, **kwargs: Any) -> HttpReq _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -153,7 +151,9 @@ def build_validate_probe_request(subscription_id: str, **kwargs: Any) -> HttpReq return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -class CdnManagementClientOperationsMixin(CdnManagementClientMixinABC): +class _CdnManagementClientOperationsMixin( + ClientMixinABC[PipelineClient[HttpRequest, HttpResponse], CdnManagementClientConfiguration] +): @overload def check_endpoint_name_availability( @@ -167,7 +167,8 @@ def check_endpoint_name_availability( """Check the availability of a resource name. This is needed for resources where name is globally unique, such as a afdx endpoint. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param check_endpoint_name_availability_input: Input to check. Required. :type check_endpoint_name_availability_input: @@ -192,7 +193,8 @@ def check_endpoint_name_availability( """Check the availability of a resource name. This is needed for resources where name is globally unique, such as a afdx endpoint. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param check_endpoint_name_availability_input: Input to check. Required. :type check_endpoint_name_availability_input: IO[bytes] @@ -214,7 +216,8 @@ def check_endpoint_name_availability( """Check the availability of a resource name. This is needed for resources where name is globally unique, such as a afdx endpoint. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param check_endpoint_name_availability_input: Input to check. Is either a CheckEndpointNameAvailabilityInput type or a IO[bytes] type. Required. @@ -224,7 +227,7 @@ def check_endpoint_name_availability( :rtype: ~azure.mgmt.cdn.models.CheckEndpointNameAvailabilityOutput :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -257,7 +260,6 @@ def check_endpoint_name_availability( headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False @@ -269,10 +271,13 @@ def check_endpoint_name_availability( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("CheckEndpointNameAvailabilityOutput", pipeline_response) + deserialized = self._deserialize("CheckEndpointNameAvailabilityOutput", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -332,7 +337,7 @@ def check_name_availability( :rtype: ~azure.mgmt.cdn.models.CheckNameAvailabilityOutput :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -363,7 +368,6 @@ def check_name_availability( headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False @@ -375,10 +379,13 @@ def check_name_availability( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("CheckNameAvailabilityOutput", pipeline_response) + deserialized = self._deserialize("CheckNameAvailabilityOutput", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -438,7 +445,7 @@ def check_name_availability_with_subscription( # pylint: disable=name-too-long :rtype: ~azure.mgmt.cdn.models.CheckNameAvailabilityOutput :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -470,7 +477,6 @@ def check_name_availability_with_subscription( # pylint: disable=name-too-long headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False @@ -482,10 +488,13 @@ def check_name_availability_with_subscription( # pylint: disable=name-too-long if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("CheckNameAvailabilityOutput", pipeline_response) + deserialized = self._deserialize("CheckNameAvailabilityOutput", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -543,7 +552,7 @@ def validate_probe( :rtype: ~azure.mgmt.cdn.models.ValidateProbeOutput :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -575,7 +584,6 @@ def validate_probe( headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False @@ -587,10 +595,13 @@ def validate_probe( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("ValidateProbeOutput", pipeline_response) + deserialized = self._deserialize("ValidateProbeOutput", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_custom_domains_operations.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_custom_domains_operations.py index 54de16bb9e4c..0165643c3c68 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_custom_domains_operations.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_custom_domains_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,39 +6,38 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Iterable, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, ResourceNotModifiedError, + StreamClosedError, + StreamConsumedError, map_error, ) from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpResponse from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest +from azure.core.rest import HttpRequest, HttpResponse from azure.core.tracing.decorator import distributed_trace from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling from .. import models as _models -from .._serialization import Serializer -from .._vendor import CdnManagementClientMixinABC, _convert_request +from .._configuration import CdnManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -50,17 +49,17 @@ def build_list_by_endpoint_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/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\._\(\)]+$" + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 ), "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, "str"), @@ -89,17 +88,17 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/customDomains/{customDomainName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._\(\)]+$" + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 ), "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, "str"), @@ -129,7 +128,7 @@ def build_create_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -137,10 +136,10 @@ def build_create_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/customDomains/{customDomainName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._\(\)]+$" + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 ), "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, "str"), @@ -172,17 +171,17 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/customDomains/{customDomainName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._\(\)]+$" + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 ), "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, "str"), @@ -212,17 +211,17 @@ def build_disable_custom_https_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/customDomains/{customDomainName}/disableCustomHttps", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._\(\)]+$" + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 ), "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, "str"), @@ -252,7 +251,7 @@ def build_enable_custom_https_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -260,10 +259,10 @@ def build_enable_custom_https_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/customDomains/{customDomainName}/enableCustomHttps", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._\(\)]+$" + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 ), "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, "str"), @@ -296,20 +295,21 @@ class CustomDomainsOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CdnManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_endpoint( self, resource_group_name: str, profile_name: str, endpoint_name: str, **kwargs: Any - ) -> Iterable["_models.CustomDomain"]: + ) -> ItemPaged["_models.CustomDomain"]: """Lists all of the existing custom domains within an endpoint. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the CDN profile which is unique within the resource group. Required. @@ -327,7 +327,7 @@ def list_by_endpoint( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.CustomDomainListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -347,7 +347,6 @@ def prepare_request(next_link=None): headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) else: @@ -363,7 +362,6 @@ def prepare_request(next_link=None): _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _request.method = "GET" return _request @@ -386,7 +384,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -399,7 +400,8 @@ def get( ) -> _models.CustomDomain: """Gets an existing custom domain within an endpoint. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the CDN profile which is unique within the resource group. Required. @@ -413,7 +415,7 @@ def get( :rtype: ~azure.mgmt.cdn.models.CustomDomain :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -437,7 +439,6 @@ def get( headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False @@ -449,10 +450,13 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("CustomDomain", pipeline_response) + deserialized = self._deserialize("CustomDomain", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -467,8 +471,8 @@ def _create_initial( custom_domain_name: str, custom_domain_properties: Union[_models.CustomDomainParameters, IO[bytes]], **kwargs: Any - ) -> _models.CustomDomain: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -481,7 +485,7 @@ def _create_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CustomDomain] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -504,10 +508,10 @@ def _create_initial( headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) @@ -515,21 +519,22 @@ def _create_initial( response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("CustomDomain", pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize("CustomDomain", pipeline_response) - if response.status_code == 202: response_headers["location"] = self._deserialize("str", response.headers.get("location")) - deserialized = self._deserialize("CustomDomain", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore @@ -550,7 +555,8 @@ def begin_create( ) -> LROPoller[_models.CustomDomain]: """Creates a new custom domain within an endpoint. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the CDN profile which is unique within the resource group. Required. @@ -585,7 +591,8 @@ def begin_create( ) -> LROPoller[_models.CustomDomain]: """Creates a new custom domain within an endpoint. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the CDN profile which is unique within the resource group. Required. @@ -618,7 +625,8 @@ def begin_create( ) -> LROPoller[_models.CustomDomain]: """Creates a new custom domain within an endpoint. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the CDN profile which is unique within the resource group. Required. @@ -659,10 +667,11 @@ def begin_create( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CustomDomain", pipeline_response) + deserialized = self._deserialize("CustomDomain", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized @@ -686,8 +695,8 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, profile_name: str, endpoint_name: str, custom_domain_name: str, **kwargs: Any - ) -> Optional[_models.CustomDomain]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -699,7 +708,7 @@ def _delete_initial( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Optional[_models.CustomDomain]] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) _request = build_delete_request( resource_group_name=resource_group_name, @@ -711,10 +720,10 @@ def _delete_initial( headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) @@ -722,16 +731,22 @@ def _delete_initial( response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = None response_headers = {} if response.status_code == 202: response_headers["location"] = self._deserialize("str", response.headers.get("location")) - deserialized = self._deserialize("CustomDomain", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore @@ -744,7 +759,8 @@ def begin_delete( ) -> LROPoller[_models.CustomDomain]: """Deletes an existing custom domain within an endpoint. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the CDN profile which is unique within the resource group. Required. @@ -779,6 +795,7 @@ def begin_delete( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): @@ -786,7 +803,7 @@ def get_long_running_output(pipeline_response): response = pipeline_response.http_response response_headers["location"] = self._deserialize("str", response.headers.get("location")) - deserialized = self._deserialize("CustomDomain", pipeline_response) + deserialized = self._deserialize("CustomDomain", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized @@ -810,8 +827,8 @@ def get_long_running_output(pipeline_response): def _disable_custom_https_initial( self, resource_group_name: str, profile_name: str, endpoint_name: str, custom_domain_name: str, **kwargs: Any - ) -> _models.CustomDomain: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -823,7 +840,7 @@ def _disable_custom_https_initial( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.CustomDomain] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) _request = build_disable_custom_https_request( resource_group_name=resource_group_name, @@ -835,10 +852,10 @@ def _disable_custom_https_initial( headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) @@ -846,18 +863,22 @@ def _disable_custom_https_initial( response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("CustomDomain", pipeline_response) - if response.status_code == 202: response_headers["location"] = self._deserialize("str", response.headers.get("location")) - deserialized = self._deserialize("CustomDomain", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore @@ -870,7 +891,8 @@ def begin_disable_custom_https( ) -> LROPoller[_models.CustomDomain]: """Disable https delivery of the custom domain. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the CDN profile which is unique within the resource group. Required. @@ -905,10 +927,11 @@ def begin_disable_custom_https( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CustomDomain", pipeline_response) + deserialized = self._deserialize("CustomDomain", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized @@ -938,8 +961,8 @@ def _enable_custom_https_initial( custom_domain_name: str, custom_domain_https_parameters: Optional[Union[_models.CustomDomainHttpsParameters, IO[bytes]]] = None, **kwargs: Any - ) -> _models.CustomDomain: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -952,9 +975,10 @@ def _enable_custom_https_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CustomDomain] = kwargs.pop("cls", None) + content_type = content_type if custom_domain_https_parameters else None + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - content_type = content_type or "application/json" + content_type = content_type or "application/json" if custom_domain_https_parameters else None _json = None _content = None if isinstance(custom_domain_https_parameters, (IOBase, bytes)): @@ -978,10 +1002,10 @@ def _enable_custom_https_initial( headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) @@ -989,18 +1013,22 @@ def _enable_custom_https_initial( response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("CustomDomain", pipeline_response) - if response.status_code == 202: response_headers["location"] = self._deserialize("str", response.headers.get("location")) - deserialized = self._deserialize("CustomDomain", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore @@ -1021,7 +1049,8 @@ def begin_enable_custom_https( ) -> LROPoller[_models.CustomDomain]: """Enable https delivery of the custom domain. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the CDN profile which is unique within the resource group. Required. @@ -1058,7 +1087,8 @@ def begin_enable_custom_https( ) -> LROPoller[_models.CustomDomain]: """Enable https delivery of the custom domain. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the CDN profile which is unique within the resource group. Required. @@ -1093,7 +1123,8 @@ def begin_enable_custom_https( ) -> LROPoller[_models.CustomDomain]: """Enable https delivery of the custom domain. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the CDN profile which is unique within the resource group. Required. @@ -1119,6 +1150,7 @@ def begin_enable_custom_https( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + content_type = content_type if custom_domain_https_parameters else None cls: ClsType[_models.CustomDomain] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -1137,10 +1169,11 @@ def begin_enable_custom_https( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CustomDomain", pipeline_response) + deserialized = self._deserialize("CustomDomain", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_edge_nodes_operations.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_edge_nodes_operations.py index ac995df5bfcd..b51f501f4a01 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_edge_nodes_operations.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_edge_nodes_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,10 +5,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys -from typing import Any, Callable, Dict, Iterable, Optional, Type, TypeVar +from collections.abc import MutableMapping +from typing import Any, Callable, Optional, TypeVar import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -20,22 +20,18 @@ ) from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpResponse -from azure.core.rest import HttpRequest +from azure.core.rest import HttpRequest, HttpResponse from azure.core.tracing.decorator import distributed_trace from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer -from .._vendor import CdnManagementClientMixinABC, _convert_request +from .._configuration import CdnManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -45,7 +41,7 @@ def build_list_request(**kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -72,15 +68,15 @@ class EdgeNodesOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CdnManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace - def list(self, **kwargs: Any) -> Iterable["_models.EdgeNode"]: + def list(self, **kwargs: Any) -> ItemPaged["_models.EdgeNode"]: """Edgenodes are the global Point of Presence (POP) locations used to deliver CDN content to end users. @@ -94,7 +90,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.EdgeNode"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.EdgenodeResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -110,7 +106,6 @@ def prepare_request(next_link=None): headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) else: @@ -126,7 +121,6 @@ def prepare_request(next_link=None): _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _request.method = "GET" return _request @@ -149,7 +143,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_endpoints_operations.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_endpoints_operations.py index 28c4bba440d6..633e066879bc 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_endpoints_operations.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_endpoints_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,39 +6,38 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Iterable, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, ResourceNotModifiedError, + StreamClosedError, + StreamConsumedError, map_error, ) from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpResponse from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest +from azure.core.rest import HttpRequest, HttpResponse from azure.core.tracing.decorator import distributed_trace from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling from .. import models as _models -from .._serialization import Serializer -from .._vendor import CdnManagementClientMixinABC, _convert_request +from .._configuration import CdnManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -50,17 +49,17 @@ def build_list_by_profile_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._\(\)]+$" + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 ), "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), @@ -83,17 +82,17 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._\(\)]+$" + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 ), "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, "str"), @@ -117,7 +116,7 @@ def build_create_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -125,10 +124,10 @@ def build_create_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._\(\)]+$" + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 ), "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, "str"), @@ -154,7 +153,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -162,10 +161,10 @@ def build_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._\(\)]+$" + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 ), "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, "str"), @@ -191,17 +190,17 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._\(\)]+$" + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 ), "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, "str"), @@ -225,17 +224,17 @@ def build_start_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/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\._\(\)]+$" + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 ), "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, "str"), @@ -259,17 +258,17 @@ def build_stop_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/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\._\(\)]+$" + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 ), "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, "str"), @@ -293,7 +292,7 @@ def build_purge_content_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -301,10 +300,10 @@ def build_purge_content_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/purge", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._\(\)]+$" + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 ), "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, "str"), @@ -330,7 +329,7 @@ def build_load_content_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -338,10 +337,10 @@ def build_load_content_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/load", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._\(\)]+$" + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 ), "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, "str"), @@ -367,7 +366,7 @@ def build_validate_custom_domain_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -375,10 +374,10 @@ def build_validate_custom_domain_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/validateCustomDomain", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._\(\)]+$" + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 ), "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, "str"), @@ -404,17 +403,17 @@ def build_list_resource_usage_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/checkResourceUsage", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._\(\)]+$" + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 ), "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, "str"), @@ -444,20 +443,21 @@ class EndpointsOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CdnManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_profile( self, resource_group_name: str, profile_name: str, **kwargs: Any - ) -> Iterable["_models.Endpoint"]: + ) -> ItemPaged["_models.Endpoint"]: """Lists existing CDN endpoints. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the CDN profile which is unique within the resource group. Required. @@ -472,7 +472,7 @@ def list_by_profile( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.EndpointListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -491,7 +491,6 @@ def prepare_request(next_link=None): headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) else: @@ -507,7 +506,6 @@ def prepare_request(next_link=None): _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _request.method = "GET" return _request @@ -530,7 +528,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -542,7 +543,8 @@ def get(self, resource_group_name: str, profile_name: str, endpoint_name: str, * """Gets an existing CDN endpoint with the specified endpoint name under the specified subscription, resource group and profile. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the CDN profile which is unique within the resource group. Required. @@ -554,7 +556,7 @@ def get(self, resource_group_name: str, profile_name: str, endpoint_name: str, * :rtype: ~azure.mgmt.cdn.models.Endpoint :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -577,7 +579,6 @@ def get(self, resource_group_name: str, profile_name: str, endpoint_name: str, * headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False @@ -589,10 +590,13 @@ def get(self, resource_group_name: str, profile_name: str, endpoint_name: str, * if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("Endpoint", pipeline_response) + deserialized = self._deserialize("Endpoint", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -606,8 +610,8 @@ def _create_initial( endpoint_name: str, endpoint: Union[_models.Endpoint, IO[bytes]], **kwargs: Any - ) -> _models.Endpoint: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -620,7 +624,7 @@ def _create_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.Endpoint] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -642,10 +646,10 @@ def _create_initial( headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) @@ -653,21 +657,22 @@ def _create_initial( response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("Endpoint", pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize("Endpoint", pipeline_response) - if response.status_code == 202: response_headers["location"] = self._deserialize("str", response.headers.get("location")) - deserialized = self._deserialize("Endpoint", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore @@ -688,7 +693,8 @@ def begin_create( """Creates a new CDN endpoint with the specified endpoint name under the specified subscription, resource group and profile. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the CDN profile which is unique within the resource group. Required. @@ -720,7 +726,8 @@ def begin_create( """Creates a new CDN endpoint with the specified endpoint name under the specified subscription, resource group and profile. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the CDN profile which is unique within the resource group. Required. @@ -750,7 +757,8 @@ def begin_create( """Creates a new CDN endpoint with the specified endpoint name under the specified subscription, resource group and profile. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the CDN profile which is unique within the resource group. Required. @@ -786,10 +794,11 @@ def begin_create( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("Endpoint", pipeline_response) + deserialized = self._deserialize("Endpoint", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized @@ -818,8 +827,8 @@ def _update_initial( endpoint_name: str, endpoint_update_properties: Union[_models.EndpointUpdateParameters, IO[bytes]], **kwargs: Any - ) -> _models.Endpoint: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -832,7 +841,7 @@ def _update_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.Endpoint] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -854,10 +863,10 @@ def _update_initial( headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) @@ -865,18 +874,22 @@ def _update_initial( response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("Endpoint", pipeline_response) - if response.status_code == 202: response_headers["location"] = self._deserialize("str", response.headers.get("location")) - deserialized = self._deserialize("Endpoint", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore @@ -899,7 +912,8 @@ def begin_update( To update origins, use the Update Origin operation. To update origin groups, use the Update Origin group operation. To update custom domains, use the Update Custom Domain operation. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the CDN profile which is unique within the resource group. Required. @@ -933,7 +947,8 @@ def begin_update( To update origins, use the Update Origin operation. To update origin groups, use the Update Origin group operation. To update custom domains, use the Update Custom Domain operation. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the CDN profile which is unique within the resource group. Required. @@ -965,7 +980,8 @@ def begin_update( To update origins, use the Update Origin operation. To update origin groups, use the Update Origin group operation. To update custom domains, use the Update Custom Domain operation. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the CDN profile which is unique within the resource group. Required. @@ -1002,10 +1018,11 @@ def begin_update( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("Endpoint", pipeline_response) + deserialized = self._deserialize("Endpoint", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized @@ -1027,10 +1044,10 @@ def get_long_running_output(pipeline_response): self._client, raw_result, get_long_running_output, polling_method # type: ignore ) - def _delete_initial( # pylint: disable=inconsistent-return-statements + def _delete_initial( self, resource_group_name: str, profile_name: str, endpoint_name: str, **kwargs: Any - ) -> None: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1042,7 +1059,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) _request = build_delete_request( resource_group_name=resource_group_name, @@ -1053,10 +1070,10 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) @@ -1064,16 +1081,27 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} if response.status_code == 202: response_headers["location"] = self._deserialize("str", response.headers.get("location")) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + if cls: - return cls(pipeline_response, None, response_headers) # type: ignore + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore @distributed_trace def begin_delete( @@ -1082,7 +1110,8 @@ def begin_delete( """Deletes an existing CDN endpoint with the specified endpoint name under the specified subscription, resource group and profile. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the CDN profile which is unique within the resource group. Required. @@ -1103,7 +1132,7 @@ def begin_delete( lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: - raw_result = self._delete_initial( # type: ignore + raw_result = self._delete_initial( resource_group_name=resource_group_name, profile_name=profile_name, endpoint_name=endpoint_name, @@ -1113,6 +1142,7 @@ def begin_delete( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements @@ -1136,8 +1166,8 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_initial( self, resource_group_name: str, profile_name: str, endpoint_name: str, **kwargs: Any - ) -> _models.Endpoint: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1149,7 +1179,7 @@ def _start_initial( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.Endpoint] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) _request = build_start_request( resource_group_name=resource_group_name, @@ -1160,10 +1190,10 @@ def _start_initial( headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) @@ -1171,18 +1201,22 @@ def _start_initial( response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("Endpoint", pipeline_response) - if response.status_code == 202: response_headers["location"] = self._deserialize("str", response.headers.get("location")) - deserialized = self._deserialize("Endpoint", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore @@ -1195,7 +1229,8 @@ def begin_start( ) -> LROPoller[_models.Endpoint]: """Starts an existing CDN endpoint that is on a stopped state. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the CDN profile which is unique within the resource group. Required. @@ -1226,10 +1261,11 @@ def begin_start( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("Endpoint", pipeline_response) + deserialized = self._deserialize("Endpoint", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized @@ -1253,8 +1289,8 @@ def get_long_running_output(pipeline_response): def _stop_initial( self, resource_group_name: str, profile_name: str, endpoint_name: str, **kwargs: Any - ) -> _models.Endpoint: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1266,7 +1302,7 @@ def _stop_initial( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.Endpoint] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) _request = build_stop_request( resource_group_name=resource_group_name, @@ -1277,10 +1313,10 @@ def _stop_initial( headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) @@ -1288,18 +1324,22 @@ def _stop_initial( response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("Endpoint", pipeline_response) - if response.status_code == 202: response_headers["location"] = self._deserialize("str", response.headers.get("location")) - deserialized = self._deserialize("Endpoint", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore @@ -1312,7 +1352,8 @@ def begin_stop( ) -> LROPoller[_models.Endpoint]: """Stops an existing running CDN endpoint. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the CDN profile which is unique within the resource group. Required. @@ -1343,10 +1384,11 @@ def begin_stop( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("Endpoint", pipeline_response) + deserialized = self._deserialize("Endpoint", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized @@ -1368,15 +1410,15 @@ def get_long_running_output(pipeline_response): self._client, raw_result, get_long_running_output, polling_method # type: ignore ) - def _purge_content_initial( # pylint: disable=inconsistent-return-statements + def _purge_content_initial( self, resource_group_name: str, profile_name: str, endpoint_name: str, content_file_paths: Union[_models.PurgeParameters, IO[bytes]], **kwargs: Any - ) -> None: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1389,7 +1431,7 @@ def _purge_content_initial( # pylint: disable=inconsistent-return-statements api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[None] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -1411,10 +1453,10 @@ def _purge_content_initial( # pylint: disable=inconsistent-return-statements headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) @@ -1422,16 +1464,27 @@ def _purge_content_initial( # pylint: disable=inconsistent-return-statements response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} if response.status_code == 202: response_headers["location"] = self._deserialize("str", response.headers.get("location")) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + if cls: - return cls(pipeline_response, None, response_headers) # type: ignore + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore @overload def begin_purge_content( @@ -1446,7 +1499,8 @@ def begin_purge_content( ) -> LROPoller[None]: """Removes a content from CDN. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the CDN profile which is unique within the resource group. Required. @@ -1479,7 +1533,8 @@ def begin_purge_content( ) -> LROPoller[None]: """Removes a content from CDN. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the CDN profile which is unique within the resource group. Required. @@ -1510,7 +1565,8 @@ def begin_purge_content( ) -> LROPoller[None]: """Removes a content from CDN. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the CDN profile which is unique within the resource group. Required. @@ -1537,7 +1593,7 @@ def begin_purge_content( lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: - raw_result = self._purge_content_initial( # type: ignore + raw_result = self._purge_content_initial( resource_group_name=resource_group_name, profile_name=profile_name, endpoint_name=endpoint_name, @@ -1549,6 +1605,7 @@ def begin_purge_content( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements @@ -1570,15 +1627,15 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- ) return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - def _load_content_initial( # pylint: disable=inconsistent-return-statements + def _load_content_initial( self, resource_group_name: str, profile_name: str, endpoint_name: str, content_file_paths: Union[_models.LoadParameters, IO[bytes]], **kwargs: Any - ) -> None: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1591,7 +1648,7 @@ def _load_content_initial( # pylint: disable=inconsistent-return-statements api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[None] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -1613,10 +1670,10 @@ def _load_content_initial( # pylint: disable=inconsistent-return-statements headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) @@ -1624,16 +1681,27 @@ def _load_content_initial( # pylint: disable=inconsistent-return-statements response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} if response.status_code == 202: response_headers["location"] = self._deserialize("str", response.headers.get("location")) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + if cls: - return cls(pipeline_response, None, response_headers) # type: ignore + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore @overload def begin_load_content( @@ -1648,7 +1716,8 @@ def begin_load_content( ) -> LROPoller[None]: """Pre-loads a content to CDN. Available for Verizon Profiles. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the CDN profile which is unique within the resource group. Required. @@ -1680,7 +1749,8 @@ def begin_load_content( ) -> LROPoller[None]: """Pre-loads a content to CDN. Available for Verizon Profiles. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the CDN profile which is unique within the resource group. Required. @@ -1710,7 +1780,8 @@ def begin_load_content( ) -> LROPoller[None]: """Pre-loads a content to CDN. Available for Verizon Profiles. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the CDN profile which is unique within the resource group. Required. @@ -1736,7 +1807,7 @@ def begin_load_content( lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: - raw_result = self._load_content_initial( # type: ignore + raw_result = self._load_content_initial( resource_group_name=resource_group_name, profile_name=profile_name, endpoint_name=endpoint_name, @@ -1748,6 +1819,7 @@ def begin_load_content( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements @@ -1782,7 +1854,8 @@ def validate_custom_domain( ) -> _models.ValidateCustomDomainOutput: """Validates the custom domain mapping to ensure it maps to the correct CDN endpoint in DNS. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the CDN profile which is unique within the resource group. Required. @@ -1813,7 +1886,8 @@ def validate_custom_domain( ) -> _models.ValidateCustomDomainOutput: """Validates the custom domain mapping to ensure it maps to the correct CDN endpoint in DNS. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the CDN profile which is unique within the resource group. Required. @@ -1842,7 +1916,8 @@ def validate_custom_domain( ) -> _models.ValidateCustomDomainOutput: """Validates the custom domain mapping to ensure it maps to the correct CDN endpoint in DNS. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the CDN profile which is unique within the resource group. Required. @@ -1857,7 +1932,7 @@ def validate_custom_domain( :rtype: ~azure.mgmt.cdn.models.ValidateCustomDomainOutput :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1892,7 +1967,6 @@ def validate_custom_domain( headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False @@ -1904,10 +1978,13 @@ def validate_custom_domain( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("ValidateCustomDomainOutput", pipeline_response) + deserialized = self._deserialize("ValidateCustomDomainOutput", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -1917,10 +1994,11 @@ def validate_custom_domain( @distributed_trace def list_resource_usage( self, resource_group_name: str, profile_name: str, endpoint_name: str, **kwargs: Any - ) -> Iterable["_models.ResourceUsage"]: + ) -> ItemPaged["_models.ResourceUsage"]: """Checks the quota and usage of geo filters and custom domains under the given endpoint. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the CDN profile which is unique within the resource group. Required. @@ -1938,7 +2016,7 @@ def list_resource_usage( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ResourceUsageListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1958,7 +2036,6 @@ def prepare_request(next_link=None): headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) else: @@ -1974,7 +2051,6 @@ def prepare_request(next_link=None): _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _request.method = "GET" return _request @@ -1997,7 +2073,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_log_analytics_operations.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_log_analytics_operations.py index da8ececd9538..1e73981b0831 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_log_analytics_operations.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_log_analytics_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,10 +6,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping import datetime -import sys -from typing import Any, Callable, Dict, List, Optional, Type, TypeVar, Union +from typing import Any, Callable, Optional, TypeVar, Union +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -19,22 +20,18 @@ map_error, ) from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpResponse -from azure.core.rest import HttpRequest +from azure.core.rest import HttpRequest, HttpResponse from azure.core.tracing.decorator import distributed_trace from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer -from .._vendor import CdnManagementClientMixinABC, _convert_request +from .._configuration import CdnManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -59,18 +56,18 @@ def build_get_log_analytics_metrics_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/getLogAnalyticsMetrics", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._\(\)]+$" + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 ), "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), } @@ -118,18 +115,18 @@ def build_get_log_analytics_rankings_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/getLogAnalyticsRankings", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._\(\)]+$" + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 ), "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), } @@ -160,18 +157,18 @@ def build_get_log_analytics_locations_request( # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/getLogAnalyticsLocations", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._\(\)]+$" + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 ), "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), } @@ -193,18 +190,18 @@ def build_get_log_analytics_resources_request( # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/getLogAnalyticsResources", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._\(\)]+$" + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 ), "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), } @@ -237,18 +234,18 @@ def build_get_waf_log_analytics_metrics_request( # pylint: disable=name-too-lon _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/getWafLogAnalyticsMetrics", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._\(\)]+$" + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 ), "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), } @@ -291,18 +288,18 @@ def build_get_waf_log_analytics_rankings_request( # pylint: disable=name-too-lo _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/getWafLogAnalyticsRankings", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._\(\)]+$" + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 ), "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), } @@ -339,15 +336,15 @@ class LogAnalyticsOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CdnManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace - def get_log_analytics_metrics( + def get_log_analytics_metrics( # pylint: disable=too-many-locals self, resource_group_name: str, profile_name: str, @@ -364,7 +361,8 @@ def get_log_analytics_metrics( ) -> _models.MetricsResponse: """Get log report for AFD profile. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. which is unique within the resource group. Required. @@ -391,7 +389,7 @@ def get_log_analytics_metrics( :rtype: ~azure.mgmt.cdn.models.MetricsResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -422,7 +420,6 @@ def get_log_analytics_metrics( headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False @@ -434,10 +431,13 @@ def get_log_analytics_metrics( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("MetricsResponse", pipeline_response) + deserialized = self._deserialize("MetricsResponse", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -459,7 +459,8 @@ def get_log_analytics_rankings( ) -> _models.RankingsResponse: """Get log analytics ranking report for AFD profile. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. which is unique within the resource group. Required. @@ -480,7 +481,7 @@ def get_log_analytics_rankings( :rtype: ~azure.mgmt.cdn.models.RankingsResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -508,7 +509,6 @@ def get_log_analytics_rankings( headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False @@ -520,10 +520,13 @@ def get_log_analytics_rankings( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("RankingsResponse", pipeline_response) + deserialized = self._deserialize("RankingsResponse", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -536,7 +539,8 @@ def get_log_analytics_locations( ) -> _models.ContinentsResponse: """Get all available location names for AFD log analytics report. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. which is unique within the resource group. Required. @@ -545,7 +549,7 @@ def get_log_analytics_locations( :rtype: ~azure.mgmt.cdn.models.ContinentsResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -567,7 +571,6 @@ def get_log_analytics_locations( headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False @@ -579,10 +582,13 @@ def get_log_analytics_locations( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("ContinentsResponse", pipeline_response) + deserialized = self._deserialize("ContinentsResponse", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -595,7 +601,8 @@ def get_log_analytics_resources( ) -> _models.ResourcesResponse: """Get all endpoints and custom domains available for AFD log report. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. which is unique within the resource group. Required. @@ -604,7 +611,7 @@ def get_log_analytics_resources( :rtype: ~azure.mgmt.cdn.models.ResourcesResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -626,7 +633,6 @@ def get_log_analytics_resources( headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False @@ -638,10 +644,13 @@ def get_log_analytics_resources( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("ResourcesResponse", pipeline_response) + deserialized = self._deserialize("ResourcesResponse", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -664,7 +673,8 @@ def get_waf_log_analytics_metrics( ) -> _models.WafMetricsResponse: """Get Waf related log analytics report for AFD profile. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. which is unique within the resource group. Required. @@ -687,7 +697,7 @@ def get_waf_log_analytics_metrics( :rtype: ~azure.mgmt.cdn.models.WafMetricsResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -716,7 +726,6 @@ def get_waf_log_analytics_metrics( headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False @@ -728,10 +737,13 @@ def get_waf_log_analytics_metrics( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("WafMetricsResponse", pipeline_response) + deserialized = self._deserialize("WafMetricsResponse", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -754,7 +766,8 @@ def get_waf_log_analytics_rankings( ) -> _models.WafRankingsResponse: """Get WAF log analytics charts for AFD profile. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. which is unique within the resource group. Required. @@ -777,7 +790,7 @@ def get_waf_log_analytics_rankings( :rtype: ~azure.mgmt.cdn.models.WafRankingsResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -806,7 +819,6 @@ def get_waf_log_analytics_rankings( headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False @@ -818,10 +830,13 @@ def get_waf_log_analytics_rankings( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("WafRankingsResponse", pipeline_response) + deserialized = self._deserialize("WafRankingsResponse", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_managed_rule_sets_operations.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_managed_rule_sets_operations.py index 4d8243ab3d6e..4306878a7d08 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_managed_rule_sets_operations.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_managed_rule_sets_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,10 +5,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys -from typing import Any, Callable, Dict, Iterable, Optional, Type, TypeVar +from collections.abc import MutableMapping +from typing import Any, Callable, Optional, TypeVar import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -20,22 +20,18 @@ ) from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpResponse -from azure.core.rest import HttpRequest +from azure.core.rest import HttpRequest, HttpResponse from azure.core.tracing.decorator import distributed_trace from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer -from .._vendor import CdnManagementClientMixinABC, _convert_request +from .._configuration import CdnManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -45,14 +41,14 @@ def build_list_request(subscription_id: str, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Cdn/cdnWebApplicationFirewallManagedRuleSets", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), } @@ -80,15 +76,15 @@ class ManagedRuleSetsOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CdnManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace - def list(self, **kwargs: Any) -> Iterable["_models.ManagedRuleSetDefinition"]: + def list(self, **kwargs: Any) -> ItemPaged["_models.ManagedRuleSetDefinition"]: """Lists all available managed rule sets. :return: An iterator like instance of either ManagedRuleSetDefinition or the result of @@ -102,7 +98,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.ManagedRuleSetDefinition"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ManagedRuleSetDefinitionList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -119,7 +115,6 @@ def prepare_request(next_link=None): headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) else: @@ -135,7 +130,6 @@ def prepare_request(next_link=None): _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _request.method = "GET" return _request @@ -158,7 +152,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_operations.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_operations.py index 10d99a59fca4..a94349df33f4 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_operations.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,10 +5,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys -from typing import Any, Callable, Dict, Iterable, Optional, Type, TypeVar +from collections.abc import MutableMapping +from typing import Any, Callable, Optional, TypeVar import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -20,22 +20,18 @@ ) from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpResponse -from azure.core.rest import HttpRequest +from azure.core.rest import HttpRequest, HttpResponse from azure.core.tracing.decorator import distributed_trace from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer -from .._vendor import CdnManagementClientMixinABC, _convert_request +from .._configuration import CdnManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -45,7 +41,7 @@ def build_list_request(**kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -72,15 +68,15 @@ class Operations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CdnManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace - def list(self, **kwargs: Any) -> Iterable["_models.Operation"]: + def list(self, **kwargs: Any) -> ItemPaged["_models.Operation"]: """Lists all of the available CDN REST API operations. :return: An iterator like instance of either Operation or the result of cls(response) @@ -93,7 +89,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Operation"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.OperationsListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -109,7 +105,6 @@ def prepare_request(next_link=None): headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) else: @@ -125,7 +120,6 @@ def prepare_request(next_link=None): _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _request.method = "GET" return _request @@ -148,7 +142,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_origin_groups_operations.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_origin_groups_operations.py index aeca4d14e338..ddcd3620f58e 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_origin_groups_operations.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_origin_groups_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,39 +6,38 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Iterable, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, ResourceNotModifiedError, + StreamClosedError, + StreamConsumedError, map_error, ) from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpResponse from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest +from azure.core.rest import HttpRequest, HttpResponse from azure.core.tracing.decorator import distributed_trace from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling from .. import models as _models -from .._serialization import Serializer -from .._vendor import CdnManagementClientMixinABC, _convert_request +from .._configuration import CdnManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -50,17 +49,17 @@ def build_list_by_endpoint_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/originGroups", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._\(\)]+$" + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 ), "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, "str"), @@ -89,17 +88,17 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/originGroups/{originGroupName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._\(\)]+$" + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 ), "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, "str"), @@ -129,7 +128,7 @@ def build_create_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -137,10 +136,10 @@ def build_create_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/originGroups/{originGroupName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._\(\)]+$" + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 ), "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, "str"), @@ -172,7 +171,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -180,10 +179,10 @@ def build_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/originGroups/{originGroupName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._\(\)]+$" + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 ), "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, "str"), @@ -215,17 +214,17 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/originGroups/{originGroupName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._\(\)]+$" + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 ), "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, "str"), @@ -256,20 +255,21 @@ class OriginGroupsOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CdnManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_endpoint( self, resource_group_name: str, profile_name: str, endpoint_name: str, **kwargs: Any - ) -> Iterable["_models.OriginGroup"]: + ) -> ItemPaged["_models.OriginGroup"]: """Lists all of the existing origin groups within an endpoint. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the CDN profile which is unique within the resource group. Required. @@ -287,7 +287,7 @@ def list_by_endpoint( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.OriginGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -307,7 +307,6 @@ def prepare_request(next_link=None): headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) else: @@ -323,7 +322,6 @@ def prepare_request(next_link=None): _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _request.method = "GET" return _request @@ -346,7 +344,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -359,7 +360,8 @@ def get( ) -> _models.OriginGroup: """Gets an existing origin group within an endpoint. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the CDN profile which is unique within the resource group. Required. @@ -374,7 +376,7 @@ def get( :rtype: ~azure.mgmt.cdn.models.OriginGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -398,7 +400,6 @@ def get( headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False @@ -410,10 +411,13 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("OriginGroup", pipeline_response) + deserialized = self._deserialize("OriginGroup", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -428,8 +432,8 @@ def _create_initial( origin_group_name: str, origin_group: Union[_models.OriginGroup, IO[bytes]], **kwargs: Any - ) -> _models.OriginGroup: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -442,7 +446,7 @@ def _create_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.OriginGroup] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -465,10 +469,10 @@ def _create_initial( headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) @@ -476,21 +480,22 @@ def _create_initial( response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("OriginGroup", pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize("OriginGroup", pipeline_response) - if response.status_code == 202: response_headers["location"] = self._deserialize("str", response.headers.get("location")) - deserialized = self._deserialize("OriginGroup", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore @@ -511,7 +516,8 @@ def begin_create( ) -> LROPoller[_models.OriginGroup]: """Creates a new origin group within the specified endpoint. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the CDN profile which is unique within the resource group. Required. @@ -547,7 +553,8 @@ def begin_create( ) -> LROPoller[_models.OriginGroup]: """Creates a new origin group within the specified endpoint. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the CDN profile which is unique within the resource group. Required. @@ -581,7 +588,8 @@ def begin_create( ) -> LROPoller[_models.OriginGroup]: """Creates a new origin group within the specified endpoint. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the CDN profile which is unique within the resource group. Required. @@ -623,10 +631,11 @@ def begin_create( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("OriginGroup", pipeline_response) + deserialized = self._deserialize("OriginGroup", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized @@ -656,8 +665,8 @@ def _update_initial( origin_group_name: str, origin_group_update_properties: Union[_models.OriginGroupUpdateParameters, IO[bytes]], **kwargs: Any - ) -> _models.OriginGroup: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -670,7 +679,7 @@ def _update_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.OriginGroup] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -693,10 +702,10 @@ def _update_initial( headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) @@ -704,18 +713,22 @@ def _update_initial( response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("OriginGroup", pipeline_response) - if response.status_code == 202: response_headers["location"] = self._deserialize("str", response.headers.get("location")) - deserialized = self._deserialize("OriginGroup", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore @@ -736,7 +749,8 @@ def begin_update( ) -> LROPoller[_models.OriginGroup]: """Updates an existing origin group within an endpoint. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the CDN profile which is unique within the resource group. Required. @@ -772,7 +786,8 @@ def begin_update( ) -> LROPoller[_models.OriginGroup]: """Updates an existing origin group within an endpoint. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the CDN profile which is unique within the resource group. Required. @@ -806,7 +821,8 @@ def begin_update( ) -> LROPoller[_models.OriginGroup]: """Updates an existing origin group within an endpoint. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the CDN profile which is unique within the resource group. Required. @@ -849,10 +865,11 @@ def begin_update( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("OriginGroup", pipeline_response) + deserialized = self._deserialize("OriginGroup", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized @@ -874,10 +891,10 @@ def get_long_running_output(pipeline_response): self._client, raw_result, get_long_running_output, polling_method # type: ignore ) - def _delete_initial( # pylint: disable=inconsistent-return-statements + def _delete_initial( self, resource_group_name: str, profile_name: str, endpoint_name: str, origin_group_name: str, **kwargs: Any - ) -> None: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -889,7 +906,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) _request = build_delete_request( resource_group_name=resource_group_name, @@ -901,10 +918,10 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) @@ -912,16 +929,27 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} if response.status_code == 202: response_headers["location"] = self._deserialize("str", response.headers.get("location")) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + if cls: - return cls(pipeline_response, None, response_headers) # type: ignore + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore @distributed_trace def begin_delete( @@ -929,7 +957,8 @@ def begin_delete( ) -> LROPoller[None]: """Deletes an existing origin group within an endpoint. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the CDN profile which is unique within the resource group. Required. @@ -953,7 +982,7 @@ def begin_delete( lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: - raw_result = self._delete_initial( # type: ignore + raw_result = self._delete_initial( resource_group_name=resource_group_name, profile_name=profile_name, endpoint_name=endpoint_name, @@ -964,6 +993,7 @@ def begin_delete( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_origins_operations.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_origins_operations.py index 3f181ef33b4b..369a08d395be 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_origins_operations.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_origins_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,39 +6,38 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Iterable, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, ResourceNotModifiedError, + StreamClosedError, + StreamConsumedError, map_error, ) from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpResponse from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest +from azure.core.rest import HttpRequest, HttpResponse from azure.core.tracing.decorator import distributed_trace from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling from .. import models as _models -from .._serialization import Serializer -from .._vendor import CdnManagementClientMixinABC, _convert_request +from .._configuration import CdnManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -50,17 +49,17 @@ def build_list_by_endpoint_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/origins", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._\(\)]+$" + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 ), "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, "str"), @@ -89,17 +88,17 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/origins/{originName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._\(\)]+$" + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 ), "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, "str"), @@ -129,7 +128,7 @@ def build_create_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -137,10 +136,10 @@ def build_create_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/origins/{originName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._\(\)]+$" + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 ), "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, "str"), @@ -172,7 +171,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -180,10 +179,10 @@ def build_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/origins/{originName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._\(\)]+$" + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 ), "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, "str"), @@ -215,17 +214,17 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/origins/{originName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._\(\)]+$" + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 ), "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, "str"), @@ -256,20 +255,21 @@ class OriginsOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CdnManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_endpoint( self, resource_group_name: str, profile_name: str, endpoint_name: str, **kwargs: Any - ) -> Iterable["_models.Origin"]: + ) -> ItemPaged["_models.Origin"]: """Lists all of the existing origins within an endpoint. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the CDN profile which is unique within the resource group. Required. @@ -287,7 +287,7 @@ def list_by_endpoint( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.OriginListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -307,7 +307,6 @@ def prepare_request(next_link=None): headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) else: @@ -323,7 +322,6 @@ def prepare_request(next_link=None): _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _request.method = "GET" return _request @@ -346,7 +344,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -359,7 +360,8 @@ def get( ) -> _models.Origin: """Gets an existing origin within an endpoint. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the CDN profile which is unique within the resource group. Required. @@ -373,7 +375,7 @@ def get( :rtype: ~azure.mgmt.cdn.models.Origin :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -397,7 +399,6 @@ def get( headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False @@ -409,10 +410,13 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("Origin", pipeline_response) + deserialized = self._deserialize("Origin", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -427,8 +431,8 @@ def _create_initial( origin_name: str, origin: Union[_models.Origin, IO[bytes]], **kwargs: Any - ) -> _models.Origin: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -441,7 +445,7 @@ def _create_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.Origin] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -464,10 +468,10 @@ def _create_initial( headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) @@ -475,21 +479,22 @@ def _create_initial( response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("Origin", pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize("Origin", pipeline_response) - if response.status_code == 202: response_headers["location"] = self._deserialize("str", response.headers.get("location")) - deserialized = self._deserialize("Origin", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore @@ -510,7 +515,8 @@ def begin_create( ) -> LROPoller[_models.Origin]: """Creates a new origin within the specified endpoint. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the CDN profile which is unique within the resource group. Required. @@ -544,7 +550,8 @@ def begin_create( ) -> LROPoller[_models.Origin]: """Creates a new origin within the specified endpoint. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the CDN profile which is unique within the resource group. Required. @@ -576,7 +583,8 @@ def begin_create( ) -> LROPoller[_models.Origin]: """Creates a new origin within the specified endpoint. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the CDN profile which is unique within the resource group. Required. @@ -615,10 +623,11 @@ def begin_create( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("Origin", pipeline_response) + deserialized = self._deserialize("Origin", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized @@ -648,8 +657,8 @@ def _update_initial( origin_name: str, origin_update_properties: Union[_models.OriginUpdateParameters, IO[bytes]], **kwargs: Any - ) -> _models.Origin: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -662,7 +671,7 @@ def _update_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.Origin] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -685,10 +694,10 @@ def _update_initial( headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) @@ -696,18 +705,22 @@ def _update_initial( response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("Origin", pipeline_response) - if response.status_code == 202: response_headers["location"] = self._deserialize("str", response.headers.get("location")) - deserialized = self._deserialize("Origin", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore @@ -728,7 +741,8 @@ def begin_update( ) -> LROPoller[_models.Origin]: """Updates an existing origin within an endpoint. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the CDN profile which is unique within the resource group. Required. @@ -762,7 +776,8 @@ def begin_update( ) -> LROPoller[_models.Origin]: """Updates an existing origin within an endpoint. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the CDN profile which is unique within the resource group. Required. @@ -794,7 +809,8 @@ def begin_update( ) -> LROPoller[_models.Origin]: """Updates an existing origin within an endpoint. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the CDN profile which is unique within the resource group. Required. @@ -834,10 +850,11 @@ def begin_update( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("Origin", pipeline_response) + deserialized = self._deserialize("Origin", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized @@ -859,10 +876,10 @@ def get_long_running_output(pipeline_response): self._client, raw_result, get_long_running_output, polling_method # type: ignore ) - def _delete_initial( # pylint: disable=inconsistent-return-statements + def _delete_initial( self, resource_group_name: str, profile_name: str, endpoint_name: str, origin_name: str, **kwargs: Any - ) -> None: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -874,7 +891,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) _request = build_delete_request( resource_group_name=resource_group_name, @@ -886,10 +903,10 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) @@ -897,16 +914,27 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} if response.status_code == 202: response_headers["location"] = self._deserialize("str", response.headers.get("location")) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + if cls: - return cls(pipeline_response, None, response_headers) # type: ignore + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore @distributed_trace def begin_delete( @@ -914,7 +942,8 @@ def begin_delete( ) -> LROPoller[None]: """Deletes an existing origin within an endpoint. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the CDN profile which is unique within the resource group. Required. @@ -937,7 +966,7 @@ def begin_delete( lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: - raw_result = self._delete_initial( # type: ignore + raw_result = self._delete_initial( resource_group_name=resource_group_name, profile_name=profile_name, endpoint_name=endpoint_name, @@ -948,6 +977,7 @@ def begin_delete( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_patch.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_patch.py index f7dd32510333..49900f6ab120 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_patch.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_patch.py @@ -2,6 +2,7 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ + """Customize generated code here. Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_policies_operations.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_policies_operations.py index a0594244f2de..3f3c05f64751 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_policies_operations.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_policies_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,39 +6,38 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Iterable, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, ResourceNotModifiedError, + StreamClosedError, + StreamConsumedError, map_error, ) from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpResponse from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest +from azure.core.rest import HttpRequest, HttpResponse from azure.core.tracing.decorator import distributed_trace from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling from .. import models as _models -from .._serialization import Serializer -from .._vendor import CdnManagementClientMixinABC, _convert_request +from .._configuration import CdnManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -48,22 +47,17 @@ def build_list_request(resource_group_name: str, subscription_id: str, **kwargs: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/cdnWebApplicationFirewallPolicies", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( - "resource_group_name", - resource_group_name, - "str", - max_length=80, - min_length=1, - pattern=r"^[a-zA-Z0-9_\-\(\)\.]*[^\.]$", + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 ), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), } @@ -83,22 +77,17 @@ def build_get_request(resource_group_name: str, policy_name: str, subscription_i _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/cdnWebApplicationFirewallPolicies/{policyName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( - "resource_group_name", - resource_group_name, - "str", - max_length=80, - min_length=1, - pattern=r"^[a-zA-Z0-9_\-\(\)\.]*[^\.]$", + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 ), "policyName": _SERIALIZER.url("policy_name", policy_name, "str", max_length=128), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), @@ -121,7 +110,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -129,15 +118,10 @@ def build_create_or_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/cdnWebApplicationFirewallPolicies/{policyName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( - "resource_group_name", - resource_group_name, - "str", - max_length=80, - min_length=1, - pattern=r"^[a-zA-Z0-9_\-\(\)\.]*[^\.]$", + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 ), "policyName": _SERIALIZER.url("policy_name", policy_name, "str", max_length=128), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), @@ -162,7 +146,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -170,15 +154,10 @@ def build_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/cdnWebApplicationFirewallPolicies/{policyName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( - "resource_group_name", - resource_group_name, - "str", - max_length=80, - min_length=1, - pattern=r"^[a-zA-Z0-9_\-\(\)\.]*[^\.]$", + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 ), "policyName": _SERIALIZER.url("policy_name", policy_name, "str", max_length=128), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), @@ -203,22 +182,17 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/cdnWebApplicationFirewallPolicies/{policyName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( - "resource_group_name", - resource_group_name, - "str", - max_length=80, - min_length=1, - pattern=r"^[a-zA-Z0-9_\-\(\)\.]*[^\.]$", + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 ), "policyName": _SERIALIZER.url("policy_name", policy_name, "str", max_length=128), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), @@ -247,18 +221,19 @@ class PoliciesOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CdnManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace - def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.CdnWebApplicationFirewallPolicy"]: + def list(self, resource_group_name: str, **kwargs: Any) -> ItemPaged["_models.CdnWebApplicationFirewallPolicy"]: """Lists all of the protection policies within a resource group. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :return: An iterator like instance of either CdnWebApplicationFirewallPolicy or the result of cls(response) @@ -271,7 +246,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Cdn api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.CdnWebApplicationFirewallPolicyList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -289,7 +264,6 @@ def prepare_request(next_link=None): headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) else: @@ -305,7 +279,6 @@ def prepare_request(next_link=None): _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _request.method = "GET" return _request @@ -328,7 +301,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -339,7 +315,8 @@ def get_next(next_link=None): def get(self, resource_group_name: str, policy_name: str, **kwargs: Any) -> _models.CdnWebApplicationFirewallPolicy: """Retrieve protection policy with specified name within a resource group. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param policy_name: The name of the CdnWebApplicationFirewallPolicy. Required. :type policy_name: str @@ -347,7 +324,7 @@ def get(self, resource_group_name: str, policy_name: str, **kwargs: Any) -> _mod :rtype: ~azure.mgmt.cdn.models.CdnWebApplicationFirewallPolicy :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -369,7 +346,6 @@ def get(self, resource_group_name: str, policy_name: str, **kwargs: Any) -> _mod headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False @@ -381,10 +357,13 @@ def get(self, resource_group_name: str, policy_name: str, **kwargs: Any) -> _mod if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("CdnWebApplicationFirewallPolicy", pipeline_response) + deserialized = self._deserialize("CdnWebApplicationFirewallPolicy", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -397,8 +376,8 @@ def _create_or_update_initial( policy_name: str, cdn_web_application_firewall_policy: Union[_models.CdnWebApplicationFirewallPolicy, IO[bytes]], **kwargs: Any - ) -> _models.CdnWebApplicationFirewallPolicy: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -411,7 +390,7 @@ def _create_or_update_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CdnWebApplicationFirewallPolicy] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -432,10 +411,10 @@ def _create_or_update_initial( headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) @@ -443,21 +422,22 @@ def _create_or_update_initial( response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("CdnWebApplicationFirewallPolicy", pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize("CdnWebApplicationFirewallPolicy", pipeline_response) - if response.status_code == 202: response_headers["location"] = self._deserialize("str", response.headers.get("location")) - deserialized = self._deserialize("CdnWebApplicationFirewallPolicy", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore @@ -476,7 +456,8 @@ def begin_create_or_update( ) -> LROPoller[_models.CdnWebApplicationFirewallPolicy]: """Create or update policy with specified rule set name within a resource group. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param policy_name: The name of the CdnWebApplicationFirewallPolicy. Required. :type policy_name: str @@ -504,7 +485,8 @@ def begin_create_or_update( ) -> LROPoller[_models.CdnWebApplicationFirewallPolicy]: """Create or update policy with specified rule set name within a resource group. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param policy_name: The name of the CdnWebApplicationFirewallPolicy. Required. :type policy_name: str @@ -529,7 +511,8 @@ def begin_create_or_update( ) -> LROPoller[_models.CdnWebApplicationFirewallPolicy]: """Create or update policy with specified rule set name within a resource group. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param policy_name: The name of the CdnWebApplicationFirewallPolicy. Required. :type policy_name: str @@ -563,10 +546,11 @@ def begin_create_or_update( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CdnWebApplicationFirewallPolicy", pipeline_response) + deserialized = self._deserialize("CdnWebApplicationFirewallPolicy", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized @@ -596,8 +580,8 @@ def _update_initial( _models.CdnWebApplicationFirewallPolicyPatchParameters, IO[bytes] ], **kwargs: Any - ) -> _models.CdnWebApplicationFirewallPolicy: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -610,7 +594,7 @@ def _update_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CdnWebApplicationFirewallPolicy] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -633,10 +617,10 @@ def _update_initial( headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) @@ -644,18 +628,22 @@ def _update_initial( response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("CdnWebApplicationFirewallPolicy", pipeline_response) - if response.status_code == 202: response_headers["location"] = self._deserialize("str", response.headers.get("location")) - deserialized = self._deserialize("CdnWebApplicationFirewallPolicy", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore @@ -675,7 +663,8 @@ def begin_update( """Update an existing CdnWebApplicationFirewallPolicy with the specified policy name under the specified subscription and resource group. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param policy_name: The name of the CdnWebApplicationFirewallPolicy. Required. :type policy_name: str @@ -705,7 +694,8 @@ def begin_update( """Update an existing CdnWebApplicationFirewallPolicy with the specified policy name under the specified subscription and resource group. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param policy_name: The name of the CdnWebApplicationFirewallPolicy. Required. :type policy_name: str @@ -734,7 +724,8 @@ def begin_update( """Update an existing CdnWebApplicationFirewallPolicy with the specified policy name under the specified subscription and resource group. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param policy_name: The name of the CdnWebApplicationFirewallPolicy. Required. :type policy_name: str @@ -769,10 +760,11 @@ def begin_update( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CdnWebApplicationFirewallPolicy", pipeline_response) + deserialized = self._deserialize("CdnWebApplicationFirewallPolicy", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized @@ -800,7 +792,8 @@ def delete( # pylint: disable=inconsistent-return-statements ) -> None: """Deletes Policy. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param policy_name: The name of the CdnWebApplicationFirewallPolicy. Required. :type policy_name: str @@ -808,7 +801,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -830,7 +823,6 @@ def delete( # pylint: disable=inconsistent-return-statements headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False @@ -842,7 +834,10 @@ def delete( # pylint: disable=inconsistent-return-statements if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_profiles_operations.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_profiles_operations.py index 6a16d3bf4d1d..49970f9f4282 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_profiles_operations.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_profiles_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,39 +6,38 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Iterable, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, ResourceNotModifiedError, + StreamClosedError, + StreamConsumedError, map_error, ) from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpResponse from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest +from azure.core.rest import HttpRequest, HttpResponse from azure.core.tracing.decorator import distributed_trace from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling from .. import models as _models -from .._serialization import Serializer -from .._vendor import CdnManagementClientMixinABC, _convert_request +from .._configuration import CdnManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -48,7 +47,7 @@ def build_list_request(subscription_id: str, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -72,17 +71,17 @@ def build_list_by_resource_group_request(resource_group_name: str, subscription_ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._\(\)]+$" + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 ), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), } @@ -102,17 +101,17 @@ def build_get_request(resource_group_name: str, profile_name: str, subscription_ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._\(\)]+$" + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 ), "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), @@ -135,7 +134,7 @@ def build_create_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -143,10 +142,10 @@ def build_create_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._\(\)]+$" + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 ), "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), @@ -171,7 +170,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -179,10 +178,10 @@ def build_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._\(\)]+$" + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 ), "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), @@ -207,17 +206,17 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._\(\)]+$" + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 ), "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), @@ -238,7 +237,7 @@ def build_can_migrate_request(resource_group_name: str, subscription_id: str, ** _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -246,10 +245,10 @@ def build_can_migrate_request(resource_group_name: str, subscription_id: str, ** _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/canMigrate", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._\(\)]+$" + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 ), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), } @@ -271,7 +270,7 @@ def build_migrate_request(resource_group_name: str, subscription_id: str, **kwar _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -279,10 +278,10 @@ def build_migrate_request(resource_group_name: str, subscription_id: str, **kwar _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/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\._\(\)]+$" + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 ), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), } @@ -306,17 +305,17 @@ def build_migration_commit_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/migrationCommit", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._\(\)]+$" + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 ), "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), @@ -339,17 +338,17 @@ def build_generate_sso_uri_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/generateSsoUri", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._\(\)]+$" + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 ), "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), @@ -372,17 +371,17 @@ def build_list_supported_optimization_types_request( # pylint: disable=name-too _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/getSupportedOptimizationTypes", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._\(\)]+$" + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 ), "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), @@ -405,17 +404,17 @@ def build_list_resource_usage_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/checkResourceUsage", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._\(\)]+$" + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 ), "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), @@ -432,7 +431,115 @@ def build_list_resource_usage_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -class ProfilesOperations: +def build_cdn_can_migrate_to_afd_request( + resource_group_name: str, profile_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/cdnCanMigrateToAfd", + ) + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "profileName": _SERIALIZER.url( + "profile_name", profile_name, "str", max_length=260, min_length=1, pattern=r"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_cdn_migrate_to_afd_request( + resource_group_name: str, profile_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/cdnMigrateToAfd", + ) + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "profileName": _SERIALIZER.url( + "profile_name", profile_name, "str", max_length=260, min_length=1, pattern=r"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_migration_abort_request( + resource_group_name: str, profile_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/migrationAbort", + ) + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "profileName": _SERIALIZER.url( + "profile_name", profile_name, "str", max_length=260, min_length=1, pattern=r"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +class ProfilesOperations: # pylint: disable=too-many-public-methods """ .. warning:: **DO NOT** instantiate this class directly. @@ -444,15 +551,15 @@ class ProfilesOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CdnManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace - def list(self, **kwargs: Any) -> Iterable["_models.Profile"]: + def list(self, **kwargs: Any) -> ItemPaged["_models.Profile"]: """Lists all of the Azure Front Door Standard, Azure Front Door Premium, and CDN profiles within an Azure subscription. @@ -466,7 +573,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Profile"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ProfileListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -483,7 +590,6 @@ def prepare_request(next_link=None): headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) else: @@ -499,7 +605,6 @@ def prepare_request(next_link=None): _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _request.method = "GET" return _request @@ -522,7 +627,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -530,11 +638,12 @@ def get_next(next_link=None): return ItemPaged(get_next, extract_data) @distributed_trace - def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Profile"]: + def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> ItemPaged["_models.Profile"]: """Lists all of the Azure Front Door Standard, Azure Front Door Premium, and CDN profiles within a resource group. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :return: An iterator like instance of either Profile or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cdn.models.Profile] @@ -546,7 +655,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ProfileListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -564,7 +673,6 @@ def prepare_request(next_link=None): headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) else: @@ -580,7 +688,6 @@ def prepare_request(next_link=None): _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _request.method = "GET" return _request @@ -603,7 +710,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -615,7 +725,8 @@ def get(self, resource_group_name: str, profile_name: str, **kwargs: Any) -> _mo """Gets an Azure Front Door Standard or Azure Front Door Premium or CDN profile with the specified profile name under the specified subscription and resource group. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the resource group. Required. @@ -624,7 +735,7 @@ def get(self, resource_group_name: str, profile_name: str, **kwargs: Any) -> _mo :rtype: ~azure.mgmt.cdn.models.Profile :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -646,7 +757,6 @@ def get(self, resource_group_name: str, profile_name: str, **kwargs: Any) -> _mo headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False @@ -658,10 +768,13 @@ def get(self, resource_group_name: str, profile_name: str, **kwargs: Any) -> _mo if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("Profile", pipeline_response) + deserialized = self._deserialize("Profile", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -670,8 +783,8 @@ def get(self, resource_group_name: str, profile_name: str, **kwargs: Any) -> _mo def _create_initial( self, resource_group_name: str, profile_name: str, profile: Union[_models.Profile, IO[bytes]], **kwargs: Any - ) -> _models.Profile: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -684,7 +797,7 @@ def _create_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.Profile] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -705,10 +818,10 @@ def _create_initial( headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) @@ -716,21 +829,22 @@ def _create_initial( response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("Profile", pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize("Profile", pipeline_response) - if response.status_code == 202: response_headers["location"] = self._deserialize("str", response.headers.get("location")) - deserialized = self._deserialize("Profile", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore @@ -750,7 +864,8 @@ def begin_create( """Creates a new Azure Front Door Standard or Azure Front Door Premium or CDN profile with a profile name under the specified subscription and resource group. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the resource group. Required. @@ -778,7 +893,8 @@ def begin_create( """Creates a new Azure Front Door Standard or Azure Front Door Premium or CDN profile with a profile name under the specified subscription and resource group. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the resource group. Required. @@ -800,7 +916,8 @@ def begin_create( """Creates a new Azure Front Door Standard or Azure Front Door Premium or CDN profile with a profile name under the specified subscription and resource group. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the resource group. Required. @@ -833,10 +950,11 @@ def begin_create( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("Profile", pipeline_response) + deserialized = self._deserialize("Profile", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized @@ -864,8 +982,8 @@ def _update_initial( profile_name: str, profile_update_parameters: Union[_models.ProfileUpdateParameters, IO[bytes]], **kwargs: Any - ) -> _models.Profile: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -878,7 +996,7 @@ def _update_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.Profile] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -899,10 +1017,10 @@ def _update_initial( headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) @@ -910,18 +1028,22 @@ def _update_initial( response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("Profile", pipeline_response) - if response.status_code == 202: response_headers["location"] = self._deserialize("str", response.headers.get("location")) - deserialized = self._deserialize("Profile", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore @@ -941,7 +1063,8 @@ def begin_update( """Updates an existing Azure Front Door Standard or Azure Front Door Premium or CDN profile with the specified profile name under the specified subscription and resource group. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the resource group. Required. @@ -970,7 +1093,8 @@ def begin_update( """Updates an existing Azure Front Door Standard or Azure Front Door Premium or CDN profile with the specified profile name under the specified subscription and resource group. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the resource group. Required. @@ -997,7 +1121,8 @@ def begin_update( """Updates an existing Azure Front Door Standard or Azure Front Door Premium or CDN profile with the specified profile name under the specified subscription and resource group. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the resource group. Required. @@ -1030,10 +1155,11 @@ def begin_update( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("Profile", pipeline_response) + deserialized = self._deserialize("Profile", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized @@ -1055,10 +1181,8 @@ def get_long_running_output(pipeline_response): self._client, raw_result, get_long_running_output, polling_method # type: ignore ) - def _delete_initial( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, profile_name: str, **kwargs: Any - ) -> None: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + def _delete_initial(self, resource_group_name: str, profile_name: str, **kwargs: Any) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1070,7 +1194,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) _request = build_delete_request( resource_group_name=resource_group_name, @@ -1080,10 +1204,10 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) @@ -1091,16 +1215,27 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} if response.status_code == 202: response_headers["location"] = self._deserialize("str", response.headers.get("location")) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + if cls: - return cls(pipeline_response, None, response_headers) # type: ignore + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore @distributed_trace def begin_delete(self, resource_group_name: str, profile_name: str, **kwargs: Any) -> LROPoller[None]: @@ -1108,7 +1243,8 @@ def begin_delete(self, resource_group_name: str, profile_name: str, **kwargs: An the specified parameters. Deleting a profile will result in the deletion of all of the sub-resources including endpoints, origins and custom domains. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the resource group. Required. @@ -1126,7 +1262,7 @@ def begin_delete(self, resource_group_name: str, profile_name: str, **kwargs: An lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: - raw_result = self._delete_initial( # type: ignore + raw_result = self._delete_initial( resource_group_name=resource_group_name, profile_name=profile_name, api_version=api_version, @@ -1135,6 +1271,7 @@ def begin_delete(self, resource_group_name: str, profile_name: str, **kwargs: An params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements @@ -1161,8 +1298,8 @@ def _can_migrate_initial( resource_group_name: str, can_migrate_parameters: Union[_models.CanMigrateParameters, IO[bytes]], **kwargs: Any - ) -> Optional[_models.CanMigrateResult]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1175,7 +1312,7 @@ def _can_migrate_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Optional[_models.CanMigrateResult]] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -1195,10 +1332,10 @@ def _can_migrate_initial( headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) @@ -1206,18 +1343,23 @@ def _can_migrate_initial( response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = None response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("CanMigrateResult", pipeline_response) - if response.status_code == 202: response_headers["location"] = self._deserialize("str", response.headers.get("location")) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore @@ -1234,7 +1376,8 @@ def begin_can_migrate( ) -> LROPoller[_models.CanMigrateResult]: """Checks if CDN profile can be migrated to Azure Frontdoor(Standard/Premium) profile. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param can_migrate_parameters: Properties needed to check if cdn profile or classic frontdoor can be migrated. Required. @@ -1259,7 +1402,8 @@ def begin_can_migrate( ) -> LROPoller[_models.CanMigrateResult]: """Checks if CDN profile can be migrated to Azure Frontdoor(Standard/Premium) profile. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param can_migrate_parameters: Properties needed to check if cdn profile or classic frontdoor can be migrated. Required. @@ -1282,7 +1426,8 @@ def begin_can_migrate( ) -> LROPoller[_models.CanMigrateResult]: """Checks if CDN profile can be migrated to Azure Frontdoor(Standard/Premium) profile. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param can_migrate_parameters: Properties needed to check if cdn profile or classic frontdoor can be migrated. Is either a CanMigrateParameters type or a IO[bytes] type. Required. @@ -1312,10 +1457,11 @@ def begin_can_migrate( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CanMigrateResult", pipeline_response) + deserialized = self._deserialize("CanMigrateResult", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized @@ -1344,8 +1490,8 @@ def _migrate_initial( resource_group_name: str, migration_parameters: Union[_models.MigrationParameters, IO[bytes]], **kwargs: Any - ) -> _models.MigrateResult: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1358,7 +1504,7 @@ def _migrate_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.MigrateResult] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -1378,10 +1524,10 @@ def _migrate_initial( headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) @@ -1389,18 +1535,22 @@ def _migrate_initial( response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("MigrateResult", pipeline_response) - if response.status_code == 202: response_headers["location"] = self._deserialize("str", response.headers.get("location")) - deserialized = self._deserialize("MigrateResult", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore @@ -1419,7 +1569,8 @@ def begin_migrate( """Migrate the CDN profile to Azure Frontdoor(Standard/Premium) profile. The change need to be committed after this. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param migration_parameters: Properties needed to migrate the profile. Required. :type migration_parameters: ~azure.mgmt.cdn.models.MigrationParameters @@ -1444,7 +1595,8 @@ def begin_migrate( """Migrate the CDN profile to Azure Frontdoor(Standard/Premium) profile. The change need to be committed after this. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param migration_parameters: Properties needed to migrate the profile. Required. :type migration_parameters: IO[bytes] @@ -1467,7 +1619,8 @@ def begin_migrate( """Migrate the CDN profile to Azure Frontdoor(Standard/Premium) profile. The change need to be committed after this. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param migration_parameters: Properties needed to migrate the profile. Is either a MigrationParameters type or a IO[bytes] type. Required. @@ -1497,10 +1650,11 @@ def begin_migrate( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("MigrateResult", pipeline_response) + deserialized = self._deserialize("MigrateResult", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized @@ -1524,10 +1678,8 @@ def get_long_running_output(pipeline_response): self._client, raw_result, get_long_running_output, polling_method # type: ignore ) - def _migration_commit_initial( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, profile_name: str, **kwargs: Any - ) -> None: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + def _migration_commit_initial(self, resource_group_name: str, profile_name: str, **kwargs: Any) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1539,7 +1691,7 @@ def _migration_commit_initial( # pylint: disable=inconsistent-return-statements _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) _request = build_migration_commit_request( resource_group_name=resource_group_name, @@ -1549,10 +1701,10 @@ def _migration_commit_initial( # pylint: disable=inconsistent-return-statements headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) @@ -1560,22 +1712,34 @@ def _migration_commit_initial( # pylint: disable=inconsistent-return-statements response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} if response.status_code == 202: response_headers["location"] = self._deserialize("str", response.headers.get("location")) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + if cls: - return cls(pipeline_response, None, response_headers) # type: ignore + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore @distributed_trace def begin_migration_commit(self, resource_group_name: str, profile_name: str, **kwargs: Any) -> LROPoller[None]: """Commit the migrated Azure Frontdoor(Standard/Premium) profile. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the CDN profile which is unique within the resource group. Required. @@ -1593,7 +1757,7 @@ def begin_migration_commit(self, resource_group_name: str, profile_name: str, ** lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: - raw_result = self._migration_commit_initial( # type: ignore + raw_result = self._migration_commit_initial( resource_group_name=resource_group_name, profile_name=profile_name, api_version=api_version, @@ -1602,6 +1766,7 @@ def begin_migration_commit(self, resource_group_name: str, profile_name: str, ** params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements @@ -1633,7 +1798,8 @@ def generate_sso_uri(self, resource_group_name: str, profile_name: str, **kwargs real-time stats and alerts in a premium profile. The SSO URI changes approximately every 10 minutes. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the CDN profile which is unique within the resource group. Required. @@ -1642,7 +1808,7 @@ def generate_sso_uri(self, resource_group_name: str, profile_name: str, **kwargs :rtype: ~azure.mgmt.cdn.models.SsoUri :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1664,7 +1830,6 @@ def generate_sso_uri(self, resource_group_name: str, profile_name: str, **kwargs headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False @@ -1676,10 +1841,13 @@ def generate_sso_uri(self, resource_group_name: str, profile_name: str, **kwargs if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("SsoUri", pipeline_response) + deserialized = self._deserialize("SsoUri", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -1693,7 +1861,8 @@ def list_supported_optimization_types( """Gets the supported optimization types for the current profile. A user can create an endpoint with an optimization type from the listed values. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the resource group. Required. @@ -1702,7 +1871,7 @@ def list_supported_optimization_types( :rtype: ~azure.mgmt.cdn.models.SupportedOptimizationTypesListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1724,7 +1893,6 @@ def list_supported_optimization_types( headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False @@ -1736,10 +1904,13 @@ def list_supported_optimization_types( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("SupportedOptimizationTypesListResult", pipeline_response) + deserialized = self._deserialize("SupportedOptimizationTypesListResult", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -1749,11 +1920,12 @@ def list_supported_optimization_types( @distributed_trace def list_resource_usage( self, resource_group_name: str, profile_name: str, **kwargs: Any - ) -> Iterable["_models.ResourceUsage"]: + ) -> ItemPaged["_models.ResourceUsage"]: """Checks the quota and actual usage of endpoints under the given Azure Front Door Standard or Azure Front Door Premium or CDN profile. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the resource group. Required. @@ -1768,7 +1940,7 @@ def list_resource_usage( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ResourceUsageListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1787,7 +1959,6 @@ def prepare_request(next_link=None): headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) else: @@ -1803,7 +1974,6 @@ def prepare_request(next_link=None): _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _request.method = "GET" return _request @@ -1826,9 +1996,452 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return ItemPaged(get_next, extract_data) + + def _cdn_can_migrate_to_afd_initial( + self, resource_group_name: str, profile_name: str, **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_cdn_can_migrate_to_afd_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_cdn_can_migrate_to_afd( + self, resource_group_name: str, profile_name: str, **kwargs: Any + ) -> LROPoller[_models.CanMigrateResult]: + """Checks if CDN profile can be migrated to Azure Frontdoor(Standard/Premium) profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. + :type profile_name: str + :return: An instance of LROPoller that returns either CanMigrateResult or the result of + cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.CanMigrateResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + cls: ClsType[_models.CanMigrateResult] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._cdn_can_migrate_to_afd_initial( + resource_group_name=resource_group_name, + profile_name=profile_name, + api_version=api_version, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("CanMigrateResult", pipeline_response.http_response) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.CanMigrateResult].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.CanMigrateResult]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _cdn_migrate_to_afd_initial( + self, + resource_group_name: str, + profile_name: str, + migration_parameters: Union[_models.CdnMigrationToAfdParameters, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(migration_parameters, (IOBase, bytes)): + _content = migration_parameters + else: + _json = self._serialize.body(migration_parameters, "CdnMigrationToAfdParameters") + + _request = build_cdn_migrate_to_afd_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_cdn_migrate_to_afd( + self, + resource_group_name: str, + profile_name: str, + migration_parameters: _models.CdnMigrationToAfdParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.MigrateResult]: + """Migrate the CDN profile to Azure Frontdoor(Standard/Premium) profile. This step prepares the + profile for migration and will be followed by Commit to finalize the migration. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. + :type profile_name: str + :param migration_parameters: Properties needed to migrate the profile. Required. + :type migration_parameters: ~azure.mgmt.cdn.models.CdnMigrationToAfdParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns either MigrateResult or the result of + cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.MigrateResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_cdn_migrate_to_afd( + self, + resource_group_name: str, + profile_name: str, + migration_parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.MigrateResult]: + """Migrate the CDN profile to Azure Frontdoor(Standard/Premium) profile. This step prepares the + profile for migration and will be followed by Commit to finalize the migration. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. + :type profile_name: str + :param migration_parameters: Properties needed to migrate the profile. Required. + :type migration_parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns either MigrateResult or the result of + cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.MigrateResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_cdn_migrate_to_afd( + self, + resource_group_name: str, + profile_name: str, + migration_parameters: Union[_models.CdnMigrationToAfdParameters, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.MigrateResult]: + """Migrate the CDN profile to Azure Frontdoor(Standard/Premium) profile. This step prepares the + profile for migration and will be followed by Commit to finalize the migration. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. + :type profile_name: str + :param migration_parameters: Properties needed to migrate the profile. Is either a + CdnMigrationToAfdParameters type or a IO[bytes] type. Required. + :type migration_parameters: ~azure.mgmt.cdn.models.CdnMigrationToAfdParameters or IO[bytes] + :return: An instance of LROPoller that returns either MigrateResult or the result of + cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.MigrateResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.MigrateResult] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._cdn_migrate_to_afd_initial( + resource_group_name=resource_group_name, + profile_name=profile_name, + migration_parameters=migration_parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("MigrateResult", pipeline_response.http_response) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.MigrateResult].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.MigrateResult]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _migration_abort_initial(self, resource_group_name: str, profile_name: str, **kwargs: Any) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_migration_abort_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_migration_abort(self, resource_group_name: str, profile_name: str, **kwargs: Any) -> LROPoller[None]: + """Abort the migration to Azure Frontdoor Premium/Standard. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. + :type profile_name: str + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._migration_abort_initial( + resource_group_name=resource_group_name, + profile_name=profile_name, + api_version=api_version, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_resource_usage_operations.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_resource_usage_operations.py index cadf0a85721a..a495f1961691 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_resource_usage_operations.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_resource_usage_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,10 +5,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys -from typing import Any, Callable, Dict, Iterable, Optional, Type, TypeVar +from collections.abc import MutableMapping +from typing import Any, Callable, Optional, TypeVar import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -20,22 +20,18 @@ ) from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpResponse -from azure.core.rest import HttpRequest +from azure.core.rest import HttpRequest, HttpResponse from azure.core.tracing.decorator import distributed_trace from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer -from .._vendor import CdnManagementClientMixinABC, _convert_request +from .._configuration import CdnManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -45,7 +41,7 @@ def build_list_request(subscription_id: str, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -77,15 +73,15 @@ class ResourceUsageOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CdnManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace - def list(self, **kwargs: Any) -> Iterable["_models.ResourceUsage"]: + def list(self, **kwargs: Any) -> ItemPaged["_models.ResourceUsage"]: """Check the quota and actual usage of the CDN profiles under the given subscription. :return: An iterator like instance of either ResourceUsage or the result of cls(response) @@ -98,7 +94,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.ResourceUsage"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ResourceUsageListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -115,7 +111,6 @@ def prepare_request(next_link=None): headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) else: @@ -131,7 +126,6 @@ def prepare_request(next_link=None): _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _request.method = "GET" return _request @@ -154,7 +148,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_routes_operations.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_routes_operations.py index 0b9de673cfe5..269e4d0b86ec 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_routes_operations.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_routes_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,39 +6,38 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Iterable, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, ResourceNotModifiedError, + StreamClosedError, + StreamConsumedError, map_error, ) from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpResponse from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest +from azure.core.rest import HttpRequest, HttpResponse from azure.core.tracing.decorator import distributed_trace from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling from .. import models as _models -from .._serialization import Serializer -from .._vendor import CdnManagementClientMixinABC, _convert_request +from .._configuration import CdnManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -50,19 +49,21 @@ def build_list_by_endpoint_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints/{endpointName}/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\._\(\)]+$" + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "profileName": _SERIALIZER.url( + "profile_name", profile_name, "str", max_length=260, min_length=1, pattern=r"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$" ), - "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, "str"), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), } @@ -89,19 +90,21 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints/{endpointName}/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\._\(\)]+$" + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "profileName": _SERIALIZER.url( + "profile_name", profile_name, "str", max_length=260, min_length=1, pattern=r"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$" ), - "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, "str"), "routeName": _SERIALIZER.url("route_name", route_name, "str"), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), @@ -129,7 +132,7 @@ def build_create_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -137,12 +140,14 @@ def build_create_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints/{endpointName}/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\._\(\)]+$" + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "profileName": _SERIALIZER.url( + "profile_name", profile_name, "str", max_length=260, min_length=1, pattern=r"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$" ), - "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, "str"), "routeName": _SERIALIZER.url("route_name", route_name, "str"), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), @@ -172,7 +177,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -180,12 +185,14 @@ def build_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints/{endpointName}/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\._\(\)]+$" + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "profileName": _SERIALIZER.url( + "profile_name", profile_name, "str", max_length=260, min_length=1, pattern=r"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$" ), - "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, "str"), "routeName": _SERIALIZER.url("route_name", route_name, "str"), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), @@ -215,19 +222,21 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints/{endpointName}/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\._\(\)]+$" + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "profileName": _SERIALIZER.url( + "profile_name", profile_name, "str", max_length=260, min_length=1, pattern=r"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$" ), - "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, "str"), "routeName": _SERIALIZER.url("route_name", route_name, "str"), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), @@ -256,23 +265,24 @@ class RoutesOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CdnManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_endpoint( self, resource_group_name: str, profile_name: str, endpoint_name: str, **kwargs: Any - ) -> Iterable["_models.Route"]: + ) -> ItemPaged["_models.Route"]: """Lists all of the existing origins within a profile. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param endpoint_name: Name of the endpoint under the profile which is unique globally. Required. @@ -287,7 +297,7 @@ def list_by_endpoint( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.RouteListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -307,7 +317,6 @@ def prepare_request(next_link=None): headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) else: @@ -323,7 +332,6 @@ def prepare_request(next_link=None): _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _request.method = "GET" return _request @@ -346,7 +354,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -360,10 +371,11 @@ def get( """Gets an existing route with the specified route name under the specified subscription, resource group, profile, and AzureFrontDoor endpoint. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param endpoint_name: Name of the endpoint under the profile which is unique globally. Required. @@ -374,7 +386,7 @@ def get( :rtype: ~azure.mgmt.cdn.models.Route :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -398,7 +410,6 @@ def get( headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False @@ -410,10 +421,13 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("Route", pipeline_response) + deserialized = self._deserialize("Route", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -428,8 +442,8 @@ def _create_initial( route_name: str, route: Union[_models.Route, IO[bytes]], **kwargs: Any - ) -> _models.Route: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -442,7 +456,7 @@ def _create_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.Route] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -465,10 +479,10 @@ def _create_initial( headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) @@ -476,21 +490,22 @@ def _create_initial( response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("Route", pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize("Route", pipeline_response) - if response.status_code == 202: response_headers["location"] = self._deserialize("str", response.headers.get("location")) - deserialized = self._deserialize("Route", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore @@ -512,10 +527,11 @@ def begin_create( """Creates a new route with the specified route name under the specified subscription, resource group, profile, and AzureFrontDoor endpoint. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param endpoint_name: Name of the endpoint under the profile which is unique globally. Required. @@ -547,10 +563,11 @@ def begin_create( """Creates a new route with the specified route name under the specified subscription, resource group, profile, and AzureFrontDoor endpoint. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param endpoint_name: Name of the endpoint under the profile which is unique globally. Required. @@ -580,10 +597,11 @@ def begin_create( """Creates a new route with the specified route name under the specified subscription, resource group, profile, and AzureFrontDoor endpoint. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param endpoint_name: Name of the endpoint under the profile which is unique globally. Required. @@ -619,10 +637,11 @@ def begin_create( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("Route", pipeline_response) + deserialized = self._deserialize("Route", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized @@ -654,8 +673,8 @@ def _update_initial( route_name: str, route_update_properties: Union[_models.RouteUpdateParameters, IO[bytes]], **kwargs: Any - ) -> _models.Route: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -668,7 +687,7 @@ def _update_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.Route] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -691,10 +710,10 @@ def _update_initial( headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) @@ -702,18 +721,22 @@ def _update_initial( response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("Route", pipeline_response) - if response.status_code == 202: response_headers["location"] = self._deserialize("str", response.headers.get("location")) - deserialized = self._deserialize("Route", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore @@ -735,10 +758,11 @@ def begin_update( """Updates an existing route with the specified route name under the specified subscription, resource group, profile, and AzureFrontDoor endpoint. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param endpoint_name: Name of the endpoint under the profile which is unique globally. Required. @@ -770,10 +794,11 @@ def begin_update( """Updates an existing route with the specified route name under the specified subscription, resource group, profile, and AzureFrontDoor endpoint. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param endpoint_name: Name of the endpoint under the profile which is unique globally. Required. @@ -803,10 +828,11 @@ def begin_update( """Updates an existing route with the specified route name under the specified subscription, resource group, profile, and AzureFrontDoor endpoint. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param endpoint_name: Name of the endpoint under the profile which is unique globally. Required. @@ -843,10 +869,11 @@ def begin_update( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("Route", pipeline_response) + deserialized = self._deserialize("Route", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized @@ -870,10 +897,10 @@ def get_long_running_output(pipeline_response): self._client, raw_result, get_long_running_output, polling_method # type: ignore ) - def _delete_initial( # pylint: disable=inconsistent-return-statements + def _delete_initial( self, resource_group_name: str, profile_name: str, endpoint_name: str, route_name: str, **kwargs: Any - ) -> None: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -885,7 +912,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) _request = build_delete_request( resource_group_name=resource_group_name, @@ -897,10 +924,10 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) @@ -908,16 +935,27 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} if response.status_code == 202: response_headers["location"] = self._deserialize("str", response.headers.get("location")) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + if cls: - return cls(pipeline_response, None, response_headers) # type: ignore + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore @distributed_trace def begin_delete( @@ -926,10 +964,11 @@ def begin_delete( """Deletes an existing route with the specified route name under the specified subscription, resource group, profile, and AzureFrontDoor endpoint. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param endpoint_name: Name of the endpoint under the profile which is unique globally. Required. @@ -949,7 +988,7 @@ def begin_delete( lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: - raw_result = self._delete_initial( # type: ignore + raw_result = self._delete_initial( resource_group_name=resource_group_name, profile_name=profile_name, endpoint_name=endpoint_name, @@ -960,6 +999,7 @@ def begin_delete( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_rule_sets_operations.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_rule_sets_operations.py index 4f4fb842dd03..6afea4091920 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_rule_sets_operations.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_rule_sets_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,38 +6,37 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys -from typing import Any, Callable, Dict, Iterable, Optional, Type, TypeVar, Union, cast +from collections.abc import MutableMapping +from typing import Any, Callable, Iterator, Optional, TypeVar, Union, cast import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, ResourceNotModifiedError, + StreamClosedError, + StreamConsumedError, map_error, ) from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpResponse from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest +from azure.core.rest import HttpRequest, HttpResponse from azure.core.tracing.decorator import distributed_trace from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling from .. import models as _models -from .._serialization import Serializer -from .._vendor import CdnManagementClientMixinABC, _convert_request +from .._configuration import CdnManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -49,19 +48,21 @@ def build_list_by_profile_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/ruleSets", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._\(\)]+$" + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "profileName": _SERIALIZER.url( + "profile_name", profile_name, "str", max_length=260, min_length=1, pattern=r"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$" ), - "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), } @@ -82,19 +83,21 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/ruleSets/{ruleSetName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._\(\)]+$" + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "profileName": _SERIALIZER.url( + "profile_name", profile_name, "str", max_length=260, min_length=1, pattern=r"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$" ), - "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), "ruleSetName": _SERIALIZER.url("rule_set_name", rule_set_name, "str"), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), } @@ -116,19 +119,21 @@ def build_create_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/ruleSets/{ruleSetName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._\(\)]+$" + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "profileName": _SERIALIZER.url( + "profile_name", profile_name, "str", max_length=260, min_length=1, pattern=r"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$" ), - "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), "ruleSetName": _SERIALIZER.url("rule_set_name", rule_set_name, "str"), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), } @@ -150,19 +155,21 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/ruleSets/{ruleSetName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._\(\)]+$" + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "profileName": _SERIALIZER.url( + "profile_name", profile_name, "str", max_length=260, min_length=1, pattern=r"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$" ), - "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), "ruleSetName": _SERIALIZER.url("rule_set_name", rule_set_name, "str"), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), } @@ -184,19 +191,21 @@ def build_list_resource_usage_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/ruleSets/{ruleSetName}/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\._\(\)]+$" + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "profileName": _SERIALIZER.url( + "profile_name", profile_name, "str", max_length=260, min_length=1, pattern=r"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$" ), - "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), "ruleSetName": _SERIALIZER.url("rule_set_name", rule_set_name, "str"), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), } @@ -224,23 +233,24 @@ class RuleSetsOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CdnManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_profile( self, resource_group_name: str, profile_name: str, **kwargs: Any - ) -> Iterable["_models.RuleSet"]: + ) -> ItemPaged["_models.RuleSet"]: """Lists existing AzureFrontDoor rule sets within a profile. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :return: An iterator like instance of either RuleSet or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cdn.models.RuleSet] @@ -252,7 +262,7 @@ def list_by_profile( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.RuleSetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -271,7 +281,6 @@ def prepare_request(next_link=None): headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) else: @@ -287,7 +296,6 @@ def prepare_request(next_link=None): _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _request.method = "GET" return _request @@ -310,7 +318,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -322,10 +333,11 @@ def get(self, resource_group_name: str, profile_name: str, rule_set_name: str, * """Gets an existing AzureFrontDoor rule set with the specified rule set name under the specified subscription, resource group and profile. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param rule_set_name: Name of the rule set under the profile which is unique globally. Required. @@ -334,7 +346,7 @@ def get(self, resource_group_name: str, profile_name: str, rule_set_name: str, * :rtype: ~azure.mgmt.cdn.models.RuleSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -357,7 +369,6 @@ def get(self, resource_group_name: str, profile_name: str, rule_set_name: str, * headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False @@ -369,10 +380,13 @@ def get(self, resource_group_name: str, profile_name: str, rule_set_name: str, * if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("RuleSet", pipeline_response) + deserialized = self._deserialize("RuleSet", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -383,10 +397,11 @@ def get(self, resource_group_name: str, profile_name: str, rule_set_name: str, * def create(self, resource_group_name: str, profile_name: str, rule_set_name: str, **kwargs: Any) -> _models.RuleSet: """Creates a new rule set within the specified profile. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param rule_set_name: Name of the rule set under the profile which is unique globally. Required. @@ -395,7 +410,7 @@ def create(self, resource_group_name: str, profile_name: str, rule_set_name: str :rtype: ~azure.mgmt.cdn.models.RuleSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -418,7 +433,6 @@ def create(self, resource_group_name: str, profile_name: str, rule_set_name: str headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False @@ -430,24 +444,23 @@ def create(self, resource_group_name: str, profile_name: str, rule_set_name: str if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - if response.status_code == 200: - deserialized = self._deserialize("RuleSet", pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize("RuleSet", pipeline_response) + deserialized = self._deserialize("RuleSet", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore - def _delete_initial( # pylint: disable=inconsistent-return-statements + def _delete_initial( self, resource_group_name: str, profile_name: str, rule_set_name: str, **kwargs: Any - ) -> None: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -459,7 +472,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) _request = build_delete_request( resource_group_name=resource_group_name, @@ -470,10 +483,10 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) @@ -481,16 +494,27 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} if response.status_code == 202: response_headers["location"] = self._deserialize("str", response.headers.get("location")) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + if cls: - return cls(pipeline_response, None, response_headers) # type: ignore + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore @distributed_trace def begin_delete( @@ -499,10 +523,11 @@ def begin_delete( """Deletes an existing AzureFrontDoor rule set with the specified rule set name under the specified subscription, resource group and profile. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param rule_set_name: Name of the rule set under the profile which is unique globally. Required. @@ -520,7 +545,7 @@ def begin_delete( lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: - raw_result = self._delete_initial( # type: ignore + raw_result = self._delete_initial( resource_group_name=resource_group_name, profile_name=profile_name, rule_set_name=rule_set_name, @@ -530,6 +555,7 @@ def begin_delete( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements @@ -556,13 +582,14 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- @distributed_trace def list_resource_usage( self, resource_group_name: str, profile_name: str, rule_set_name: str, **kwargs: Any - ) -> Iterable["_models.Usage"]: + ) -> ItemPaged["_models.Usage"]: """Checks the quota and actual usage of endpoints under the given Azure Front Door profile.. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param rule_set_name: Name of the rule set under the profile which is unique globally. Required. @@ -577,7 +604,7 @@ def list_resource_usage( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.UsagesListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -597,7 +624,6 @@ def prepare_request(next_link=None): headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) else: @@ -613,7 +639,6 @@ def prepare_request(next_link=None): _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _request.method = "GET" return _request @@ -636,7 +661,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_rules_operations.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_rules_operations.py index 02f15c6f1378..6a4980bc4f1e 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_rules_operations.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_rules_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,39 +6,38 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Iterable, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, ResourceNotModifiedError, + StreamClosedError, + StreamConsumedError, map_error, ) from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpResponse from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest +from azure.core.rest import HttpRequest, HttpResponse from azure.core.tracing.decorator import distributed_trace from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling from .. import models as _models -from .._serialization import Serializer -from .._vendor import CdnManagementClientMixinABC, _convert_request +from .._configuration import CdnManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -50,19 +49,21 @@ def build_list_by_rule_set_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/ruleSets/{ruleSetName}/rules", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._\(\)]+$" + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "profileName": _SERIALIZER.url( + "profile_name", profile_name, "str", max_length=260, min_length=1, pattern=r"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$" ), - "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), "ruleSetName": _SERIALIZER.url("rule_set_name", rule_set_name, "str"), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), } @@ -84,19 +85,21 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/ruleSets/{ruleSetName}/rules/{ruleName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._\(\)]+$" + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "profileName": _SERIALIZER.url( + "profile_name", profile_name, "str", max_length=260, min_length=1, pattern=r"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$" ), - "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), "ruleSetName": _SERIALIZER.url("rule_set_name", rule_set_name, "str"), "ruleName": _SERIALIZER.url("rule_name", rule_name, "str"), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), @@ -119,7 +122,7 @@ def build_create_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -127,12 +130,14 @@ def build_create_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/ruleSets/{ruleSetName}/rules/{ruleName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._\(\)]+$" + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "profileName": _SERIALIZER.url( + "profile_name", profile_name, "str", max_length=260, min_length=1, pattern=r"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$" ), - "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), "ruleSetName": _SERIALIZER.url("rule_set_name", rule_set_name, "str"), "ruleName": _SERIALIZER.url("rule_name", rule_name, "str"), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), @@ -157,7 +162,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -165,12 +170,14 @@ def build_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/ruleSets/{ruleSetName}/rules/{ruleName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._\(\)]+$" + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "profileName": _SERIALIZER.url( + "profile_name", profile_name, "str", max_length=260, min_length=1, pattern=r"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$" ), - "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), "ruleSetName": _SERIALIZER.url("rule_set_name", rule_set_name, "str"), "ruleName": _SERIALIZER.url("rule_name", rule_name, "str"), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), @@ -195,19 +202,21 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/ruleSets/{ruleSetName}/rules/{ruleName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._\(\)]+$" + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "profileName": _SERIALIZER.url( + "profile_name", profile_name, "str", max_length=260, min_length=1, pattern=r"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$" ), - "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), "ruleSetName": _SERIALIZER.url("rule_set_name", rule_set_name, "str"), "ruleName": _SERIALIZER.url("rule_name", rule_name, "str"), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), @@ -236,23 +245,24 @@ class RulesOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CdnManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_rule_set( self, resource_group_name: str, profile_name: str, rule_set_name: str, **kwargs: Any - ) -> Iterable["_models.Rule"]: + ) -> ItemPaged["_models.Rule"]: """Lists all of the existing delivery rules within a rule set. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param rule_set_name: Name of the rule set under the profile. Required. :type rule_set_name: str @@ -266,7 +276,7 @@ def list_by_rule_set( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.RuleListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -286,7 +296,6 @@ def prepare_request(next_link=None): headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) else: @@ -302,7 +311,6 @@ def prepare_request(next_link=None): _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _request.method = "GET" return _request @@ -325,7 +333,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -338,10 +349,11 @@ def get( ) -> _models.Rule: """Gets an existing delivery rule within a rule set. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param rule_set_name: Name of the rule set under the profile. Required. :type rule_set_name: str @@ -351,7 +363,7 @@ def get( :rtype: ~azure.mgmt.cdn.models.Rule :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -375,7 +387,6 @@ def get( headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False @@ -387,10 +398,13 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("Rule", pipeline_response) + deserialized = self._deserialize("Rule", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -405,8 +419,8 @@ def _create_initial( rule_name: str, rule: Union[_models.Rule, IO[bytes]], **kwargs: Any - ) -> _models.Rule: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -419,7 +433,7 @@ def _create_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.Rule] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -442,10 +456,10 @@ def _create_initial( headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) @@ -453,21 +467,22 @@ def _create_initial( response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("Rule", pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize("Rule", pipeline_response) - if response.status_code == 202: response_headers["location"] = self._deserialize("str", response.headers.get("location")) - deserialized = self._deserialize("Rule", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore @@ -488,10 +503,11 @@ def begin_create( ) -> LROPoller[_models.Rule]: """Creates a new delivery rule within the specified rule set. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param rule_set_name: Name of the rule set under the profile. Required. :type rule_set_name: str @@ -521,10 +537,11 @@ def begin_create( ) -> LROPoller[_models.Rule]: """Creates a new delivery rule within the specified rule set. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param rule_set_name: Name of the rule set under the profile. Required. :type rule_set_name: str @@ -552,10 +569,11 @@ def begin_create( ) -> LROPoller[_models.Rule]: """Creates a new delivery rule within the specified rule set. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param rule_set_name: Name of the rule set under the profile. Required. :type rule_set_name: str @@ -590,10 +608,11 @@ def begin_create( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("Rule", pipeline_response) + deserialized = self._deserialize("Rule", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized @@ -625,8 +644,8 @@ def _update_initial( rule_name: str, rule_update_properties: Union[_models.RuleUpdateParameters, IO[bytes]], **kwargs: Any - ) -> _models.Rule: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -639,7 +658,7 @@ def _update_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.Rule] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -662,10 +681,10 @@ def _update_initial( headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) @@ -673,18 +692,22 @@ def _update_initial( response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("Rule", pipeline_response) - if response.status_code == 202: response_headers["location"] = self._deserialize("str", response.headers.get("location")) - deserialized = self._deserialize("Rule", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore @@ -705,10 +728,11 @@ def begin_update( ) -> LROPoller[_models.Rule]: """Updates an existing delivery rule within a rule set. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param rule_set_name: Name of the rule set under the profile. Required. :type rule_set_name: str @@ -738,10 +762,11 @@ def begin_update( ) -> LROPoller[_models.Rule]: """Updates an existing delivery rule within a rule set. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param rule_set_name: Name of the rule set under the profile. Required. :type rule_set_name: str @@ -769,10 +794,11 @@ def begin_update( ) -> LROPoller[_models.Rule]: """Updates an existing delivery rule within a rule set. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param rule_set_name: Name of the rule set under the profile. Required. :type rule_set_name: str @@ -808,10 +834,11 @@ def begin_update( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("Rule", pipeline_response) + deserialized = self._deserialize("Rule", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized @@ -835,10 +862,10 @@ def get_long_running_output(pipeline_response): self._client, raw_result, get_long_running_output, polling_method # type: ignore ) - def _delete_initial( # pylint: disable=inconsistent-return-statements + def _delete_initial( self, resource_group_name: str, profile_name: str, rule_set_name: str, rule_name: str, **kwargs: Any - ) -> None: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -850,7 +877,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) _request = build_delete_request( resource_group_name=resource_group_name, @@ -862,10 +889,10 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) @@ -873,16 +900,27 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} if response.status_code == 202: response_headers["location"] = self._deserialize("str", response.headers.get("location")) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + if cls: - return cls(pipeline_response, None, response_headers) # type: ignore + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore @distributed_trace def begin_delete( @@ -890,10 +928,11 @@ def begin_delete( ) -> LROPoller[None]: """Deletes an existing delivery rule within a rule set. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param rule_set_name: Name of the rule set under the profile. Required. :type rule_set_name: str @@ -912,7 +951,7 @@ def begin_delete( lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: - raw_result = self._delete_initial( # type: ignore + raw_result = self._delete_initial( resource_group_name=resource_group_name, profile_name=profile_name, rule_set_name=rule_set_name, @@ -923,6 +962,7 @@ def begin_delete( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_secrets_operations.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_secrets_operations.py index 8f2d121d8a8b..d544d8888afb 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_secrets_operations.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_secrets_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,39 +6,38 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Iterable, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, ResourceNotModifiedError, + StreamClosedError, + StreamConsumedError, map_error, ) from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpResponse from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest +from azure.core.rest import HttpRequest, HttpResponse from azure.core.tracing.decorator import distributed_trace from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling from .. import models as _models -from .._serialization import Serializer -from .._vendor import CdnManagementClientMixinABC, _convert_request +from .._configuration import CdnManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -50,19 +49,21 @@ def build_list_by_profile_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/secrets", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._\(\)]+$" + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "profileName": _SERIALIZER.url( + "profile_name", profile_name, "str", max_length=260, min_length=1, pattern=r"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$" ), - "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), } @@ -83,19 +84,21 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/secrets/{secretName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._\(\)]+$" + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "profileName": _SERIALIZER.url( + "profile_name", profile_name, "str", max_length=260, min_length=1, pattern=r"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$" ), - "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), "secretName": _SERIALIZER.url("secret_name", secret_name, "str"), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), } @@ -117,7 +120,7 @@ def build_create_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -125,12 +128,14 @@ def build_create_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/secrets/{secretName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._\(\)]+$" + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "profileName": _SERIALIZER.url( + "profile_name", profile_name, "str", max_length=260, min_length=1, pattern=r"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$" ), - "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), "secretName": _SERIALIZER.url("secret_name", secret_name, "str"), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), } @@ -154,19 +159,21 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/secrets/{secretName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._\(\)]+$" + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "profileName": _SERIALIZER.url( + "profile_name", profile_name, "str", max_length=260, min_length=1, pattern=r"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$" ), - "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), "secretName": _SERIALIZER.url("secret_name", secret_name, "str"), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), } @@ -194,21 +201,24 @@ class SecretsOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CdnManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace - def list_by_profile(self, resource_group_name: str, profile_name: str, **kwargs: Any) -> Iterable["_models.Secret"]: + def list_by_profile( + self, resource_group_name: str, profile_name: str, **kwargs: Any + ) -> ItemPaged["_models.Secret"]: """Lists existing AzureFrontDoor secrets. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :return: An iterator like instance of either Secret or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cdn.models.Secret] @@ -220,7 +230,7 @@ def list_by_profile(self, resource_group_name: str, profile_name: str, **kwargs: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.SecretListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -239,7 +249,6 @@ def prepare_request(next_link=None): headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) else: @@ -255,7 +264,6 @@ def prepare_request(next_link=None): _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _request.method = "GET" return _request @@ -278,7 +286,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -289,10 +300,11 @@ def get_next(next_link=None): def get(self, resource_group_name: str, profile_name: str, secret_name: str, **kwargs: Any) -> _models.Secret: """Gets an existing Secret within a profile. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param secret_name: Name of the Secret under the profile. Required. :type secret_name: str @@ -300,7 +312,7 @@ def get(self, resource_group_name: str, profile_name: str, secret_name: str, **k :rtype: ~azure.mgmt.cdn.models.Secret :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -323,7 +335,6 @@ def get(self, resource_group_name: str, profile_name: str, secret_name: str, **k headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False @@ -335,10 +346,13 @@ def get(self, resource_group_name: str, profile_name: str, secret_name: str, **k if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("Secret", pipeline_response) + deserialized = self._deserialize("Secret", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -352,8 +366,8 @@ def _create_initial( secret_name: str, secret: Union[_models.Secret, IO[bytes]], **kwargs: Any - ) -> _models.Secret: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -366,7 +380,7 @@ def _create_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.Secret] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -388,10 +402,10 @@ def _create_initial( headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) @@ -399,21 +413,22 @@ def _create_initial( response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("Secret", pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize("Secret", pipeline_response) - if response.status_code == 202: response_headers["location"] = self._deserialize("str", response.headers.get("location")) - deserialized = self._deserialize("Secret", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore @@ -433,10 +448,11 @@ def begin_create( ) -> LROPoller[_models.Secret]: """Creates a new Secret within the specified profile. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param secret_name: Name of the Secret under the profile. Required. :type secret_name: str @@ -463,10 +479,11 @@ def begin_create( ) -> LROPoller[_models.Secret]: """Creates a new Secret within the specified profile. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param secret_name: Name of the Secret under the profile. Required. :type secret_name: str @@ -491,10 +508,11 @@ def begin_create( ) -> LROPoller[_models.Secret]: """Creates a new Secret within the specified profile. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param secret_name: Name of the Secret under the profile. Required. :type secret_name: str @@ -526,10 +544,11 @@ def begin_create( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("Secret", pipeline_response) + deserialized = self._deserialize("Secret", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized @@ -553,10 +572,10 @@ def get_long_running_output(pipeline_response): self._client, raw_result, get_long_running_output, polling_method # type: ignore ) - def _delete_initial( # pylint: disable=inconsistent-return-statements + def _delete_initial( self, resource_group_name: str, profile_name: str, secret_name: str, **kwargs: Any - ) -> None: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -568,7 +587,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) _request = build_delete_request( resource_group_name=resource_group_name, @@ -579,10 +598,10 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) @@ -590,16 +609,27 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} if response.status_code == 202: response_headers["location"] = self._deserialize("str", response.headers.get("location")) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + if cls: - return cls(pipeline_response, None, response_headers) # type: ignore + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore @distributed_trace def begin_delete( @@ -607,10 +637,11 @@ def begin_delete( ) -> LROPoller[None]: """Deletes an existing Secret within profile. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param secret_name: Name of the Secret under the profile. Required. :type secret_name: str @@ -627,7 +658,7 @@ def begin_delete( lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: - raw_result = self._delete_initial( # type: ignore + raw_result = self._delete_initial( resource_group_name=resource_group_name, profile_name=profile_name, secret_name=secret_name, @@ -637,6 +668,7 @@ def begin_delete( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_security_policies_operations.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_security_policies_operations.py index 6d5a448a343f..b8715d31c70d 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_security_policies_operations.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_security_policies_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,39 +6,38 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Iterable, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, ResourceNotModifiedError, + StreamClosedError, + StreamConsumedError, map_error, ) from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpResponse from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest +from azure.core.rest import HttpRequest, HttpResponse from azure.core.tracing.decorator import distributed_trace from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling from .. import models as _models -from .._serialization import Serializer -from .._vendor import CdnManagementClientMixinABC, _convert_request +from .._configuration import CdnManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -50,19 +49,21 @@ def build_list_by_profile_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/securityPolicies", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._\(\)]+$" + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "profileName": _SERIALIZER.url( + "profile_name", profile_name, "str", max_length=260, min_length=1, pattern=r"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$" ), - "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), } @@ -83,19 +84,21 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/securityPolicies/{securityPolicyName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._\(\)]+$" + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "profileName": _SERIALIZER.url( + "profile_name", profile_name, "str", max_length=260, min_length=1, pattern=r"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$" ), - "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), "securityPolicyName": _SERIALIZER.url("security_policy_name", security_policy_name, "str"), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), } @@ -117,7 +120,7 @@ def build_create_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -125,12 +128,14 @@ def build_create_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/securityPolicies/{securityPolicyName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._\(\)]+$" + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "profileName": _SERIALIZER.url( + "profile_name", profile_name, "str", max_length=260, min_length=1, pattern=r"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$" ), - "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), "securityPolicyName": _SERIALIZER.url("security_policy_name", security_policy_name, "str"), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), } @@ -154,7 +159,7 @@ def build_patch_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -162,12 +167,14 @@ def build_patch_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/securityPolicies/{securityPolicyName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._\(\)]+$" + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "profileName": _SERIALIZER.url( + "profile_name", profile_name, "str", max_length=260, min_length=1, pattern=r"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$" ), - "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), "securityPolicyName": _SERIALIZER.url("security_policy_name", security_policy_name, "str"), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), } @@ -191,19 +198,21 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/securityPolicies/{securityPolicyName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._\(\)]+$" + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "profileName": _SERIALIZER.url( + "profile_name", profile_name, "str", max_length=260, min_length=1, pattern=r"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$" ), - "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), "securityPolicyName": _SERIALIZER.url("security_policy_name", security_policy_name, "str"), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), } @@ -231,23 +240,24 @@ class SecurityPoliciesOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CdnManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_profile( self, resource_group_name: str, profile_name: str, **kwargs: Any - ) -> Iterable["_models.SecurityPolicy"]: + ) -> ItemPaged["_models.SecurityPolicy"]: """Lists security policies associated with the profile. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :return: An iterator like instance of either SecurityPolicy or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cdn.models.SecurityPolicy] @@ -259,7 +269,7 @@ def list_by_profile( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.SecurityPolicyListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -278,7 +288,6 @@ def prepare_request(next_link=None): headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) else: @@ -294,7 +303,6 @@ def prepare_request(next_link=None): _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _request.method = "GET" return _request @@ -317,7 +325,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -330,10 +341,11 @@ def get( ) -> _models.SecurityPolicy: """Gets an existing security policy within a profile. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param security_policy_name: Name of the security policy under the profile. Required. :type security_policy_name: str @@ -341,7 +353,7 @@ def get( :rtype: ~azure.mgmt.cdn.models.SecurityPolicy :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -364,7 +376,6 @@ def get( headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False @@ -376,10 +387,13 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("SecurityPolicy", pipeline_response) + deserialized = self._deserialize("SecurityPolicy", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -393,8 +407,8 @@ def _create_initial( security_policy_name: str, security_policy: Union[_models.SecurityPolicy, IO[bytes]], **kwargs: Any - ) -> _models.SecurityPolicy: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -407,7 +421,7 @@ def _create_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.SecurityPolicy] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -429,10 +443,10 @@ def _create_initial( headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) @@ -440,21 +454,22 @@ def _create_initial( response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("SecurityPolicy", pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize("SecurityPolicy", pipeline_response) - if response.status_code == 202: response_headers["location"] = self._deserialize("str", response.headers.get("location")) - deserialized = self._deserialize("SecurityPolicy", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore @@ -474,10 +489,11 @@ def begin_create( ) -> LROPoller[_models.SecurityPolicy]: """Creates a new security policy within the specified profile. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param security_policy_name: Name of the security policy under the profile. Required. :type security_policy_name: str @@ -505,10 +521,11 @@ def begin_create( ) -> LROPoller[_models.SecurityPolicy]: """Creates a new security policy within the specified profile. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param security_policy_name: Name of the security policy under the profile. Required. :type security_policy_name: str @@ -534,10 +551,11 @@ def begin_create( ) -> LROPoller[_models.SecurityPolicy]: """Creates a new security policy within the specified profile. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param security_policy_name: Name of the security policy under the profile. Required. :type security_policy_name: str @@ -571,10 +589,11 @@ def begin_create( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("SecurityPolicy", pipeline_response) + deserialized = self._deserialize("SecurityPolicy", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized @@ -605,8 +624,8 @@ def _patch_initial( security_policy_name: str, security_policy_update_properties: Union[_models.SecurityPolicyUpdateParameters, IO[bytes]], **kwargs: Any - ) -> _models.SecurityPolicy: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -619,7 +638,7 @@ def _patch_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.SecurityPolicy] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -641,10 +660,10 @@ def _patch_initial( headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) @@ -652,18 +671,22 @@ def _patch_initial( response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("SecurityPolicy", pipeline_response) - if response.status_code == 202: response_headers["location"] = self._deserialize("str", response.headers.get("location")) - deserialized = self._deserialize("SecurityPolicy", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore @@ -683,10 +706,11 @@ def begin_patch( ) -> LROPoller[_models.SecurityPolicy]: """Updates an existing security policy within a profile. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param security_policy_name: Name of the security policy under the profile. Required. :type security_policy_name: str @@ -714,10 +738,11 @@ def begin_patch( ) -> LROPoller[_models.SecurityPolicy]: """Updates an existing security policy within a profile. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param security_policy_name: Name of the security policy under the profile. Required. :type security_policy_name: str @@ -743,10 +768,11 @@ def begin_patch( ) -> LROPoller[_models.SecurityPolicy]: """Updates an existing security policy within a profile. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param security_policy_name: Name of the security policy under the profile. Required. :type security_policy_name: str @@ -781,10 +807,11 @@ def begin_patch( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("SecurityPolicy", pipeline_response) + deserialized = self._deserialize("SecurityPolicy", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized @@ -808,10 +835,10 @@ def get_long_running_output(pipeline_response): self._client, raw_result, get_long_running_output, polling_method # type: ignore ) - def _delete_initial( # pylint: disable=inconsistent-return-statements + def _delete_initial( self, resource_group_name: str, profile_name: str, security_policy_name: str, **kwargs: Any - ) -> None: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -823,7 +850,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) _request = build_delete_request( resource_group_name=resource_group_name, @@ -834,10 +861,10 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements headers=_headers, params=_params, ) - _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) @@ -845,16 +872,27 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} if response.status_code == 202: response_headers["location"] = self._deserialize("str", response.headers.get("location")) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + if cls: - return cls(pipeline_response, None, response_headers) # type: ignore + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore @distributed_trace def begin_delete( @@ -862,10 +900,11 @@ def begin_delete( ) -> LROPoller[None]: """Deletes an existing security policy within profile. - :param resource_group_name: Name of the Resource group within the Azure subscription. Required. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. Required. + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is + unique within the resource group. Required. :type profile_name: str :param security_policy_name: Name of the security policy under the profile. Required. :type security_policy_name: str @@ -882,7 +921,7 @@ def begin_delete( lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: - raw_result = self._delete_initial( # type: ignore + raw_result = self._delete_initial( resource_group_name=resource_group_name, profile_name=profile_name, security_policy_name=security_policy_name, @@ -892,6 +931,7 @@ def begin_delete( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements diff --git a/sdk/cdn/azure-mgmt-cdn/code_report_swagger.json b/sdk/cdn/azure-mgmt-cdn/code_report_swagger.json new file mode 100644 index 000000000000..18956e25a951 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/code_report_swagger.json @@ -0,0 +1,56539 @@ +{ + "azure.mgmt.cdn": { + "class_nodes": { + "CdnManagementClient": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "credential": { + "default": null, + "param_type": "positional_or_keyword" + }, + "subscription_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "base_url": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "cloud_setting": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "check_endpoint_name_availability": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "check_endpoint_name_availability_input": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "CheckEndpointNameAvailabilityOutput", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "check_endpoint_name_availability_input": { + "type": "CheckEndpointNameAvailabilityInput", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "CheckEndpointNameAvailabilityOutput" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "check_endpoint_name_availability_input": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "CheckEndpointNameAvailabilityOutput" + } + ] + }, + "check_name_availability": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "check_name_availability_input": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "CheckNameAvailabilityOutput", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "check_name_availability_input": { + "type": "CheckNameAvailabilityInput", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "CheckNameAvailabilityOutput" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "check_name_availability_input": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "CheckNameAvailabilityOutput" + } + ] + }, + "check_name_availability_with_subscription": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "check_name_availability_input": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "CheckNameAvailabilityOutput", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "check_name_availability_input": { + "type": "CheckNameAvailabilityInput", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "CheckNameAvailabilityOutput" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "check_name_availability_input": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "CheckNameAvailabilityOutput" + } + ] + }, + "close": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "validate_probe": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "validate_probe_input": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ValidateProbeOutput", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "validate_probe_input": { + "type": "ValidateProbeInput", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "ValidateProbeOutput" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "validate_probe_input": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "ValidateProbeOutput" + } + ] + } + }, + "properties": { + "client_side_validation": { + "attr_type": false + }, + "afd_profiles": { + "attr_type": "AFDProfilesOperations" + }, + "afd_custom_domains": { + "attr_type": "AFDCustomDomainsOperations" + }, + "afd_endpoints": { + "attr_type": "AFDEndpointsOperations" + }, + "afd_origin_groups": { + "attr_type": "AFDOriginGroupsOperations" + }, + "afd_origins": { + "attr_type": "AFDOriginsOperations" + }, + "routes": { + "attr_type": "RoutesOperations" + }, + "rule_sets": { + "attr_type": "RuleSetsOperations" + }, + "rules": { + "attr_type": "RulesOperations" + }, + "security_policies": { + "attr_type": "SecurityPoliciesOperations" + }, + "secrets": { + "attr_type": "SecretsOperations" + }, + "log_analytics": { + "attr_type": "LogAnalyticsOperations" + }, + "profiles": { + "attr_type": "ProfilesOperations" + }, + "endpoints": { + "attr_type": "EndpointsOperations" + }, + "origins": { + "attr_type": "OriginsOperations" + }, + "origin_groups": { + "attr_type": "OriginGroupsOperations" + }, + "custom_domains": { + "attr_type": "CustomDomainsOperations" + }, + "resource_usage": { + "attr_type": "ResourceUsageOperations" + }, + "operations": { + "attr_type": "Operations" + }, + "edge_nodes": { + "attr_type": "EdgeNodesOperations" + }, + "policies": { + "attr_type": "PoliciesOperations" + }, + "managed_rule_sets": { + "attr_type": "ManagedRuleSetsOperations" + } + } + } + }, + "function_nodes": {} + }, + "azure.mgmt.cdn.aio": { + "class_nodes": { + "CdnManagementClient": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "credential": { + "default": null, + "param_type": "positional_or_keyword" + }, + "subscription_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "base_url": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "cloud_setting": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "check_endpoint_name_availability": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "check_endpoint_name_availability_input": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "CheckEndpointNameAvailabilityOutput", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "check_endpoint_name_availability_input": { + "type": "CheckEndpointNameAvailabilityInput", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "CheckEndpointNameAvailabilityOutput" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "check_endpoint_name_availability_input": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "CheckEndpointNameAvailabilityOutput" + } + ] + }, + "check_name_availability": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "check_name_availability_input": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "CheckNameAvailabilityOutput", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "check_name_availability_input": { + "type": "CheckNameAvailabilityInput", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "CheckNameAvailabilityOutput" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "check_name_availability_input": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "CheckNameAvailabilityOutput" + } + ] + }, + "check_name_availability_with_subscription": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "check_name_availability_input": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "CheckNameAvailabilityOutput", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "check_name_availability_input": { + "type": "CheckNameAvailabilityInput", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "CheckNameAvailabilityOutput" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "check_name_availability_input": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "CheckNameAvailabilityOutput" + } + ] + }, + "close": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": true, + "return_type": "None", + "overloads": [] + }, + "validate_probe": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "validate_probe_input": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "ValidateProbeOutput", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "validate_probe_input": { + "type": "ValidateProbeInput", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "ValidateProbeOutput" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "validate_probe_input": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "ValidateProbeOutput" + } + ] + } + }, + "properties": { + "client_side_validation": { + "attr_type": false + }, + "afd_profiles": { + "attr_type": "AFDProfilesOperations" + }, + "afd_custom_domains": { + "attr_type": "AFDCustomDomainsOperations" + }, + "afd_endpoints": { + "attr_type": "AFDEndpointsOperations" + }, + "afd_origin_groups": { + "attr_type": "AFDOriginGroupsOperations" + }, + "afd_origins": { + "attr_type": "AFDOriginsOperations" + }, + "routes": { + "attr_type": "RoutesOperations" + }, + "rule_sets": { + "attr_type": "RuleSetsOperations" + }, + "rules": { + "attr_type": "RulesOperations" + }, + "security_policies": { + "attr_type": "SecurityPoliciesOperations" + }, + "secrets": { + "attr_type": "SecretsOperations" + }, + "log_analytics": { + "attr_type": "LogAnalyticsOperations" + }, + "profiles": { + "attr_type": "ProfilesOperations" + }, + "endpoints": { + "attr_type": "EndpointsOperations" + }, + "origins": { + "attr_type": "OriginsOperations" + }, + "origin_groups": { + "attr_type": "OriginGroupsOperations" + }, + "custom_domains": { + "attr_type": "CustomDomainsOperations" + }, + "resource_usage": { + "attr_type": "ResourceUsageOperations" + }, + "operations": { + "attr_type": "Operations" + }, + "edge_nodes": { + "attr_type": "EdgeNodesOperations" + }, + "policies": { + "attr_type": "PoliciesOperations" + }, + "managed_rule_sets": { + "attr_type": "ManagedRuleSetsOperations" + } + } + } + }, + "function_nodes": {} + }, + "azure.mgmt.cdn.aio.operations": { + "class_nodes": { + "AFDCustomDomainsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[AFDDomain]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain": { + "type": "AFDDomain", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[AFDDomain]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[AFDDomain]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]", + "overloads": [] + }, + "begin_refresh_validation_token": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_update_properties": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[AFDDomain]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_update_properties": { + "type": "AFDDomainUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[AFDDomain]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_update_properties": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[AFDDomain]" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AFDDomain", + "overloads": [] + }, + "list_by_profile": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.AFDDomain]", + "overloads": [] + } + }, + "properties": {} + }, + "AFDEndpointsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[AFDEndpoint]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint": { + "type": "AFDEndpoint", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[AFDEndpoint]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[AFDEndpoint]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]", + "overloads": [] + }, + "begin_purge_content": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "contents": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "contents": { + "type": "AfdPurgeParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "contents": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]" + } + ] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_update_properties": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[AFDEndpoint]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_update_properties": { + "type": "AFDEndpointUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[AFDEndpoint]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_update_properties": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[AFDEndpoint]" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AFDEndpoint", + "overloads": [] + }, + "list_by_profile": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.AFDEndpoint]", + "overloads": [] + }, + "list_resource_usage": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.Usage]", + "overloads": [] + }, + "validate_custom_domain": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_properties": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "ValidateCustomDomainOutput", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_properties": { + "type": "ValidateCustomDomainInput", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "ValidateCustomDomainOutput" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_properties": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "ValidateCustomDomainOutput" + } + ] + } + }, + "properties": {} + }, + "AFDOriginGroupsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[AFDOriginGroup]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group": { + "type": "AFDOriginGroup", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[AFDOriginGroup]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[AFDOriginGroup]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_update_properties": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[AFDOriginGroup]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_update_properties": { + "type": "AFDOriginGroupUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[AFDOriginGroup]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_update_properties": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[AFDOriginGroup]" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AFDOriginGroup", + "overloads": [] + }, + "list_by_profile": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.AFDOriginGroup]", + "overloads": [] + }, + "list_resource_usage": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.Usage]", + "overloads": [] + } + }, + "properties": {} + }, + "AFDOriginsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "origin": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[AFDOrigin]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin": { + "type": "AFDOrigin", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[AFDOrigin]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[AFDOrigin]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_update_properties": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[AFDOrigin]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_update_properties": { + "type": "AFDOriginUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[AFDOrigin]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_update_properties": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[AFDOrigin]" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AFDOrigin", + "overloads": [] + }, + "list_by_origin_group": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.AFDOrigin]", + "overloads": [] + } + }, + "properties": {} + }, + "AFDProfilesOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_upgrade": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_upgrade_parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Profile]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_upgrade_parameters": { + "type": "ProfileUpgradeParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Profile]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_upgrade_parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Profile]" + } + ] + }, + "check_endpoint_name_availability": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "check_endpoint_name_availability_input": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "CheckEndpointNameAvailabilityOutput", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "check_endpoint_name_availability_input": { + "type": "CheckEndpointNameAvailabilityInput", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "CheckEndpointNameAvailabilityOutput" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "check_endpoint_name_availability_input": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "CheckEndpointNameAvailabilityOutput" + } + ] + }, + "check_host_name_availability": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "check_host_name_availability_input": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "CheckNameAvailabilityOutput", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "check_host_name_availability_input": { + "type": "CheckHostNameAvailabilityInput", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "CheckNameAvailabilityOutput" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "check_host_name_availability_input": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "CheckNameAvailabilityOutput" + } + ] + }, + "list_resource_usage": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.Usage]", + "overloads": [] + }, + "validate_secret": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "validate_secret_input": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "ValidateSecretOutput", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "validate_secret_input": { + "type": "ValidateSecretInput", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "ValidateSecretOutput" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "validate_secret_input": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "ValidateSecretOutput" + } + ] + } + }, + "properties": {} + }, + "CustomDomainsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_properties": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CustomDomain]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_properties": { + "type": "CustomDomainParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CustomDomain]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_properties": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CustomDomain]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CustomDomain]", + "overloads": [] + }, + "begin_disable_custom_https": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CustomDomain]", + "overloads": [] + }, + "begin_enable_custom_https": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_https_parameters": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CustomDomain]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_https_parameters": { + "type": "Optional[CustomDomainHttpsParameters]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CustomDomain]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_https_parameters": { + "type": "Optional[IO[bytes]]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CustomDomain]" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "CustomDomain", + "overloads": [] + }, + "list_by_endpoint": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.CustomDomain]", + "overloads": [] + } + }, + "properties": {} + }, + "EdgeNodesOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.EdgeNode]", + "overloads": [] + } + }, + "properties": {} + }, + "EndpointsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Endpoint]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint": { + "type": "Endpoint", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Endpoint]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Endpoint]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]", + "overloads": [] + }, + "begin_load_content": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_file_paths": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_file_paths": { + "type": "LoadParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_file_paths": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]" + } + ] + }, + "begin_purge_content": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_file_paths": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_file_paths": { + "type": "PurgeParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_file_paths": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]" + } + ] + }, + "begin_start": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Endpoint]", + "overloads": [] + }, + "begin_stop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Endpoint]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_update_properties": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Endpoint]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_update_properties": { + "type": "EndpointUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Endpoint]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_update_properties": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Endpoint]" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "Endpoint", + "overloads": [] + }, + "list_by_profile": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.Endpoint]", + "overloads": [] + }, + "list_resource_usage": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.ResourceUsage]", + "overloads": [] + }, + "validate_custom_domain": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_properties": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "ValidateCustomDomainOutput", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_properties": { + "type": "ValidateCustomDomainInput", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "ValidateCustomDomainOutput" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_properties": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "ValidateCustomDomainOutput" + } + ] + } + }, + "properties": {} + }, + "LogAnalyticsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "get_log_analytics_locations": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "ContinentsResponse", + "overloads": [] + }, + "get_log_analytics_metrics": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "metrics": { + "default": null, + "param_type": "positional_or_keyword" + }, + "date_time_begin": { + "default": null, + "param_type": "positional_or_keyword" + }, + "date_time_end": { + "default": null, + "param_type": "positional_or_keyword" + }, + "granularity": { + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domains": { + "default": null, + "param_type": "positional_or_keyword" + }, + "protocols": { + "default": null, + "param_type": "positional_or_keyword" + }, + "group_by": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "continents": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "country_or_regions": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "MetricsResponse", + "overloads": [] + }, + "get_log_analytics_rankings": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "rankings": { + "default": null, + "param_type": "positional_or_keyword" + }, + "metrics": { + "default": null, + "param_type": "positional_or_keyword" + }, + "max_ranking": { + "default": null, + "param_type": "positional_or_keyword" + }, + "date_time_begin": { + "default": null, + "param_type": "positional_or_keyword" + }, + "date_time_end": { + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domains": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "RankingsResponse", + "overloads": [] + }, + "get_log_analytics_resources": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "ResourcesResponse", + "overloads": [] + }, + "get_waf_log_analytics_metrics": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "metrics": { + "default": null, + "param_type": "positional_or_keyword" + }, + "date_time_begin": { + "default": null, + "param_type": "positional_or_keyword" + }, + "date_time_end": { + "default": null, + "param_type": "positional_or_keyword" + }, + "granularity": { + "default": null, + "param_type": "positional_or_keyword" + }, + "actions": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "group_by": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "rule_types": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "WafMetricsResponse", + "overloads": [] + }, + "get_waf_log_analytics_rankings": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "metrics": { + "default": null, + "param_type": "positional_or_keyword" + }, + "date_time_begin": { + "default": null, + "param_type": "positional_or_keyword" + }, + "date_time_end": { + "default": null, + "param_type": "positional_or_keyword" + }, + "max_ranking": { + "default": null, + "param_type": "positional_or_keyword" + }, + "rankings": { + "default": null, + "param_type": "positional_or_keyword" + }, + "actions": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "rule_types": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "WafRankingsResponse", + "overloads": [] + } + }, + "properties": {} + }, + "ManagedRuleSetsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.ManagedRuleSetDefinition]", + "overloads": [] + } + }, + "properties": {} + }, + "Operations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.Operation]", + "overloads": [] + } + }, + "properties": {} + }, + "OriginGroupsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[OriginGroup]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group": { + "type": "OriginGroup", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[OriginGroup]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[OriginGroup]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_update_properties": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[OriginGroup]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_update_properties": { + "type": "OriginGroupUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[OriginGroup]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_update_properties": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[OriginGroup]" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "OriginGroup", + "overloads": [] + }, + "list_by_endpoint": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.OriginGroup]", + "overloads": [] + } + }, + "properties": {} + }, + "OriginsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "origin": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Origin]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin": { + "type": "Origin", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Origin]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Origin]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_update_properties": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Origin]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_update_properties": { + "type": "OriginUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Origin]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_update_properties": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Origin]" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "Origin", + "overloads": [] + }, + "list_by_endpoint": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.Origin]", + "overloads": [] + } + }, + "properties": {} + }, + "PoliciesOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cdn_web_application_firewall_policy": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CdnWebApplicationFirewallPolicy]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cdn_web_application_firewall_policy": { + "type": "CdnWebApplicationFirewallPolicy", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CdnWebApplicationFirewallPolicy]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cdn_web_application_firewall_policy": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CdnWebApplicationFirewallPolicy]" + } + ] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cdn_web_application_firewall_policy_patch_parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CdnWebApplicationFirewallPolicy]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cdn_web_application_firewall_policy_patch_parameters": { + "type": "CdnWebApplicationFirewallPolicyPatchParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CdnWebApplicationFirewallPolicy]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cdn_web_application_firewall_policy_patch_parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CdnWebApplicationFirewallPolicy]" + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "None", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "CdnWebApplicationFirewallPolicy", + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.CdnWebApplicationFirewallPolicy]", + "overloads": [] + } + }, + "properties": {} + }, + "ProfilesOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_can_migrate": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "can_migrate_parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CanMigrateResult]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "can_migrate_parameters": { + "type": "CanMigrateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CanMigrateResult]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "can_migrate_parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CanMigrateResult]" + } + ] + }, + "begin_cdn_can_migrate_to_afd": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CanMigrateResult]", + "overloads": [] + }, + "begin_cdn_migrate_to_afd": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "migration_parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[MigrateResult]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "migration_parameters": { + "type": "CdnMigrationToAfdParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[MigrateResult]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "migration_parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[MigrateResult]" + } + ] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Profile]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile": { + "type": "Profile", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Profile]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Profile]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]", + "overloads": [] + }, + "begin_migrate": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "migration_parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[MigrateResult]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "migration_parameters": { + "type": "MigrationParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[MigrateResult]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "migration_parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[MigrateResult]" + } + ] + }, + "begin_migration_abort": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]", + "overloads": [] + }, + "begin_migration_commit": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_update_parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Profile]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_update_parameters": { + "type": "ProfileUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Profile]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_update_parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Profile]" + } + ] + }, + "generate_sso_uri": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "SsoUri", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "Profile", + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.Profile]", + "overloads": [] + }, + "list_by_resource_group": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.Profile]", + "overloads": [] + }, + "list_resource_usage": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.ResourceUsage]", + "overloads": [] + }, + "list_supported_optimization_types": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "SupportedOptimizationTypesListResult", + "overloads": [] + } + }, + "properties": {} + }, + "ResourceUsageOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.ResourceUsage]", + "overloads": [] + } + }, + "properties": {} + }, + "RoutesOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "route_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "route": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Route]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "route_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "route": { + "type": "Route", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Route]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "route_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "route": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Route]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "route_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "route_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "route_update_properties": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Route]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "route_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "route_update_properties": { + "type": "RouteUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Route]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "route_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "route_update_properties": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Route]" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "route_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "Route", + "overloads": [] + }, + "list_by_endpoint": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.Route]", + "overloads": [] + } + }, + "properties": {} + }, + "RuleSetsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_set_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]", + "overloads": [] + }, + "create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_set_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "RuleSet", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_set_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "RuleSet", + "overloads": [] + }, + "list_by_profile": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.RuleSet]", + "overloads": [] + }, + "list_resource_usage": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_set_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.Usage]", + "overloads": [] + } + }, + "properties": {} + }, + "RulesOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_set_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "rule": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Rule]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_set_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "rule": { + "type": "Rule", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Rule]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_set_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "rule": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Rule]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_set_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_set_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_update_properties": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Rule]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_set_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_update_properties": { + "type": "RuleUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Rule]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_set_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_update_properties": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Rule]" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_set_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "Rule", + "overloads": [] + }, + "list_by_rule_set": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_set_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.Rule]", + "overloads": [] + } + }, + "properties": {} + }, + "SecretsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "secret_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "secret": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Secret]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "secret_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "secret": { + "type": "Secret", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Secret]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "secret_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "secret": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Secret]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "secret_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "secret_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "Secret", + "overloads": [] + }, + "list_by_profile": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.Secret]", + "overloads": [] + } + }, + "properties": {} + }, + "SecurityPoliciesOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "security_policy_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "security_policy": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[SecurityPolicy]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "security_policy_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "security_policy": { + "type": "SecurityPolicy", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[SecurityPolicy]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "security_policy_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "security_policy": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[SecurityPolicy]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "security_policy_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]", + "overloads": [] + }, + "begin_patch": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "security_policy_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "security_policy_update_properties": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[SecurityPolicy]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "security_policy_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "security_policy_update_properties": { + "type": "SecurityPolicyUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[SecurityPolicy]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "security_policy_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "security_policy_update_properties": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[SecurityPolicy]" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "security_policy_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "SecurityPolicy", + "overloads": [] + }, + "list_by_profile": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.SecurityPolicy]", + "overloads": [] + } + }, + "properties": {} + } + }, + "function_nodes": {} + }, + "azure.mgmt.cdn.models": { + "class_nodes": { + "AFDDomain": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tls_settings": { + "default": "none", + "param_type": "keyword_only" + }, + "azure_dns_zone": { + "default": "none", + "param_type": "keyword_only" + }, + "pre_validated_custom_domain_resource_id": { + "default": "none", + "param_type": "keyword_only" + }, + "host_name": { + "default": "none", + "param_type": "keyword_only" + }, + "extended_properties": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "profile_name": { + "attr_type": null + }, + "tls_settings": { + "attr_type": "tls_settings" + }, + "azure_dns_zone": { + "attr_type": "azure_dns_zone" + }, + "pre_validated_custom_domain_resource_id": { + "attr_type": "pre_validated_custom_domain_resource_id" + }, + "provisioning_state": { + "attr_type": null + }, + "deployment_status": { + "attr_type": null + }, + "domain_validation_state": { + "attr_type": null + }, + "host_name": { + "attr_type": "host_name" + }, + "extended_properties": { + "attr_type": "extended_properties" + }, + "validation_properties": { + "attr_type": null + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "system_data": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "AFDDomainHttpsCustomizedCipherSuiteSet": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cipher_suite_set_for_tls12": { + "default": "none", + "param_type": "keyword_only" + }, + "cipher_suite_set_for_tls13": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "cipher_suite_set_for_tls12": { + "attr_type": "cipher_suite_set_for_tls12" + }, + "cipher_suite_set_for_tls13": { + "attr_type": "cipher_suite_set_for_tls13" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "AFDDomainHttpsParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_type": { + "default": null, + "param_type": "keyword_only" + }, + "cipher_suite_set_type": { + "default": "none", + "param_type": "keyword_only" + }, + "minimum_tls_version": { + "default": "none", + "param_type": "keyword_only" + }, + "customized_cipher_suite_set": { + "default": "none", + "param_type": "keyword_only" + }, + "secret": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "certificate_type": { + "attr_type": "certificate_type" + }, + "cipher_suite_set_type": { + "attr_type": "cipher_suite_set_type" + }, + "minimum_tls_version": { + "attr_type": "minimum_tls_version" + }, + "customized_cipher_suite_set": { + "attr_type": "customized_cipher_suite_set" + }, + "secret": { + "attr_type": "secret" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "AFDDomainListResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "next_link": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": null + }, + "next_link": { + "attr_type": "next_link" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "AFDDomainProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "host_name": { + "default": null, + "param_type": "keyword_only" + }, + "tls_settings": { + "default": "none", + "param_type": "keyword_only" + }, + "azure_dns_zone": { + "default": "none", + "param_type": "keyword_only" + }, + "pre_validated_custom_domain_resource_id": { + "default": "none", + "param_type": "keyword_only" + }, + "extended_properties": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "provisioning_state": { + "attr_type": null + }, + "deployment_status": { + "attr_type": null + }, + "domain_validation_state": { + "attr_type": null + }, + "host_name": { + "attr_type": "host_name" + }, + "extended_properties": { + "attr_type": "extended_properties" + }, + "validation_properties": { + "attr_type": null + }, + "profile_name": { + "attr_type": null + }, + "tls_settings": { + "attr_type": "tls_settings" + }, + "azure_dns_zone": { + "attr_type": "azure_dns_zone" + }, + "pre_validated_custom_domain_resource_id": { + "attr_type": "pre_validated_custom_domain_resource_id" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "AFDDomainUpdateParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tls_settings": { + "default": "none", + "param_type": "keyword_only" + }, + "azure_dns_zone": { + "default": "none", + "param_type": "keyword_only" + }, + "pre_validated_custom_domain_resource_id": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "profile_name": { + "attr_type": null + }, + "tls_settings": { + "attr_type": "tls_settings" + }, + "azure_dns_zone": { + "attr_type": "azure_dns_zone" + }, + "pre_validated_custom_domain_resource_id": { + "attr_type": "pre_validated_custom_domain_resource_id" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "AFDDomainUpdatePropertiesParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tls_settings": { + "default": "none", + "param_type": "keyword_only" + }, + "azure_dns_zone": { + "default": "none", + "param_type": "keyword_only" + }, + "pre_validated_custom_domain_resource_id": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "profile_name": { + "attr_type": null + }, + "tls_settings": { + "attr_type": "tls_settings" + }, + "azure_dns_zone": { + "attr_type": "azure_dns_zone" + }, + "pre_validated_custom_domain_resource_id": { + "attr_type": "pre_validated_custom_domain_resource_id" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "AFDEndpoint": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "default": null, + "param_type": "keyword_only" + }, + "tags": { + "default": "none", + "param_type": "keyword_only" + }, + "enabled_state": { + "default": "none", + "param_type": "keyword_only" + }, + "auto_generated_domain_name_label_scope": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "profile_name": { + "attr_type": null + }, + "enabled_state": { + "attr_type": "enabled_state" + }, + "provisioning_state": { + "attr_type": null + }, + "deployment_status": { + "attr_type": null + }, + "host_name": { + "attr_type": null + }, + "auto_generated_domain_name_label_scope": { + "attr_type": "auto_generated_domain_name_label_scope" + }, + "tags": { + "attr_type": "tags" + }, + "location": { + "attr_type": "location" + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "system_data": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "AFDEndpointListResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "next_link": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": null + }, + "next_link": { + "attr_type": "next_link" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "AFDEndpointProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "enabled_state": { + "default": "none", + "param_type": "keyword_only" + }, + "auto_generated_domain_name_label_scope": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "provisioning_state": { + "attr_type": null + }, + "deployment_status": { + "attr_type": null + }, + "host_name": { + "attr_type": null + }, + "auto_generated_domain_name_label_scope": { + "attr_type": "auto_generated_domain_name_label_scope" + }, + "profile_name": { + "attr_type": null + }, + "enabled_state": { + "attr_type": "enabled_state" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "AFDEndpointPropertiesUpdateParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "enabled_state": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "profile_name": { + "attr_type": null + }, + "enabled_state": { + "attr_type": "enabled_state" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "AFDEndpointProtocols": { + "type": "Enum", + "methods": {}, + "properties": { + "HTTP": "HTTP", + "HTTPS": "HTTPS", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "AFDEndpointUpdateParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tags": { + "default": "none", + "param_type": "keyword_only" + }, + "enabled_state": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "tags": { + "attr_type": "tags" + }, + "profile_name": { + "attr_type": null + }, + "enabled_state": { + "attr_type": "enabled_state" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "AFDOrigin": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "azure_origin": { + "default": "none", + "param_type": "keyword_only" + }, + "host_name": { + "default": "none", + "param_type": "keyword_only" + }, + "http_port": { + "default": "int", + "param_type": "keyword_only" + }, + "https_port": { + "default": "int", + "param_type": "keyword_only" + }, + "origin_host_header": { + "default": "none", + "param_type": "keyword_only" + }, + "priority": { + "default": "none", + "param_type": "keyword_only" + }, + "weight": { + "default": "none", + "param_type": "keyword_only" + }, + "shared_private_link_resource": { + "default": "none", + "param_type": "keyword_only" + }, + "enabled_state": { + "default": "none", + "param_type": "keyword_only" + }, + "enforce_certificate_name_check": { + "default": "bool", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "origin_group_name": { + "attr_type": null + }, + "azure_origin": { + "attr_type": "azure_origin" + }, + "host_name": { + "attr_type": "host_name" + }, + "http_port": { + "attr_type": "http_port" + }, + "https_port": { + "attr_type": "https_port" + }, + "origin_host_header": { + "attr_type": "origin_host_header" + }, + "priority": { + "attr_type": "priority" + }, + "weight": { + "attr_type": "weight" + }, + "shared_private_link_resource": { + "attr_type": "shared_private_link_resource" + }, + "enabled_state": { + "attr_type": "enabled_state" + }, + "enforce_certificate_name_check": { + "attr_type": "enforce_certificate_name_check" + }, + "provisioning_state": { + "attr_type": null + }, + "deployment_status": { + "attr_type": null + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "system_data": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "AFDOriginGroup": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "load_balancing_settings": { + "default": "none", + "param_type": "keyword_only" + }, + "health_probe_settings": { + "default": "none", + "param_type": "keyword_only" + }, + "traffic_restoration_time_to_healed_or_new_endpoints_in_minutes": { + "default": "none", + "param_type": "keyword_only" + }, + "session_affinity_state": { + "default": "none", + "param_type": "keyword_only" + }, + "authentication": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "profile_name": { + "attr_type": null + }, + "load_balancing_settings": { + "attr_type": "load_balancing_settings" + }, + "health_probe_settings": { + "attr_type": "health_probe_settings" + }, + "traffic_restoration_time_to_healed_or_new_endpoints_in_minutes": { + "attr_type": "traffic_restoration_time_to_healed_or_new_endpoints_in_minutes" + }, + "session_affinity_state": { + "attr_type": "session_affinity_state" + }, + "authentication": { + "attr_type": "authentication" + }, + "provisioning_state": { + "attr_type": null + }, + "deployment_status": { + "attr_type": null + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "system_data": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "AFDOriginGroupListResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "next_link": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": null + }, + "next_link": { + "attr_type": "next_link" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "AFDOriginGroupProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "load_balancing_settings": { + "default": "none", + "param_type": "keyword_only" + }, + "health_probe_settings": { + "default": "none", + "param_type": "keyword_only" + }, + "traffic_restoration_time_to_healed_or_new_endpoints_in_minutes": { + "default": "none", + "param_type": "keyword_only" + }, + "session_affinity_state": { + "default": "none", + "param_type": "keyword_only" + }, + "authentication": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "provisioning_state": { + "attr_type": null + }, + "deployment_status": { + "attr_type": null + }, + "profile_name": { + "attr_type": null + }, + "load_balancing_settings": { + "attr_type": "load_balancing_settings" + }, + "health_probe_settings": { + "attr_type": "health_probe_settings" + }, + "traffic_restoration_time_to_healed_or_new_endpoints_in_minutes": { + "attr_type": "traffic_restoration_time_to_healed_or_new_endpoints_in_minutes" + }, + "session_affinity_state": { + "attr_type": "session_affinity_state" + }, + "authentication": { + "attr_type": "authentication" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "AFDOriginGroupUpdateParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "load_balancing_settings": { + "default": "none", + "param_type": "keyword_only" + }, + "health_probe_settings": { + "default": "none", + "param_type": "keyword_only" + }, + "traffic_restoration_time_to_healed_or_new_endpoints_in_minutes": { + "default": "none", + "param_type": "keyword_only" + }, + "session_affinity_state": { + "default": "none", + "param_type": "keyword_only" + }, + "authentication": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "profile_name": { + "attr_type": null + }, + "load_balancing_settings": { + "attr_type": "load_balancing_settings" + }, + "health_probe_settings": { + "attr_type": "health_probe_settings" + }, + "traffic_restoration_time_to_healed_or_new_endpoints_in_minutes": { + "attr_type": "traffic_restoration_time_to_healed_or_new_endpoints_in_minutes" + }, + "session_affinity_state": { + "attr_type": "session_affinity_state" + }, + "authentication": { + "attr_type": "authentication" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "AFDOriginGroupUpdatePropertiesParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "load_balancing_settings": { + "default": "none", + "param_type": "keyword_only" + }, + "health_probe_settings": { + "default": "none", + "param_type": "keyword_only" + }, + "traffic_restoration_time_to_healed_or_new_endpoints_in_minutes": { + "default": "none", + "param_type": "keyword_only" + }, + "session_affinity_state": { + "default": "none", + "param_type": "keyword_only" + }, + "authentication": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "profile_name": { + "attr_type": null + }, + "load_balancing_settings": { + "attr_type": "load_balancing_settings" + }, + "health_probe_settings": { + "attr_type": "health_probe_settings" + }, + "traffic_restoration_time_to_healed_or_new_endpoints_in_minutes": { + "attr_type": "traffic_restoration_time_to_healed_or_new_endpoints_in_minutes" + }, + "session_affinity_state": { + "attr_type": "session_affinity_state" + }, + "authentication": { + "attr_type": "authentication" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "AFDOriginListResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "next_link": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": null + }, + "next_link": { + "attr_type": "next_link" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "AFDOriginProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "azure_origin": { + "default": "none", + "param_type": "keyword_only" + }, + "host_name": { + "default": "none", + "param_type": "keyword_only" + }, + "http_port": { + "default": "int", + "param_type": "keyword_only" + }, + "https_port": { + "default": "int", + "param_type": "keyword_only" + }, + "origin_host_header": { + "default": "none", + "param_type": "keyword_only" + }, + "priority": { + "default": "none", + "param_type": "keyword_only" + }, + "weight": { + "default": "none", + "param_type": "keyword_only" + }, + "shared_private_link_resource": { + "default": "none", + "param_type": "keyword_only" + }, + "enabled_state": { + "default": "none", + "param_type": "keyword_only" + }, + "enforce_certificate_name_check": { + "default": "bool", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "provisioning_state": { + "attr_type": null + }, + "deployment_status": { + "attr_type": null + }, + "origin_group_name": { + "attr_type": null + }, + "azure_origin": { + "attr_type": "azure_origin" + }, + "host_name": { + "attr_type": "host_name" + }, + "http_port": { + "attr_type": "http_port" + }, + "https_port": { + "attr_type": "https_port" + }, + "origin_host_header": { + "attr_type": "origin_host_header" + }, + "priority": { + "attr_type": "priority" + }, + "weight": { + "attr_type": "weight" + }, + "shared_private_link_resource": { + "attr_type": "shared_private_link_resource" + }, + "enabled_state": { + "attr_type": "enabled_state" + }, + "enforce_certificate_name_check": { + "attr_type": "enforce_certificate_name_check" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "AFDOriginUpdateParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "azure_origin": { + "default": "none", + "param_type": "keyword_only" + }, + "host_name": { + "default": "none", + "param_type": "keyword_only" + }, + "http_port": { + "default": "int", + "param_type": "keyword_only" + }, + "https_port": { + "default": "int", + "param_type": "keyword_only" + }, + "origin_host_header": { + "default": "none", + "param_type": "keyword_only" + }, + "priority": { + "default": "none", + "param_type": "keyword_only" + }, + "weight": { + "default": "none", + "param_type": "keyword_only" + }, + "shared_private_link_resource": { + "default": "none", + "param_type": "keyword_only" + }, + "enabled_state": { + "default": "none", + "param_type": "keyword_only" + }, + "enforce_certificate_name_check": { + "default": "bool", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "origin_group_name": { + "attr_type": null + }, + "azure_origin": { + "attr_type": "azure_origin" + }, + "host_name": { + "attr_type": "host_name" + }, + "http_port": { + "attr_type": "http_port" + }, + "https_port": { + "attr_type": "https_port" + }, + "origin_host_header": { + "attr_type": "origin_host_header" + }, + "priority": { + "attr_type": "priority" + }, + "weight": { + "attr_type": "weight" + }, + "shared_private_link_resource": { + "attr_type": "shared_private_link_resource" + }, + "enabled_state": { + "attr_type": "enabled_state" + }, + "enforce_certificate_name_check": { + "attr_type": "enforce_certificate_name_check" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "AFDOriginUpdatePropertiesParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "azure_origin": { + "default": "none", + "param_type": "keyword_only" + }, + "host_name": { + "default": "none", + "param_type": "keyword_only" + }, + "http_port": { + "default": "int", + "param_type": "keyword_only" + }, + "https_port": { + "default": "int", + "param_type": "keyword_only" + }, + "origin_host_header": { + "default": "none", + "param_type": "keyword_only" + }, + "priority": { + "default": "none", + "param_type": "keyword_only" + }, + "weight": { + "default": "none", + "param_type": "keyword_only" + }, + "shared_private_link_resource": { + "default": "none", + "param_type": "keyword_only" + }, + "enabled_state": { + "default": "none", + "param_type": "keyword_only" + }, + "enforce_certificate_name_check": { + "default": "bool", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "origin_group_name": { + "attr_type": null + }, + "azure_origin": { + "attr_type": "azure_origin" + }, + "host_name": { + "attr_type": "host_name" + }, + "http_port": { + "attr_type": "http_port" + }, + "https_port": { + "attr_type": "https_port" + }, + "origin_host_header": { + "attr_type": "origin_host_header" + }, + "priority": { + "attr_type": "priority" + }, + "weight": { + "attr_type": "weight" + }, + "shared_private_link_resource": { + "attr_type": "shared_private_link_resource" + }, + "enabled_state": { + "attr_type": "enabled_state" + }, + "enforce_certificate_name_check": { + "attr_type": "enforce_certificate_name_check" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "AFDStateProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "provisioning_state": { + "attr_type": null + }, + "deployment_status": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ActionType": { + "type": "Enum", + "methods": {}, + "properties": { + "ALLOW": "ALLOW", + "BLOCK": "BLOCK", + "LOG": "LOG", + "REDIRECT": "REDIRECT", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ActivatedResourceReference": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "id": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "id": { + "attr_type": "id" + }, + "is_active": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "AfdCertificateType": { + "type": "Enum", + "methods": {}, + "properties": { + "AZURE_FIRST_PARTY_MANAGED_CERTIFICATE": "AZURE_FIRST_PARTY_MANAGED_CERTIFICATE", + "CUSTOMER_CERTIFICATE": "CUSTOMER_CERTIFICATE", + "MANAGED_CERTIFICATE": "MANAGED_CERTIFICATE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "AfdCipherSuiteSetType": { + "type": "Enum", + "methods": {}, + "properties": { + "CUSTOMIZED": "CUSTOMIZED", + "TLS10_2019": "TLS10_2019", + "TLS12_2022": "TLS12_2022", + "TLS12_2023": "TLS12_2023", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "AfdCustomizedCipherSuiteForTls12": { + "type": "Enum", + "methods": {}, + "properties": { + "DHE_RSA_AES128_GCM_SHA256": "DHE_RSA_AES128_GCM_SHA256", + "DHE_RSA_AES256_GCM_SHA384": "DHE_RSA_AES256_GCM_SHA384", + "ECDHE_RSA_AES128_GCM_SHA256": "ECDHE_RSA_AES128_GCM_SHA256", + "ECDHE_RSA_AES128_SHA256": "ECDHE_RSA_AES128_SHA256", + "ECDHE_RSA_AES256_GCM_SHA384": "ECDHE_RSA_AES256_GCM_SHA384", + "ECDHE_RSA_AES256_SHA384": "ECDHE_RSA_AES256_SHA384", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "AfdCustomizedCipherSuiteForTls13": { + "type": "Enum", + "methods": {}, + "properties": { + "TLS_AES128_GCM_SHA256": "TLS_AES128_GCM_SHA256", + "TLS_AES256_GCM_SHA384": "TLS_AES256_GCM_SHA384", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "AfdMinimumTlsVersion": { + "type": "Enum", + "methods": {}, + "properties": { + "TLS10": "TLS10", + "TLS12": "TLS12", + "TLS13": "TLS13", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "AfdProvisioningState": { + "type": "Enum", + "methods": {}, + "properties": { + "CREATING": "CREATING", + "DELETING": "DELETING", + "FAILED": "FAILED", + "SUCCEEDED": "SUCCEEDED", + "UPDATING": "UPDATING", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "AfdPurgeParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_paths": { + "default": null, + "param_type": "keyword_only" + }, + "domains": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "content_paths": { + "attr_type": "content_paths" + }, + "domains": { + "attr_type": "domains" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "AfdQueryStringCachingBehavior": { + "type": "Enum", + "methods": {}, + "properties": { + "IGNORE_QUERY_STRING": "IGNORE_QUERY_STRING", + "IGNORE_SPECIFIED_QUERY_STRINGS": "IGNORE_SPECIFIED_QUERY_STRINGS", + "INCLUDE_SPECIFIED_QUERY_STRINGS": "INCLUDE_SPECIFIED_QUERY_STRINGS", + "USE_QUERY_STRING": "USE_QUERY_STRING", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "AfdRouteCacheConfiguration": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "query_string_caching_behavior": { + "default": "none", + "param_type": "keyword_only" + }, + "query_parameters": { + "default": "none", + "param_type": "keyword_only" + }, + "compression_settings": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "query_string_caching_behavior": { + "attr_type": "query_string_caching_behavior" + }, + "query_parameters": { + "attr_type": "query_parameters" + }, + "compression_settings": { + "attr_type": "compression_settings" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "Algorithm": { + "type": "Enum", + "methods": {}, + "properties": { + "SHA256": "SHA256", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "AutoGeneratedDomainNameLabelScope": { + "type": "Enum", + "methods": {}, + "properties": { + "NO_REUSE": "NO_REUSE", + "RESOURCE_GROUP_REUSE": "RESOURCE_GROUP_REUSE", + "SUBSCRIPTION_REUSE": "SUBSCRIPTION_REUSE", + "TENANT_REUSE": "TENANT_REUSE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "AzureFirstPartyManagedCertificate": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "type": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "type": { + "attr_type": "type" + }, + "subject": { + "attr_type": null + }, + "expiration_date": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "AzureFirstPartyManagedCertificateParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "subject_alternative_names": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "type": { + "attr_type": null + }, + "secret_source": { + "attr_type": null + }, + "subject": { + "attr_type": null + }, + "expiration_date": { + "attr_type": null + }, + "certificate_authority": { + "attr_type": null + }, + "subject_alternative_names": { + "attr_type": "subject_alternative_names" + }, + "thumbprint": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "CacheBehavior": { + "type": "Enum", + "methods": {}, + "properties": { + "BYPASS_CACHE": "BYPASS_CACHE", + "OVERRIDE": "OVERRIDE", + "SET_IF_MISSING": "SET_IF_MISSING", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "CacheConfiguration": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "query_string_caching_behavior": { + "default": "none", + "param_type": "keyword_only" + }, + "query_parameters": { + "default": "none", + "param_type": "keyword_only" + }, + "is_compression_enabled": { + "default": "none", + "param_type": "keyword_only" + }, + "cache_behavior": { + "default": "none", + "param_type": "keyword_only" + }, + "cache_duration": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "query_string_caching_behavior": { + "attr_type": "query_string_caching_behavior" + }, + "query_parameters": { + "attr_type": "query_parameters" + }, + "is_compression_enabled": { + "attr_type": "is_compression_enabled" + }, + "cache_behavior": { + "attr_type": "cache_behavior" + }, + "cache_duration": { + "attr_type": "cache_duration" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "CacheExpirationActionParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cache_behavior": { + "default": null, + "param_type": "keyword_only" + }, + "cache_type": { + "default": null, + "param_type": "keyword_only" + }, + "cache_duration": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "type_name": { + "attr_type": null + }, + "cache_behavior": { + "attr_type": "cache_behavior" + }, + "cache_type": { + "attr_type": "cache_type" + }, + "cache_duration": { + "attr_type": "cache_duration" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "CacheKeyQueryStringActionParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "query_string_behavior": { + "default": null, + "param_type": "keyword_only" + }, + "query_parameters": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "type_name": { + "attr_type": null + }, + "query_string_behavior": { + "attr_type": "query_string_behavior" + }, + "query_parameters": { + "attr_type": "query_parameters" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "CacheType": { + "type": "Enum", + "methods": {}, + "properties": { + "ALL": "ALL", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "CanMigrateDefaultSku": { + "type": "Enum", + "methods": {}, + "properties": { + "PREMIUM_AZURE_FRONT_DOOR": "PREMIUM_AZURE_FRONT_DOOR", + "STANDARD_AZURE_FRONT_DOOR": "STANDARD_AZURE_FRONT_DOOR", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "CanMigrateParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "classic_resource_reference": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "classic_resource_reference": { + "attr_type": "classic_resource_reference" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "CanMigrateResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "errors": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "id": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "can_migrate": { + "attr_type": null + }, + "default_sku": { + "attr_type": null + }, + "errors": { + "attr_type": "errors" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "CdnCertificateSourceParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_type": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "type_name": { + "attr_type": null + }, + "certificate_type": { + "attr_type": "certificate_type" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "CdnEndpoint": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "id": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "id": { + "attr_type": "id" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "CdnManagedHttpsParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "protocol_type": { + "default": null, + "param_type": "keyword_only" + }, + "certificate_source_parameters": { + "default": null, + "param_type": "keyword_only" + }, + "minimum_tls_version": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "certificate_source": { + "attr_type": null + }, + "certificate_source_parameters": { + "attr_type": "certificate_source_parameters" + }, + "protocol_type": { + "attr_type": "protocol_type" + }, + "minimum_tls_version": { + "attr_type": "minimum_tls_version" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "CdnMigrationToAfdParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "sku": { + "default": null, + "param_type": "keyword_only" + }, + "migration_endpoint_mappings": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "sku": { + "attr_type": "sku" + }, + "migration_endpoint_mappings": { + "attr_type": "migration_endpoint_mappings" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "CdnWebApplicationFirewallPolicy": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "default": null, + "param_type": "keyword_only" + }, + "sku": { + "default": null, + "param_type": "keyword_only" + }, + "tags": { + "default": "none", + "param_type": "keyword_only" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "policy_settings": { + "default": "none", + "param_type": "keyword_only" + }, + "rate_limit_rules": { + "default": "none", + "param_type": "keyword_only" + }, + "custom_rules": { + "default": "none", + "param_type": "keyword_only" + }, + "managed_rules": { + "default": "none", + "param_type": "keyword_only" + }, + "extended_properties": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "etag": { + "attr_type": "etag" + }, + "sku": { + "attr_type": "sku" + }, + "policy_settings": { + "attr_type": "policy_settings" + }, + "rate_limit_rules": { + "attr_type": "rate_limit_rules" + }, + "custom_rules": { + "attr_type": "custom_rules" + }, + "managed_rules": { + "attr_type": "managed_rules" + }, + "endpoint_links": { + "attr_type": null + }, + "extended_properties": { + "attr_type": "extended_properties" + }, + "provisioning_state": { + "attr_type": null + }, + "resource_state": { + "attr_type": null + }, + "tags": { + "attr_type": "tags" + }, + "location": { + "attr_type": "location" + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "system_data": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "CdnWebApplicationFirewallPolicyList": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "next_link": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": null + }, + "next_link": { + "attr_type": "next_link" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "CdnWebApplicationFirewallPolicyPatchParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tags": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "tags": { + "attr_type": "tags" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "Certificate": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "type": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "type": { + "attr_type": "type" + }, + "subject": { + "attr_type": null + }, + "expiration_date": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "CertificateSource": { + "type": "Enum", + "methods": {}, + "properties": { + "AZURE_KEY_VAULT": "AZURE_KEY_VAULT", + "CDN": "CDN", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "CertificateSourceParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "type_name": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "CertificateSourceParametersType": { + "type": "Enum", + "methods": {}, + "properties": { + "CDN_CERTIFICATE_SOURCE_PARAMETERS": "CDN_CERTIFICATE_SOURCE_PARAMETERS", + "KEY_VAULT_CERTIFICATE_SOURCE_PARAMETERS": "KEY_VAULT_CERTIFICATE_SOURCE_PARAMETERS", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "CertificateType": { + "type": "Enum", + "methods": {}, + "properties": { + "DEDICATED": "DEDICATED", + "SHARED": "SHARED", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "CheckEndpointNameAvailabilityInput": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "keyword_only" + }, + "type": { + "default": null, + "param_type": "keyword_only" + }, + "auto_generated_domain_name_label_scope": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "name": { + "attr_type": "name" + }, + "type": { + "attr_type": "type" + }, + "auto_generated_domain_name_label_scope": { + "attr_type": "auto_generated_domain_name_label_scope" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "CheckEndpointNameAvailabilityOutput": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "name_available": { + "attr_type": null + }, + "available_hostname": { + "attr_type": null + }, + "reason": { + "attr_type": null + }, + "message": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "CheckHostNameAvailabilityInput": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "host_name": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "host_name": { + "attr_type": "host_name" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "CheckNameAvailabilityInput": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "keyword_only" + }, + "type": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "name": { + "attr_type": "name" + }, + "type": { + "attr_type": "type" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "CheckNameAvailabilityOutput": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "name_available": { + "attr_type": null + }, + "reason": { + "attr_type": null + }, + "message": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "CidrIpAddress": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "base_ip_address": { + "default": "none", + "param_type": "keyword_only" + }, + "prefix_length": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "base_ip_address": { + "attr_type": "base_ip_address" + }, + "prefix_length": { + "attr_type": "prefix_length" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ClientPortMatchConditionParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operator": { + "default": null, + "param_type": "keyword_only" + }, + "negate_condition": { + "default": "bool", + "param_type": "keyword_only" + }, + "match_values": { + "default": "none", + "param_type": "keyword_only" + }, + "transforms": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "type_name": { + "attr_type": null + }, + "operator": { + "attr_type": "operator" + }, + "negate_condition": { + "attr_type": "negate_condition" + }, + "match_values": { + "attr_type": "match_values" + }, + "transforms": { + "attr_type": "transforms" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ClientPortOperator": { + "type": "Enum", + "methods": {}, + "properties": { + "ANY": "ANY", + "BEGINS_WITH": "BEGINS_WITH", + "CONTAINS": "CONTAINS", + "ENDS_WITH": "ENDS_WITH", + "EQUAL": "EQUAL", + "GREATER_THAN": "GREATER_THAN", + "GREATER_THAN_OR_EQUAL": "GREATER_THAN_OR_EQUAL", + "LESS_THAN": "LESS_THAN", + "LESS_THAN_OR_EQUAL": "LESS_THAN_OR_EQUAL", + "REG_EX": "REG_EX", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "Components18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsPropertiesDataItems": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "date_time": { + "default": "none", + "param_type": "keyword_only" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "date_time": { + "attr_type": "date_time" + }, + "value": { + "attr_type": "value" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "Components1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsPropertiesDataItems": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "date_time": { + "default": "none", + "param_type": "keyword_only" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "date_time": { + "attr_type": "date_time" + }, + "value": { + "attr_type": "value" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItems": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "metric": { + "default": "none", + "param_type": "keyword_only" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "percentage": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "metric": { + "attr_type": "metric" + }, + "value": { + "attr_type": "value" + }, + "percentage": { + "attr_type": "percentage" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "CompressionSettings": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_types_to_compress": { + "default": "none", + "param_type": "keyword_only" + }, + "is_compression_enabled": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "content_types_to_compress": { + "attr_type": "content_types_to_compress" + }, + "is_compression_enabled": { + "attr_type": "is_compression_enabled" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ContinentsResponse": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "continents": { + "default": "none", + "param_type": "keyword_only" + }, + "country_or_regions": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "continents": { + "attr_type": "continents" + }, + "country_or_regions": { + "attr_type": "country_or_regions" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ContinentsResponseContinentsItem": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "id": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "id": { + "attr_type": "id" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ContinentsResponseCountryOrRegionsItem": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "id": { + "default": "none", + "param_type": "keyword_only" + }, + "continent_id": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "id": { + "attr_type": "id" + }, + "continent_id": { + "attr_type": "continent_id" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "CookiesMatchConditionParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operator": { + "default": null, + "param_type": "keyword_only" + }, + "selector": { + "default": "none", + "param_type": "keyword_only" + }, + "negate_condition": { + "default": "bool", + "param_type": "keyword_only" + }, + "match_values": { + "default": "none", + "param_type": "keyword_only" + }, + "transforms": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "type_name": { + "attr_type": null + }, + "selector": { + "attr_type": "selector" + }, + "operator": { + "attr_type": "operator" + }, + "negate_condition": { + "attr_type": "negate_condition" + }, + "match_values": { + "attr_type": "match_values" + }, + "transforms": { + "attr_type": "transforms" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "CookiesOperator": { + "type": "Enum", + "methods": {}, + "properties": { + "ANY": "ANY", + "BEGINS_WITH": "BEGINS_WITH", + "CONTAINS": "CONTAINS", + "ENDS_WITH": "ENDS_WITH", + "EQUAL": "EQUAL", + "GREATER_THAN": "GREATER_THAN", + "GREATER_THAN_OR_EQUAL": "GREATER_THAN_OR_EQUAL", + "LESS_THAN": "LESS_THAN", + "LESS_THAN_OR_EQUAL": "LESS_THAN_OR_EQUAL", + "REG_EX": "REG_EX", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "CreatedByType": { + "type": "Enum", + "methods": {}, + "properties": { + "APPLICATION": "APPLICATION", + "KEY": "KEY", + "MANAGED_IDENTITY": "MANAGED_IDENTITY", + "USER": "USER", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "CustomDomain": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "host_name": { + "default": "none", + "param_type": "keyword_only" + }, + "custom_https_parameters": { + "default": "none", + "param_type": "keyword_only" + }, + "validation_data": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "host_name": { + "attr_type": "host_name" + }, + "resource_state": { + "attr_type": null + }, + "custom_https_provisioning_state": { + "attr_type": null + }, + "custom_https_provisioning_substate": { + "attr_type": null + }, + "custom_https_parameters": { + "attr_type": "custom_https_parameters" + }, + "validation_data": { + "attr_type": "validation_data" + }, + "provisioning_state": { + "attr_type": null + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "system_data": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "CustomDomainHttpsParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "protocol_type": { + "default": null, + "param_type": "keyword_only" + }, + "minimum_tls_version": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "certificate_source": { + "attr_type": null + }, + "protocol_type": { + "attr_type": "protocol_type" + }, + "minimum_tls_version": { + "attr_type": "minimum_tls_version" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "CustomDomainListResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "next_link": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": null + }, + "next_link": { + "attr_type": "next_link" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "CustomDomainParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "host_name": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "host_name": { + "attr_type": "host_name" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "CustomDomainResourceState": { + "type": "Enum", + "methods": {}, + "properties": { + "ACTIVE": "ACTIVE", + "CREATING": "CREATING", + "DELETING": "DELETING", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "CustomHttpsProvisioningState": { + "type": "Enum", + "methods": {}, + "properties": { + "DISABLED": "DISABLED", + "DISABLING": "DISABLING", + "ENABLED": "ENABLED", + "ENABLING": "ENABLING", + "FAILED": "FAILED", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "CustomHttpsProvisioningSubstate": { + "type": "Enum", + "methods": {}, + "properties": { + "CERTIFICATE_DELETED": "CERTIFICATE_DELETED", + "CERTIFICATE_DEPLOYED": "CERTIFICATE_DEPLOYED", + "DELETING_CERTIFICATE": "DELETING_CERTIFICATE", + "DEPLOYING_CERTIFICATE": "DEPLOYING_CERTIFICATE", + "DOMAIN_CONTROL_VALIDATION_REQUEST_APPROVED": "DOMAIN_CONTROL_VALIDATION_REQUEST_APPROVED", + "DOMAIN_CONTROL_VALIDATION_REQUEST_REJECTED": "DOMAIN_CONTROL_VALIDATION_REQUEST_REJECTED", + "DOMAIN_CONTROL_VALIDATION_REQUEST_TIMED_OUT": "DOMAIN_CONTROL_VALIDATION_REQUEST_TIMED_OUT", + "ISSUING_CERTIFICATE": "ISSUING_CERTIFICATE", + "PENDING_DOMAIN_CONTROL_VALIDATION_R_EQUEST_APPROVAL": "PENDING_DOMAIN_CONTROL_VALIDATION_R_EQUEST_APPROVAL", + "SUBMITTING_DOMAIN_CONTROL_VALIDATION_REQUEST": "SUBMITTING_DOMAIN_CONTROL_VALIDATION_REQUEST", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "CustomRule": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "keyword_only" + }, + "priority": { + "default": null, + "param_type": "keyword_only" + }, + "match_conditions": { + "default": null, + "param_type": "keyword_only" + }, + "action": { + "default": null, + "param_type": "keyword_only" + }, + "enabled_state": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "name": { + "attr_type": "name" + }, + "enabled_state": { + "attr_type": "enabled_state" + }, + "priority": { + "attr_type": "priority" + }, + "match_conditions": { + "attr_type": "match_conditions" + }, + "action": { + "attr_type": "action" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "CustomRuleEnabledState": { + "type": "Enum", + "methods": {}, + "properties": { + "DISABLED": "DISABLED", + "ENABLED": "ENABLED", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "CustomRuleList": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "rules": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "rules": { + "attr_type": "rules" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "CustomerCertificate": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "type": { + "default": "none", + "param_type": "keyword_only" + }, + "secret_source": { + "default": "none", + "param_type": "keyword_only" + }, + "secret_version": { + "default": "none", + "param_type": "keyword_only" + }, + "use_latest_version": { + "default": "none", + "param_type": "keyword_only" + }, + "subject_alternative_names": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "secret_source": { + "attr_type": "secret_source" + }, + "secret_version": { + "attr_type": "secret_version" + }, + "certificate_authority": { + "attr_type": null + }, + "use_latest_version": { + "attr_type": "use_latest_version" + }, + "subject_alternative_names": { + "attr_type": "subject_alternative_names" + }, + "thumbprint": { + "attr_type": null + }, + "type": { + "attr_type": "type" + }, + "subject": { + "attr_type": null + }, + "expiration_date": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "CustomerCertificateParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "secret_source": { + "default": null, + "param_type": "keyword_only" + }, + "secret_version": { + "default": "none", + "param_type": "keyword_only" + }, + "use_latest_version": { + "default": "none", + "param_type": "keyword_only" + }, + "subject_alternative_names": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "type": { + "attr_type": null + }, + "secret_source": { + "attr_type": "secret_source" + }, + "secret_version": { + "attr_type": "secret_version" + }, + "use_latest_version": { + "attr_type": "use_latest_version" + }, + "subject": { + "attr_type": null + }, + "expiration_date": { + "attr_type": null + }, + "certificate_authority": { + "attr_type": null + }, + "subject_alternative_names": { + "attr_type": "subject_alternative_names" + }, + "thumbprint": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "DeepCreatedCustomDomain": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "keyword_only" + }, + "host_name": { + "default": "none", + "param_type": "keyword_only" + }, + "validation_data": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "name": { + "attr_type": "name" + }, + "host_name": { + "attr_type": "host_name" + }, + "validation_data": { + "attr_type": "validation_data" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "DeepCreatedOrigin": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "keyword_only" + }, + "host_name": { + "default": "none", + "param_type": "keyword_only" + }, + "http_port": { + "default": "none", + "param_type": "keyword_only" + }, + "https_port": { + "default": "none", + "param_type": "keyword_only" + }, + "origin_host_header": { + "default": "none", + "param_type": "keyword_only" + }, + "priority": { + "default": "none", + "param_type": "keyword_only" + }, + "weight": { + "default": "none", + "param_type": "keyword_only" + }, + "enabled": { + "default": "none", + "param_type": "keyword_only" + }, + "private_link_alias": { + "default": "none", + "param_type": "keyword_only" + }, + "private_link_resource_id": { + "default": "none", + "param_type": "keyword_only" + }, + "private_link_location": { + "default": "none", + "param_type": "keyword_only" + }, + "private_link_approval_message": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "name": { + "attr_type": "name" + }, + "host_name": { + "attr_type": "host_name" + }, + "http_port": { + "attr_type": "http_port" + }, + "https_port": { + "attr_type": "https_port" + }, + "origin_host_header": { + "attr_type": "origin_host_header" + }, + "priority": { + "attr_type": "priority" + }, + "weight": { + "attr_type": "weight" + }, + "enabled": { + "attr_type": "enabled" + }, + "private_link_alias": { + "attr_type": "private_link_alias" + }, + "private_link_resource_id": { + "attr_type": "private_link_resource_id" + }, + "private_link_location": { + "attr_type": "private_link_location" + }, + "private_link_approval_message": { + "attr_type": "private_link_approval_message" + }, + "private_endpoint_status": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "DeepCreatedOriginGroup": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "keyword_only" + }, + "health_probe_settings": { + "default": "none", + "param_type": "keyword_only" + }, + "origins": { + "default": "none", + "param_type": "keyword_only" + }, + "traffic_restoration_time_to_healed_or_new_endpoints_in_minutes": { + "default": "none", + "param_type": "keyword_only" + }, + "response_based_origin_error_detection_settings": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "name": { + "attr_type": "name" + }, + "health_probe_settings": { + "attr_type": "health_probe_settings" + }, + "origins": { + "attr_type": "origins" + }, + "traffic_restoration_time_to_healed_or_new_endpoints_in_minutes": { + "attr_type": "traffic_restoration_time_to_healed_or_new_endpoints_in_minutes" + }, + "response_based_origin_error_detection_settings": { + "attr_type": "response_based_origin_error_detection_settings" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "DeleteRule": { + "type": "Enum", + "methods": {}, + "properties": { + "NO_ACTION": "NO_ACTION", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "DeliveryRule": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "order": { + "default": null, + "param_type": "keyword_only" + }, + "actions": { + "default": null, + "param_type": "keyword_only" + }, + "name": { + "default": "none", + "param_type": "keyword_only" + }, + "conditions": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "name": { + "attr_type": "name" + }, + "order": { + "attr_type": "order" + }, + "conditions": { + "attr_type": "conditions" + }, + "actions": { + "attr_type": "actions" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "DeliveryRuleAction": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "name": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "DeliveryRuleActionEnum": { + "type": "Enum", + "methods": {}, + "properties": { + "CACHE_EXPIRATION": "CACHE_EXPIRATION", + "CACHE_KEY_QUERY_STRING": "CACHE_KEY_QUERY_STRING", + "MODIFY_REQUEST_HEADER": "MODIFY_REQUEST_HEADER", + "MODIFY_RESPONSE_HEADER": "MODIFY_RESPONSE_HEADER", + "ORIGIN_GROUP_OVERRIDE": "ORIGIN_GROUP_OVERRIDE", + "ROUTE_CONFIGURATION_OVERRIDE": "ROUTE_CONFIGURATION_OVERRIDE", + "URL_REDIRECT": "URL_REDIRECT", + "URL_REWRITE": "URL_REWRITE", + "URL_SIGNING": "URL_SIGNING", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "DeliveryRuleActionParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "type_name": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "DeliveryRuleActionParametersType": { + "type": "Enum", + "methods": {}, + "properties": { + "DELIVERY_RULE_CACHE_EXPIRATION_ACTION_PARAMETERS": "DELIVERY_RULE_CACHE_EXPIRATION_ACTION_PARAMETERS", + "DELIVERY_RULE_CACHE_KEY_QUERY_STRING_BEHAVIOR_ACTION_PARAMETERS": "DELIVERY_RULE_CACHE_KEY_QUERY_STRING_BEHAVIOR_ACTION_PARAMETERS", + "DELIVERY_RULE_HEADER_ACTION_PARAMETERS": "DELIVERY_RULE_HEADER_ACTION_PARAMETERS", + "DELIVERY_RULE_ORIGIN_GROUP_OVERRIDE_ACTION_PARAMETERS": "DELIVERY_RULE_ORIGIN_GROUP_OVERRIDE_ACTION_PARAMETERS", + "DELIVERY_RULE_ROUTE_CONFIGURATION_OVERRIDE_ACTION_PARAMETERS": "DELIVERY_RULE_ROUTE_CONFIGURATION_OVERRIDE_ACTION_PARAMETERS", + "DELIVERY_RULE_URL_REDIRECT_ACTION_PARAMETERS": "DELIVERY_RULE_URL_REDIRECT_ACTION_PARAMETERS", + "DELIVERY_RULE_URL_REWRITE_ACTION_PARAMETERS": "DELIVERY_RULE_URL_REWRITE_ACTION_PARAMETERS", + "DELIVERY_RULE_URL_SIGNING_ACTION_PARAMETERS": "DELIVERY_RULE_URL_SIGNING_ACTION_PARAMETERS", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "DeliveryRuleCacheExpirationAction": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "name": { + "attr_type": null + }, + "parameters": { + "attr_type": "parameters" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "DeliveryRuleCacheKeyQueryStringAction": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "name": { + "attr_type": null + }, + "parameters": { + "attr_type": "parameters" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "DeliveryRuleClientPortCondition": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "name": { + "attr_type": null + }, + "parameters": { + "attr_type": "parameters" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "DeliveryRuleCondition": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "name": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "DeliveryRuleConditionParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "type_name": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "DeliveryRuleConditionParametersType": { + "type": "Enum", + "methods": {}, + "properties": { + "DELIVERY_RULE_CLIENT_PORT_CONDITION_PARAMETERS": "DELIVERY_RULE_CLIENT_PORT_CONDITION_PARAMETERS", + "DELIVERY_RULE_COOKIES_CONDITION_PARAMETERS": "DELIVERY_RULE_COOKIES_CONDITION_PARAMETERS", + "DELIVERY_RULE_HOST_NAME_CONDITION_PARAMETERS": "DELIVERY_RULE_HOST_NAME_CONDITION_PARAMETERS", + "DELIVERY_RULE_HTTP_VERSION_CONDITION_PARAMETERS": "DELIVERY_RULE_HTTP_VERSION_CONDITION_PARAMETERS", + "DELIVERY_RULE_IS_DEVICE_CONDITION_PARAMETERS": "DELIVERY_RULE_IS_DEVICE_CONDITION_PARAMETERS", + "DELIVERY_RULE_POST_ARGS_CONDITION_PARAMETERS": "DELIVERY_RULE_POST_ARGS_CONDITION_PARAMETERS", + "DELIVERY_RULE_QUERY_STRING_CONDITION_PARAMETERS": "DELIVERY_RULE_QUERY_STRING_CONDITION_PARAMETERS", + "DELIVERY_RULE_REMOTE_ADDRESS_CONDITION_PARAMETERS": "DELIVERY_RULE_REMOTE_ADDRESS_CONDITION_PARAMETERS", + "DELIVERY_RULE_REQUEST_BODY_CONDITION_PARAMETERS": "DELIVERY_RULE_REQUEST_BODY_CONDITION_PARAMETERS", + "DELIVERY_RULE_REQUEST_HEADER_CONDITION_PARAMETERS": "DELIVERY_RULE_REQUEST_HEADER_CONDITION_PARAMETERS", + "DELIVERY_RULE_REQUEST_METHOD_CONDITION_PARAMETERS": "DELIVERY_RULE_REQUEST_METHOD_CONDITION_PARAMETERS", + "DELIVERY_RULE_REQUEST_SCHEME_CONDITION_PARAMETERS": "DELIVERY_RULE_REQUEST_SCHEME_CONDITION_PARAMETERS", + "DELIVERY_RULE_REQUEST_URI_CONDITION_PARAMETERS": "DELIVERY_RULE_REQUEST_URI_CONDITION_PARAMETERS", + "DELIVERY_RULE_SERVER_PORT_CONDITION_PARAMETERS": "DELIVERY_RULE_SERVER_PORT_CONDITION_PARAMETERS", + "DELIVERY_RULE_SOCKET_ADDR_CONDITION_PARAMETERS": "DELIVERY_RULE_SOCKET_ADDR_CONDITION_PARAMETERS", + "DELIVERY_RULE_SSL_PROTOCOL_CONDITION_PARAMETERS": "DELIVERY_RULE_SSL_PROTOCOL_CONDITION_PARAMETERS", + "DELIVERY_RULE_URL_FILENAME_CONDITION_PARAMETERS": "DELIVERY_RULE_URL_FILENAME_CONDITION_PARAMETERS", + "DELIVERY_RULE_URL_FILE_EXTENSION_MATCH_CONDITION_PARAMETERS": "DELIVERY_RULE_URL_FILE_EXTENSION_MATCH_CONDITION_PARAMETERS", + "DELIVERY_RULE_URL_PATH_MATCH_CONDITION_PARAMETERS": "DELIVERY_RULE_URL_PATH_MATCH_CONDITION_PARAMETERS", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "DeliveryRuleCookiesCondition": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "name": { + "attr_type": null + }, + "parameters": { + "attr_type": "parameters" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "DeliveryRuleHostNameCondition": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "name": { + "attr_type": null + }, + "parameters": { + "attr_type": "parameters" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "DeliveryRuleHttpVersionCondition": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "name": { + "attr_type": null + }, + "parameters": { + "attr_type": "parameters" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "DeliveryRuleIsDeviceCondition": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "name": { + "attr_type": null + }, + "parameters": { + "attr_type": "parameters" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "DeliveryRulePostArgsCondition": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "name": { + "attr_type": null + }, + "parameters": { + "attr_type": "parameters" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "DeliveryRuleQueryStringCondition": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "name": { + "attr_type": null + }, + "parameters": { + "attr_type": "parameters" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "DeliveryRuleRemoteAddressCondition": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "name": { + "attr_type": null + }, + "parameters": { + "attr_type": "parameters" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "DeliveryRuleRequestBodyCondition": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "name": { + "attr_type": null + }, + "parameters": { + "attr_type": "parameters" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "DeliveryRuleRequestHeaderAction": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "name": { + "attr_type": null + }, + "parameters": { + "attr_type": "parameters" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "DeliveryRuleRequestHeaderCondition": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "name": { + "attr_type": null + }, + "parameters": { + "attr_type": "parameters" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "DeliveryRuleRequestMethodCondition": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "name": { + "attr_type": null + }, + "parameters": { + "attr_type": "parameters" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "DeliveryRuleRequestSchemeCondition": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "name": { + "attr_type": null + }, + "parameters": { + "attr_type": "parameters" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "DeliveryRuleRequestUriCondition": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "name": { + "attr_type": null + }, + "parameters": { + "attr_type": "parameters" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "DeliveryRuleResponseHeaderAction": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "name": { + "attr_type": null + }, + "parameters": { + "attr_type": "parameters" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "DeliveryRuleRouteConfigurationOverrideAction": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "name": { + "attr_type": null + }, + "parameters": { + "attr_type": "parameters" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "DeliveryRuleServerPortCondition": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "name": { + "attr_type": null + }, + "parameters": { + "attr_type": "parameters" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "DeliveryRuleSocketAddrCondition": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "name": { + "attr_type": null + }, + "parameters": { + "attr_type": "parameters" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "DeliveryRuleSslProtocolCondition": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "name": { + "attr_type": null + }, + "parameters": { + "attr_type": "parameters" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "DeliveryRuleUrlFileExtensionCondition": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "name": { + "attr_type": null + }, + "parameters": { + "attr_type": "parameters" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "DeliveryRuleUrlFileNameCondition": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "name": { + "attr_type": null + }, + "parameters": { + "attr_type": "parameters" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "DeliveryRuleUrlPathCondition": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "name": { + "attr_type": null + }, + "parameters": { + "attr_type": "parameters" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "DeploymentStatus": { + "type": "Enum", + "methods": {}, + "properties": { + "FAILED": "FAILED", + "IN_PROGRESS": "IN_PROGRESS", + "NOT_STARTED": "NOT_STARTED", + "SUCCEEDED": "SUCCEEDED", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "DestinationProtocol": { + "type": "Enum", + "methods": {}, + "properties": { + "HTTP": "HTTP", + "HTTPS": "HTTPS", + "MATCH_REQUEST": "MATCH_REQUEST", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "DimensionProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": "none", + "param_type": "keyword_only" + }, + "display_name": { + "default": "none", + "param_type": "keyword_only" + }, + "internal_name": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "name": { + "attr_type": "name" + }, + "display_name": { + "attr_type": "display_name" + }, + "internal_name": { + "attr_type": "internal_name" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "DomainValidationProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "validation_token": { + "attr_type": null + }, + "expiration_date": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "DomainValidationState": { + "type": "Enum", + "methods": {}, + "properties": { + "APPROVED": "APPROVED", + "INTERNAL_ERROR": "INTERNAL_ERROR", + "PENDING": "PENDING", + "PENDING_REVALIDATION": "PENDING_REVALIDATION", + "REFRESHING_VALIDATION_TOKEN": "REFRESHING_VALIDATION_TOKEN", + "REJECTED": "REJECTED", + "SUBMITTING": "SUBMITTING", + "TIMED_OUT": "TIMED_OUT", + "UNKNOWN": "UNKNOWN", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "EdgeNode": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_address_groups": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "ip_address_groups": { + "attr_type": "ip_address_groups" + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "system_data": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "EdgenodeResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "next_link": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": null + }, + "next_link": { + "attr_type": "next_link" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "EnabledState": { + "type": "Enum", + "methods": {}, + "properties": { + "DISABLED": "DISABLED", + "ENABLED": "ENABLED", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "Endpoint": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "default": null, + "param_type": "keyword_only" + }, + "tags": { + "default": "none", + "param_type": "keyword_only" + }, + "origin_path": { + "default": "none", + "param_type": "keyword_only" + }, + "content_types_to_compress": { + "default": "none", + "param_type": "keyword_only" + }, + "origin_host_header": { + "default": "none", + "param_type": "keyword_only" + }, + "is_compression_enabled": { + "default": "none", + "param_type": "keyword_only" + }, + "is_http_allowed": { + "default": "bool", + "param_type": "keyword_only" + }, + "is_https_allowed": { + "default": "bool", + "param_type": "keyword_only" + }, + "query_string_caching_behavior": { + "default": "none", + "param_type": "keyword_only" + }, + "optimization_type": { + "default": "none", + "param_type": "keyword_only" + }, + "probe_path": { + "default": "none", + "param_type": "keyword_only" + }, + "geo_filters": { + "default": "none", + "param_type": "keyword_only" + }, + "default_origin_group": { + "default": "none", + "param_type": "keyword_only" + }, + "url_signing_keys": { + "default": "none", + "param_type": "keyword_only" + }, + "delivery_policy": { + "default": "none", + "param_type": "keyword_only" + }, + "web_application_firewall_policy_link": { + "default": "none", + "param_type": "keyword_only" + }, + "origins": { + "default": "none", + "param_type": "keyword_only" + }, + "origin_groups": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "origin_path": { + "attr_type": "origin_path" + }, + "content_types_to_compress": { + "attr_type": "content_types_to_compress" + }, + "origin_host_header": { + "attr_type": "origin_host_header" + }, + "is_compression_enabled": { + "attr_type": "is_compression_enabled" + }, + "is_http_allowed": { + "attr_type": "is_http_allowed" + }, + "is_https_allowed": { + "attr_type": "is_https_allowed" + }, + "query_string_caching_behavior": { + "attr_type": "query_string_caching_behavior" + }, + "optimization_type": { + "attr_type": "optimization_type" + }, + "probe_path": { + "attr_type": "probe_path" + }, + "geo_filters": { + "attr_type": "geo_filters" + }, + "default_origin_group": { + "attr_type": "default_origin_group" + }, + "url_signing_keys": { + "attr_type": "url_signing_keys" + }, + "delivery_policy": { + "attr_type": "delivery_policy" + }, + "web_application_firewall_policy_link": { + "attr_type": "web_application_firewall_policy_link" + }, + "host_name": { + "attr_type": null + }, + "origins": { + "attr_type": "origins" + }, + "origin_groups": { + "attr_type": "origin_groups" + }, + "custom_domains": { + "attr_type": null + }, + "resource_state": { + "attr_type": null + }, + "provisioning_state": { + "attr_type": null + }, + "tags": { + "attr_type": "tags" + }, + "location": { + "attr_type": "location" + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "system_data": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "EndpointListResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "next_link": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": null + }, + "next_link": { + "attr_type": "next_link" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "EndpointProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "origins": { + "default": null, + "param_type": "keyword_only" + }, + "origin_path": { + "default": "none", + "param_type": "keyword_only" + }, + "content_types_to_compress": { + "default": "none", + "param_type": "keyword_only" + }, + "origin_host_header": { + "default": "none", + "param_type": "keyword_only" + }, + "is_compression_enabled": { + "default": "none", + "param_type": "keyword_only" + }, + "is_http_allowed": { + "default": "bool", + "param_type": "keyword_only" + }, + "is_https_allowed": { + "default": "bool", + "param_type": "keyword_only" + }, + "query_string_caching_behavior": { + "default": "none", + "param_type": "keyword_only" + }, + "optimization_type": { + "default": "none", + "param_type": "keyword_only" + }, + "probe_path": { + "default": "none", + "param_type": "keyword_only" + }, + "geo_filters": { + "default": "none", + "param_type": "keyword_only" + }, + "default_origin_group": { + "default": "none", + "param_type": "keyword_only" + }, + "url_signing_keys": { + "default": "none", + "param_type": "keyword_only" + }, + "delivery_policy": { + "default": "none", + "param_type": "keyword_only" + }, + "web_application_firewall_policy_link": { + "default": "none", + "param_type": "keyword_only" + }, + "origin_groups": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "host_name": { + "attr_type": null + }, + "origins": { + "attr_type": "origins" + }, + "origin_groups": { + "attr_type": "origin_groups" + }, + "custom_domains": { + "attr_type": null + }, + "resource_state": { + "attr_type": null + }, + "provisioning_state": { + "attr_type": null + }, + "origin_path": { + "attr_type": "origin_path" + }, + "content_types_to_compress": { + "attr_type": "content_types_to_compress" + }, + "origin_host_header": { + "attr_type": "origin_host_header" + }, + "is_compression_enabled": { + "attr_type": "is_compression_enabled" + }, + "is_http_allowed": { + "attr_type": "is_http_allowed" + }, + "is_https_allowed": { + "attr_type": "is_https_allowed" + }, + "query_string_caching_behavior": { + "attr_type": "query_string_caching_behavior" + }, + "optimization_type": { + "attr_type": "optimization_type" + }, + "probe_path": { + "attr_type": "probe_path" + }, + "geo_filters": { + "attr_type": "geo_filters" + }, + "default_origin_group": { + "attr_type": "default_origin_group" + }, + "url_signing_keys": { + "attr_type": "url_signing_keys" + }, + "delivery_policy": { + "attr_type": "delivery_policy" + }, + "web_application_firewall_policy_link": { + "attr_type": "web_application_firewall_policy_link" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "EndpointPropertiesUpdateParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_path": { + "default": "none", + "param_type": "keyword_only" + }, + "content_types_to_compress": { + "default": "none", + "param_type": "keyword_only" + }, + "origin_host_header": { + "default": "none", + "param_type": "keyword_only" + }, + "is_compression_enabled": { + "default": "none", + "param_type": "keyword_only" + }, + "is_http_allowed": { + "default": "bool", + "param_type": "keyword_only" + }, + "is_https_allowed": { + "default": "bool", + "param_type": "keyword_only" + }, + "query_string_caching_behavior": { + "default": "none", + "param_type": "keyword_only" + }, + "optimization_type": { + "default": "none", + "param_type": "keyword_only" + }, + "probe_path": { + "default": "none", + "param_type": "keyword_only" + }, + "geo_filters": { + "default": "none", + "param_type": "keyword_only" + }, + "default_origin_group": { + "default": "none", + "param_type": "keyword_only" + }, + "url_signing_keys": { + "default": "none", + "param_type": "keyword_only" + }, + "delivery_policy": { + "default": "none", + "param_type": "keyword_only" + }, + "web_application_firewall_policy_link": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "origin_path": { + "attr_type": "origin_path" + }, + "content_types_to_compress": { + "attr_type": "content_types_to_compress" + }, + "origin_host_header": { + "attr_type": "origin_host_header" + }, + "is_compression_enabled": { + "attr_type": "is_compression_enabled" + }, + "is_http_allowed": { + "attr_type": "is_http_allowed" + }, + "is_https_allowed": { + "attr_type": "is_https_allowed" + }, + "query_string_caching_behavior": { + "attr_type": "query_string_caching_behavior" + }, + "optimization_type": { + "attr_type": "optimization_type" + }, + "probe_path": { + "attr_type": "probe_path" + }, + "geo_filters": { + "attr_type": "geo_filters" + }, + "default_origin_group": { + "attr_type": "default_origin_group" + }, + "url_signing_keys": { + "attr_type": "url_signing_keys" + }, + "delivery_policy": { + "attr_type": "delivery_policy" + }, + "web_application_firewall_policy_link": { + "attr_type": "web_application_firewall_policy_link" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "EndpointPropertiesUpdateParametersDeliveryPolicy": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "rules": { + "default": null, + "param_type": "keyword_only" + }, + "description": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "description": { + "attr_type": "description" + }, + "rules": { + "attr_type": "rules" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "id": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "id": { + "attr_type": "id" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "EndpointProvisioningState": { + "type": "Enum", + "methods": {}, + "properties": { + "CREATING": "CREATING", + "DELETING": "DELETING", + "FAILED": "FAILED", + "SUCCEEDED": "SUCCEEDED", + "UPDATING": "UPDATING", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "EndpointResourceState": { + "type": "Enum", + "methods": {}, + "properties": { + "CREATING": "CREATING", + "DELETING": "DELETING", + "RUNNING": "RUNNING", + "STARTING": "STARTING", + "STOPPED": "STOPPED", + "STOPPING": "STOPPING", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "EndpointUpdateParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tags": { + "default": "none", + "param_type": "keyword_only" + }, + "origin_path": { + "default": "none", + "param_type": "keyword_only" + }, + "content_types_to_compress": { + "default": "none", + "param_type": "keyword_only" + }, + "origin_host_header": { + "default": "none", + "param_type": "keyword_only" + }, + "is_compression_enabled": { + "default": "none", + "param_type": "keyword_only" + }, + "is_http_allowed": { + "default": "bool", + "param_type": "keyword_only" + }, + "is_https_allowed": { + "default": "bool", + "param_type": "keyword_only" + }, + "query_string_caching_behavior": { + "default": "none", + "param_type": "keyword_only" + }, + "optimization_type": { + "default": "none", + "param_type": "keyword_only" + }, + "probe_path": { + "default": "none", + "param_type": "keyword_only" + }, + "geo_filters": { + "default": "none", + "param_type": "keyword_only" + }, + "default_origin_group": { + "default": "none", + "param_type": "keyword_only" + }, + "url_signing_keys": { + "default": "none", + "param_type": "keyword_only" + }, + "delivery_policy": { + "default": "none", + "param_type": "keyword_only" + }, + "web_application_firewall_policy_link": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "tags": { + "attr_type": "tags" + }, + "origin_path": { + "attr_type": "origin_path" + }, + "content_types_to_compress": { + "attr_type": "content_types_to_compress" + }, + "origin_host_header": { + "attr_type": "origin_host_header" + }, + "is_compression_enabled": { + "attr_type": "is_compression_enabled" + }, + "is_http_allowed": { + "attr_type": "is_http_allowed" + }, + "is_https_allowed": { + "attr_type": "is_https_allowed" + }, + "query_string_caching_behavior": { + "attr_type": "query_string_caching_behavior" + }, + "optimization_type": { + "attr_type": "optimization_type" + }, + "probe_path": { + "attr_type": "probe_path" + }, + "geo_filters": { + "attr_type": "geo_filters" + }, + "default_origin_group": { + "attr_type": "default_origin_group" + }, + "url_signing_keys": { + "attr_type": "url_signing_keys" + }, + "delivery_policy": { + "attr_type": "delivery_policy" + }, + "web_application_firewall_policy_link": { + "attr_type": "web_application_firewall_policy_link" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ErrorAdditionalInfo": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "type": { + "attr_type": null + }, + "info": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ErrorDetail": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "code": { + "attr_type": null + }, + "message": { + "attr_type": null + }, + "target": { + "attr_type": null + }, + "details": { + "attr_type": null + }, + "additional_info": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ErrorResponse": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "error": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "error": { + "attr_type": "error" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ForwardingProtocol": { + "type": "Enum", + "methods": {}, + "properties": { + "HTTPS_ONLY": "HTTPS_ONLY", + "HTTP_ONLY": "HTTP_ONLY", + "MATCH_REQUEST": "MATCH_REQUEST", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "GeoFilter": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "relative_path": { + "default": null, + "param_type": "keyword_only" + }, + "action": { + "default": null, + "param_type": "keyword_only" + }, + "country_codes": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "relative_path": { + "attr_type": "relative_path" + }, + "action": { + "attr_type": "action" + }, + "country_codes": { + "attr_type": "country_codes" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "GeoFilterActions": { + "type": "Enum", + "methods": {}, + "properties": { + "ALLOW": "ALLOW", + "BLOCK": "BLOCK", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "HeaderAction": { + "type": "Enum", + "methods": {}, + "properties": { + "APPEND": "APPEND", + "DELETE": "DELETE", + "OVERWRITE": "OVERWRITE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "HeaderActionParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "header_action": { + "default": null, + "param_type": "keyword_only" + }, + "header_name": { + "default": null, + "param_type": "keyword_only" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "type_name": { + "attr_type": null + }, + "header_action": { + "attr_type": "header_action" + }, + "header_name": { + "attr_type": "header_name" + }, + "value": { + "attr_type": "value" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "HealthProbeParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "probe_path": { + "default": "none", + "param_type": "keyword_only" + }, + "probe_request_type": { + "default": "none", + "param_type": "keyword_only" + }, + "probe_protocol": { + "default": "none", + "param_type": "keyword_only" + }, + "probe_interval_in_seconds": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "probe_path": { + "attr_type": "probe_path" + }, + "probe_request_type": { + "attr_type": "probe_request_type" + }, + "probe_protocol": { + "attr_type": "probe_protocol" + }, + "probe_interval_in_seconds": { + "attr_type": "probe_interval_in_seconds" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "HealthProbeRequestType": { + "type": "Enum", + "methods": {}, + "properties": { + "GET": "GET", + "HEAD": "HEAD", + "NOT_SET": "NOT_SET", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "HostNameMatchConditionParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operator": { + "default": null, + "param_type": "keyword_only" + }, + "negate_condition": { + "default": "bool", + "param_type": "keyword_only" + }, + "match_values": { + "default": "none", + "param_type": "keyword_only" + }, + "transforms": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "type_name": { + "attr_type": null + }, + "operator": { + "attr_type": "operator" + }, + "negate_condition": { + "attr_type": "negate_condition" + }, + "match_values": { + "attr_type": "match_values" + }, + "transforms": { + "attr_type": "transforms" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "HostNameOperator": { + "type": "Enum", + "methods": {}, + "properties": { + "ANY": "ANY", + "BEGINS_WITH": "BEGINS_WITH", + "CONTAINS": "CONTAINS", + "ENDS_WITH": "ENDS_WITH", + "EQUAL": "EQUAL", + "GREATER_THAN": "GREATER_THAN", + "GREATER_THAN_OR_EQUAL": "GREATER_THAN_OR_EQUAL", + "LESS_THAN": "LESS_THAN", + "LESS_THAN_OR_EQUAL": "LESS_THAN_OR_EQUAL", + "REG_EX": "REG_EX", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "HttpErrorRangeParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "begin": { + "default": "none", + "param_type": "keyword_only" + }, + "end": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "begin": { + "attr_type": "begin" + }, + "end": { + "attr_type": "end" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "HttpVersionMatchConditionParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operator": { + "default": null, + "param_type": "keyword_only" + }, + "negate_condition": { + "default": "bool", + "param_type": "keyword_only" + }, + "match_values": { + "default": "none", + "param_type": "keyword_only" + }, + "transforms": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "type_name": { + "attr_type": null + }, + "operator": { + "attr_type": "operator" + }, + "negate_condition": { + "attr_type": "negate_condition" + }, + "match_values": { + "attr_type": "match_values" + }, + "transforms": { + "attr_type": "transforms" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "HttpVersionOperator": { + "type": "Enum", + "methods": {}, + "properties": { + "EQUAL": "EQUAL", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "HttpsRedirect": { + "type": "Enum", + "methods": {}, + "properties": { + "DISABLED": "DISABLED", + "ENABLED": "ENABLED", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "IpAddressGroup": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "delivery_region": { + "default": "none", + "param_type": "keyword_only" + }, + "ipv4_addresses": { + "default": "none", + "param_type": "keyword_only" + }, + "ipv6_addresses": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "delivery_region": { + "attr_type": "delivery_region" + }, + "ipv4_addresses": { + "attr_type": "ipv4_addresses" + }, + "ipv6_addresses": { + "attr_type": "ipv6_addresses" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "IsDeviceMatchConditionParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operator": { + "default": null, + "param_type": "keyword_only" + }, + "negate_condition": { + "default": "bool", + "param_type": "keyword_only" + }, + "match_values": { + "default": "none", + "param_type": "keyword_only" + }, + "transforms": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "type_name": { + "attr_type": null + }, + "operator": { + "attr_type": "operator" + }, + "negate_condition": { + "attr_type": "negate_condition" + }, + "match_values": { + "attr_type": "match_values" + }, + "transforms": { + "attr_type": "transforms" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "IsDeviceMatchValue": { + "type": "Enum", + "methods": {}, + "properties": { + "DESKTOP": "DESKTOP", + "MOBILE": "MOBILE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "IsDeviceOperator": { + "type": "Enum", + "methods": {}, + "properties": { + "EQUAL": "EQUAL", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "KeyVaultCertificateSourceParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "subscription_id": { + "default": null, + "param_type": "keyword_only" + }, + "resource_group_name": { + "default": null, + "param_type": "keyword_only" + }, + "vault_name": { + "default": null, + "param_type": "keyword_only" + }, + "secret_name": { + "default": null, + "param_type": "keyword_only" + }, + "update_rule": { + "default": null, + "param_type": "keyword_only" + }, + "delete_rule": { + "default": null, + "param_type": "keyword_only" + }, + "secret_version": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "type_name": { + "attr_type": null + }, + "subscription_id": { + "attr_type": "subscription_id" + }, + "resource_group_name": { + "attr_type": "resource_group_name" + }, + "vault_name": { + "attr_type": "vault_name" + }, + "secret_name": { + "attr_type": "secret_name" + }, + "secret_version": { + "attr_type": "secret_version" + }, + "update_rule": { + "attr_type": "update_rule" + }, + "delete_rule": { + "attr_type": "delete_rule" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "KeyVaultSigningKeyParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "type_name": { + "default": null, + "param_type": "keyword_only" + }, + "subscription_id": { + "default": null, + "param_type": "keyword_only" + }, + "resource_group_name": { + "default": null, + "param_type": "keyword_only" + }, + "vault_name": { + "default": null, + "param_type": "keyword_only" + }, + "secret_name": { + "default": null, + "param_type": "keyword_only" + }, + "secret_version": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "type_name": { + "attr_type": "type_name" + }, + "subscription_id": { + "attr_type": "subscription_id" + }, + "resource_group_name": { + "attr_type": "resource_group_name" + }, + "vault_name": { + "attr_type": "vault_name" + }, + "secret_name": { + "attr_type": "secret_name" + }, + "secret_version": { + "attr_type": "secret_version" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "KeyVaultSigningKeyParametersType": { + "type": "Enum", + "methods": {}, + "properties": { + "KEY_VAULT_SIGNING_KEY_PARAMETERS": "KEY_VAULT_SIGNING_KEY_PARAMETERS", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "LinkToDefaultDomain": { + "type": "Enum", + "methods": {}, + "properties": { + "DISABLED": "DISABLED", + "ENABLED": "ENABLED", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "LoadBalancingSettingsParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "sample_size": { + "default": "none", + "param_type": "keyword_only" + }, + "successful_samples_required": { + "default": "none", + "param_type": "keyword_only" + }, + "additional_latency_in_milliseconds": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "sample_size": { + "attr_type": "sample_size" + }, + "successful_samples_required": { + "attr_type": "successful_samples_required" + }, + "additional_latency_in_milliseconds": { + "attr_type": "additional_latency_in_milliseconds" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "LoadParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_paths": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "content_paths": { + "attr_type": "content_paths" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "LogMetric": { + "type": "Enum", + "methods": {}, + "properties": { + "CLIENT_REQUEST_BANDWIDTH": "CLIENT_REQUEST_BANDWIDTH", + "CLIENT_REQUEST_COUNT": "CLIENT_REQUEST_COUNT", + "CLIENT_REQUEST_TRAFFIC": "CLIENT_REQUEST_TRAFFIC", + "ORIGIN_REQUEST_BANDWIDTH": "ORIGIN_REQUEST_BANDWIDTH", + "ORIGIN_REQUEST_TRAFFIC": "ORIGIN_REQUEST_TRAFFIC", + "TOTAL_LATENCY": "TOTAL_LATENCY", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "LogMetricsGranularity": { + "type": "Enum", + "methods": {}, + "properties": { + "P1_D": "P1_D", + "PT1_H": "PT1_H", + "PT5_M": "PT5_M", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "LogMetricsGroupBy": { + "type": "Enum", + "methods": {}, + "properties": { + "CACHE_STATUS": "CACHE_STATUS", + "COUNTRY_OR_REGION": "COUNTRY_OR_REGION", + "CUSTOM_DOMAIN": "CUSTOM_DOMAIN", + "HTTP_STATUS_CODE": "HTTP_STATUS_CODE", + "PROTOCOL": "PROTOCOL", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "LogRanking": { + "type": "Enum", + "methods": {}, + "properties": { + "BROWSER": "BROWSER", + "COUNTRY_OR_REGION": "COUNTRY_OR_REGION", + "REFERRER": "REFERRER", + "URL": "URL", + "USER_AGENT": "USER_AGENT", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "LogRankingMetric": { + "type": "Enum", + "methods": {}, + "properties": { + "CLIENT_REQUEST_COUNT": "CLIENT_REQUEST_COUNT", + "CLIENT_REQUEST_TRAFFIC": "CLIENT_REQUEST_TRAFFIC", + "ERROR_COUNT": "ERROR_COUNT", + "HIT_COUNT": "HIT_COUNT", + "MISS_COUNT": "MISS_COUNT", + "USER_ERROR_COUNT": "USER_ERROR_COUNT", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "LogSpecification": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": "none", + "param_type": "keyword_only" + }, + "display_name": { + "default": "none", + "param_type": "keyword_only" + }, + "blob_duration": { + "default": "none", + "param_type": "keyword_only" + }, + "log_filter_pattern": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "name": { + "attr_type": "name" + }, + "display_name": { + "attr_type": "display_name" + }, + "blob_duration": { + "attr_type": "blob_duration" + }, + "log_filter_pattern": { + "attr_type": "log_filter_pattern" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ManagedCertificate": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "type": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "type": { + "attr_type": "type" + }, + "subject": { + "attr_type": null + }, + "expiration_date": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ManagedCertificateParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "type": { + "attr_type": null + }, + "subject": { + "attr_type": null + }, + "expiration_date": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ManagedRuleDefinition": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "rule_id": { + "attr_type": null + }, + "description": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ManagedRuleEnabledState": { + "type": "Enum", + "methods": {}, + "properties": { + "DISABLED": "DISABLED", + "ENABLED": "ENABLED", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ManagedRuleGroupDefinition": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "rule_group_name": { + "attr_type": null + }, + "description": { + "attr_type": null + }, + "rules": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ManagedRuleGroupOverride": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_group_name": { + "default": null, + "param_type": "keyword_only" + }, + "rules": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "rule_group_name": { + "attr_type": "rule_group_name" + }, + "rules": { + "attr_type": "rules" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ManagedRuleOverride": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_id": { + "default": null, + "param_type": "keyword_only" + }, + "enabled_state": { + "default": "none", + "param_type": "keyword_only" + }, + "action": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "rule_id": { + "attr_type": "rule_id" + }, + "enabled_state": { + "attr_type": "enabled_state" + }, + "action": { + "attr_type": "action" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ManagedRuleSet": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_set_type": { + "default": null, + "param_type": "keyword_only" + }, + "rule_set_version": { + "default": null, + "param_type": "keyword_only" + }, + "anomaly_score": { + "default": "none", + "param_type": "keyword_only" + }, + "rule_group_overrides": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "rule_set_type": { + "attr_type": "rule_set_type" + }, + "rule_set_version": { + "attr_type": "rule_set_version" + }, + "anomaly_score": { + "attr_type": "anomaly_score" + }, + "rule_group_overrides": { + "attr_type": "rule_group_overrides" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ManagedRuleSetDefinition": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "sku": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "sku": { + "attr_type": "sku" + }, + "provisioning_state": { + "attr_type": null + }, + "rule_set_type": { + "attr_type": null + }, + "rule_set_version": { + "attr_type": null + }, + "rule_groups": { + "attr_type": null + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "system_data": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ManagedRuleSetDefinitionList": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "next_link": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": null + }, + "next_link": { + "attr_type": "next_link" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ManagedRuleSetList": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "managed_rule_sets": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "managed_rule_sets": { + "attr_type": "managed_rule_sets" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ManagedServiceIdentity": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "type": { + "default": null, + "param_type": "keyword_only" + }, + "user_assigned_identities": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "principal_id": { + "attr_type": null + }, + "tenant_id": { + "attr_type": null + }, + "type": { + "attr_type": "type" + }, + "user_assigned_identities": { + "attr_type": "user_assigned_identities" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ManagedServiceIdentityType": { + "type": "Enum", + "methods": {}, + "properties": { + "NONE": "NONE", + "SYSTEM_ASSIGNED": "SYSTEM_ASSIGNED", + "SYSTEM_ASSIGNED_USER_ASSIGNED": "SYSTEM_ASSIGNED_USER_ASSIGNED", + "USER_ASSIGNED": "USER_ASSIGNED", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "MatchCondition": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "match_variable": { + "default": null, + "param_type": "keyword_only" + }, + "operator": { + "default": null, + "param_type": "keyword_only" + }, + "match_value": { + "default": null, + "param_type": "keyword_only" + }, + "selector": { + "default": "none", + "param_type": "keyword_only" + }, + "negate_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "transforms": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "match_variable": { + "attr_type": "match_variable" + }, + "selector": { + "attr_type": "selector" + }, + "operator": { + "attr_type": "operator" + }, + "negate_condition": { + "attr_type": "negate_condition" + }, + "match_value": { + "attr_type": "match_value" + }, + "transforms": { + "attr_type": "transforms" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "MatchProcessingBehavior": { + "type": "Enum", + "methods": {}, + "properties": { + "CONTINUE": "CONTINUE", + "STOP": "STOP", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "MatchVariable": { + "type": "Enum", + "methods": {}, + "properties": { + "CLIENT_PORT": "CLIENT_PORT", + "COOKIES": "COOKIES", + "HOST_NAME": "HOST_NAME", + "HTTP_VERSION": "HTTP_VERSION", + "IS_DEVICE": "IS_DEVICE", + "POST_ARGS": "POST_ARGS", + "QUERY_STRING": "QUERY_STRING", + "REMOTE_ADDRESS": "REMOTE_ADDRESS", + "REQUEST_BODY": "REQUEST_BODY", + "REQUEST_HEADER": "REQUEST_HEADER", + "REQUEST_METHOD": "REQUEST_METHOD", + "REQUEST_SCHEME": "REQUEST_SCHEME", + "REQUEST_URI": "REQUEST_URI", + "SERVER_PORT": "SERVER_PORT", + "SOCKET_ADDR": "SOCKET_ADDR", + "SSL_PROTOCOL": "SSL_PROTOCOL", + "URL_FILE_EXTENSION": "URL_FILE_EXTENSION", + "URL_FILE_NAME": "URL_FILE_NAME", + "URL_PATH": "URL_PATH", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "MetricAvailability": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "time_grain": { + "default": "none", + "param_type": "keyword_only" + }, + "blob_duration": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "time_grain": { + "attr_type": "time_grain" + }, + "blob_duration": { + "attr_type": "blob_duration" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "MetricSpecification": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": "none", + "param_type": "keyword_only" + }, + "display_name": { + "default": "none", + "param_type": "keyword_only" + }, + "display_description": { + "default": "none", + "param_type": "keyword_only" + }, + "unit": { + "default": "none", + "param_type": "keyword_only" + }, + "aggregation_type": { + "default": "none", + "param_type": "keyword_only" + }, + "availabilities": { + "default": "none", + "param_type": "keyword_only" + }, + "supported_time_grain_types": { + "default": "none", + "param_type": "keyword_only" + }, + "dimensions": { + "default": "none", + "param_type": "keyword_only" + }, + "fill_gap_with_zero": { + "default": "none", + "param_type": "keyword_only" + }, + "metric_filter_pattern": { + "default": "none", + "param_type": "keyword_only" + }, + "is_internal": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "name": { + "attr_type": "name" + }, + "display_name": { + "attr_type": "display_name" + }, + "display_description": { + "attr_type": "display_description" + }, + "unit": { + "attr_type": "unit" + }, + "aggregation_type": { + "attr_type": "aggregation_type" + }, + "availabilities": { + "attr_type": "availabilities" + }, + "supported_time_grain_types": { + "attr_type": "supported_time_grain_types" + }, + "dimensions": { + "attr_type": "dimensions" + }, + "fill_gap_with_zero": { + "attr_type": "fill_gap_with_zero" + }, + "metric_filter_pattern": { + "attr_type": "metric_filter_pattern" + }, + "is_internal": { + "attr_type": "is_internal" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "MetricsGranularity": { + "type": "Enum", + "methods": {}, + "properties": { + "P1_D": "P1_D", + "PT1_H": "PT1_H", + "PT5_M": "PT5_M", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "MetricsResponse": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "date_time_begin": { + "default": "none", + "param_type": "keyword_only" + }, + "date_time_end": { + "default": "none", + "param_type": "keyword_only" + }, + "granularity": { + "default": "none", + "param_type": "keyword_only" + }, + "series": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "date_time_begin": { + "attr_type": "date_time_begin" + }, + "date_time_end": { + "attr_type": "date_time_end" + }, + "granularity": { + "attr_type": "granularity" + }, + "series": { + "attr_type": "series" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "MetricsResponseSeriesItem": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "metric": { + "default": "none", + "param_type": "keyword_only" + }, + "unit": { + "default": "none", + "param_type": "keyword_only" + }, + "groups": { + "default": "none", + "param_type": "keyword_only" + }, + "data": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "metric": { + "attr_type": "metric" + }, + "unit": { + "attr_type": "unit" + }, + "groups": { + "attr_type": "groups" + }, + "data": { + "attr_type": "data" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "MetricsResponseSeriesPropertiesItemsItem": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": "none", + "param_type": "keyword_only" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "name": { + "attr_type": "name" + }, + "value": { + "attr_type": "value" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "MetricsSeriesUnit": { + "type": "Enum", + "methods": {}, + "properties": { + "BITS_PER_SECOND": "BITS_PER_SECOND", + "BYTES": "BYTES", + "COUNT": "COUNT", + "MILLI_SECONDS": "MILLI_SECONDS", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "MigrateResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "id": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "migrated_profile_resource_id": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "MigrationEndpointMapping": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "migrated_from": { + "default": "none", + "param_type": "keyword_only" + }, + "migrated_to": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "migrated_from": { + "attr_type": "migrated_from" + }, + "migrated_to": { + "attr_type": "migrated_to" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "MigrationErrorType": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "code": { + "attr_type": null + }, + "resource_name": { + "attr_type": null + }, + "error_message": { + "attr_type": null + }, + "next_steps": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "MigrationParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "sku": { + "default": null, + "param_type": "keyword_only" + }, + "classic_resource_reference": { + "default": null, + "param_type": "keyword_only" + }, + "profile_name": { + "default": null, + "param_type": "keyword_only" + }, + "migration_web_application_firewall_mappings": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "sku": { + "attr_type": "sku" + }, + "classic_resource_reference": { + "attr_type": "classic_resource_reference" + }, + "profile_name": { + "attr_type": "profile_name" + }, + "migration_web_application_firewall_mappings": { + "attr_type": "migration_web_application_firewall_mappings" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "MigrationWebApplicationFirewallMapping": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "migrated_from": { + "default": "none", + "param_type": "keyword_only" + }, + "migrated_to": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "migrated_from": { + "attr_type": "migrated_from" + }, + "migrated_to": { + "attr_type": "migrated_to" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "MinimumTlsVersion": { + "type": "Enum", + "methods": {}, + "properties": { + "NONE": "NONE", + "TLS10": "TLS10", + "TLS12": "TLS12", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "Operation": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "is_data_action": { + "default": "none", + "param_type": "keyword_only" + }, + "display": { + "default": "none", + "param_type": "keyword_only" + }, + "service_specification": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "name": { + "attr_type": null + }, + "is_data_action": { + "attr_type": "is_data_action" + }, + "display": { + "attr_type": "display" + }, + "origin": { + "attr_type": null + }, + "service_specification": { + "attr_type": "service_specification" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "OperationDisplay": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "provider": { + "attr_type": null + }, + "resource": { + "attr_type": null + }, + "operation": { + "attr_type": null + }, + "description": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "OperationsListResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "next_link": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": "value" + }, + "next_link": { + "attr_type": "next_link" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "Operator": { + "type": "Enum", + "methods": {}, + "properties": { + "ANY": "ANY", + "BEGINS_WITH": "BEGINS_WITH", + "CONTAINS": "CONTAINS", + "ENDS_WITH": "ENDS_WITH", + "EQUAL": "EQUAL", + "GEO_MATCH": "GEO_MATCH", + "GREATER_THAN": "GREATER_THAN", + "GREATER_THAN_OR_EQUAL": "GREATER_THAN_OR_EQUAL", + "IP_MATCH": "IP_MATCH", + "LESS_THAN": "LESS_THAN", + "LESS_THAN_OR_EQUAL": "LESS_THAN_OR_EQUAL", + "REG_EX": "REG_EX", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "OptimizationType": { + "type": "Enum", + "methods": {}, + "properties": { + "DYNAMIC_SITE_ACCELERATION": "DYNAMIC_SITE_ACCELERATION", + "GENERAL_MEDIA_STREAMING": "GENERAL_MEDIA_STREAMING", + "GENERAL_WEB_DELIVERY": "GENERAL_WEB_DELIVERY", + "LARGE_FILE_DOWNLOAD": "LARGE_FILE_DOWNLOAD", + "VIDEO_ON_DEMAND_MEDIA_STREAMING": "VIDEO_ON_DEMAND_MEDIA_STREAMING", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "Origin": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "host_name": { + "default": "none", + "param_type": "keyword_only" + }, + "http_port": { + "default": "none", + "param_type": "keyword_only" + }, + "https_port": { + "default": "none", + "param_type": "keyword_only" + }, + "origin_host_header": { + "default": "none", + "param_type": "keyword_only" + }, + "priority": { + "default": "none", + "param_type": "keyword_only" + }, + "weight": { + "default": "none", + "param_type": "keyword_only" + }, + "enabled": { + "default": "none", + "param_type": "keyword_only" + }, + "private_link_alias": { + "default": "none", + "param_type": "keyword_only" + }, + "private_link_resource_id": { + "default": "none", + "param_type": "keyword_only" + }, + "private_link_location": { + "default": "none", + "param_type": "keyword_only" + }, + "private_link_approval_message": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "host_name": { + "attr_type": "host_name" + }, + "http_port": { + "attr_type": "http_port" + }, + "https_port": { + "attr_type": "https_port" + }, + "origin_host_header": { + "attr_type": "origin_host_header" + }, + "priority": { + "attr_type": "priority" + }, + "weight": { + "attr_type": "weight" + }, + "enabled": { + "attr_type": "enabled" + }, + "private_link_alias": { + "attr_type": "private_link_alias" + }, + "private_link_resource_id": { + "attr_type": "private_link_resource_id" + }, + "private_link_location": { + "attr_type": "private_link_location" + }, + "private_link_approval_message": { + "attr_type": "private_link_approval_message" + }, + "resource_state": { + "attr_type": null + }, + "provisioning_state": { + "attr_type": null + }, + "private_endpoint_status": { + "attr_type": null + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "system_data": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "OriginAuthenticationProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "type": { + "default": "none", + "param_type": "keyword_only" + }, + "user_assigned_identity": { + "default": "none", + "param_type": "keyword_only" + }, + "scope": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "type": { + "attr_type": "type" + }, + "user_assigned_identity": { + "attr_type": "user_assigned_identity" + }, + "scope": { + "attr_type": "scope" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "OriginAuthenticationType": { + "type": "Enum", + "methods": {}, + "properties": { + "SYSTEM_ASSIGNED_IDENTITY": "SYSTEM_ASSIGNED_IDENTITY", + "USER_ASSIGNED_IDENTITY": "USER_ASSIGNED_IDENTITY", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "OriginGroup": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "health_probe_settings": { + "default": "none", + "param_type": "keyword_only" + }, + "origins": { + "default": "none", + "param_type": "keyword_only" + }, + "traffic_restoration_time_to_healed_or_new_endpoints_in_minutes": { + "default": "none", + "param_type": "keyword_only" + }, + "response_based_origin_error_detection_settings": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "health_probe_settings": { + "attr_type": "health_probe_settings" + }, + "origins": { + "attr_type": "origins" + }, + "traffic_restoration_time_to_healed_or_new_endpoints_in_minutes": { + "attr_type": "traffic_restoration_time_to_healed_or_new_endpoints_in_minutes" + }, + "response_based_origin_error_detection_settings": { + "attr_type": "response_based_origin_error_detection_settings" + }, + "resource_state": { + "attr_type": null + }, + "provisioning_state": { + "attr_type": null + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "system_data": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "OriginGroupListResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "next_link": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": null + }, + "next_link": { + "attr_type": "next_link" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "OriginGroupOverride": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group": { + "default": "none", + "param_type": "keyword_only" + }, + "forwarding_protocol": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "origin_group": { + "attr_type": "origin_group" + }, + "forwarding_protocol": { + "attr_type": "forwarding_protocol" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "OriginGroupOverrideAction": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "name": { + "attr_type": null + }, + "parameters": { + "attr_type": "parameters" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "OriginGroupOverrideActionParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "type_name": { + "attr_type": null + }, + "origin_group": { + "attr_type": "origin_group" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "OriginGroupProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "health_probe_settings": { + "default": "none", + "param_type": "keyword_only" + }, + "origins": { + "default": "none", + "param_type": "keyword_only" + }, + "traffic_restoration_time_to_healed_or_new_endpoints_in_minutes": { + "default": "none", + "param_type": "keyword_only" + }, + "response_based_origin_error_detection_settings": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "resource_state": { + "attr_type": null + }, + "provisioning_state": { + "attr_type": null + }, + "health_probe_settings": { + "attr_type": "health_probe_settings" + }, + "origins": { + "attr_type": "origins" + }, + "traffic_restoration_time_to_healed_or_new_endpoints_in_minutes": { + "attr_type": "traffic_restoration_time_to_healed_or_new_endpoints_in_minutes" + }, + "response_based_origin_error_detection_settings": { + "attr_type": "response_based_origin_error_detection_settings" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "OriginGroupProvisioningState": { + "type": "Enum", + "methods": {}, + "properties": { + "CREATING": "CREATING", + "DELETING": "DELETING", + "FAILED": "FAILED", + "SUCCEEDED": "SUCCEEDED", + "UPDATING": "UPDATING", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "OriginGroupResourceState": { + "type": "Enum", + "methods": {}, + "properties": { + "ACTIVE": "ACTIVE", + "CREATING": "CREATING", + "DELETING": "DELETING", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "OriginGroupUpdateParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "health_probe_settings": { + "default": "none", + "param_type": "keyword_only" + }, + "origins": { + "default": "none", + "param_type": "keyword_only" + }, + "traffic_restoration_time_to_healed_or_new_endpoints_in_minutes": { + "default": "none", + "param_type": "keyword_only" + }, + "response_based_origin_error_detection_settings": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "health_probe_settings": { + "attr_type": "health_probe_settings" + }, + "origins": { + "attr_type": "origins" + }, + "traffic_restoration_time_to_healed_or_new_endpoints_in_minutes": { + "attr_type": "traffic_restoration_time_to_healed_or_new_endpoints_in_minutes" + }, + "response_based_origin_error_detection_settings": { + "attr_type": "response_based_origin_error_detection_settings" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "OriginGroupUpdatePropertiesParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "health_probe_settings": { + "default": "none", + "param_type": "keyword_only" + }, + "origins": { + "default": "none", + "param_type": "keyword_only" + }, + "traffic_restoration_time_to_healed_or_new_endpoints_in_minutes": { + "default": "none", + "param_type": "keyword_only" + }, + "response_based_origin_error_detection_settings": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "health_probe_settings": { + "attr_type": "health_probe_settings" + }, + "origins": { + "attr_type": "origins" + }, + "traffic_restoration_time_to_healed_or_new_endpoints_in_minutes": { + "attr_type": "traffic_restoration_time_to_healed_or_new_endpoints_in_minutes" + }, + "response_based_origin_error_detection_settings": { + "attr_type": "response_based_origin_error_detection_settings" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "OriginListResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "next_link": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": null + }, + "next_link": { + "attr_type": "next_link" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "OriginProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "host_name": { + "default": "none", + "param_type": "keyword_only" + }, + "http_port": { + "default": "none", + "param_type": "keyword_only" + }, + "https_port": { + "default": "none", + "param_type": "keyword_only" + }, + "origin_host_header": { + "default": "none", + "param_type": "keyword_only" + }, + "priority": { + "default": "none", + "param_type": "keyword_only" + }, + "weight": { + "default": "none", + "param_type": "keyword_only" + }, + "enabled": { + "default": "none", + "param_type": "keyword_only" + }, + "private_link_alias": { + "default": "none", + "param_type": "keyword_only" + }, + "private_link_resource_id": { + "default": "none", + "param_type": "keyword_only" + }, + "private_link_location": { + "default": "none", + "param_type": "keyword_only" + }, + "private_link_approval_message": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "resource_state": { + "attr_type": null + }, + "provisioning_state": { + "attr_type": null + }, + "private_endpoint_status": { + "attr_type": null + }, + "host_name": { + "attr_type": "host_name" + }, + "http_port": { + "attr_type": "http_port" + }, + "https_port": { + "attr_type": "https_port" + }, + "origin_host_header": { + "attr_type": "origin_host_header" + }, + "priority": { + "attr_type": "priority" + }, + "weight": { + "attr_type": "weight" + }, + "enabled": { + "attr_type": "enabled" + }, + "private_link_alias": { + "attr_type": "private_link_alias" + }, + "private_link_resource_id": { + "attr_type": "private_link_resource_id" + }, + "private_link_location": { + "attr_type": "private_link_location" + }, + "private_link_approval_message": { + "attr_type": "private_link_approval_message" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "OriginProvisioningState": { + "type": "Enum", + "methods": {}, + "properties": { + "CREATING": "CREATING", + "DELETING": "DELETING", + "FAILED": "FAILED", + "SUCCEEDED": "SUCCEEDED", + "UPDATING": "UPDATING", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "OriginResourceState": { + "type": "Enum", + "methods": {}, + "properties": { + "ACTIVE": "ACTIVE", + "CREATING": "CREATING", + "DELETING": "DELETING", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "OriginUpdateParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "host_name": { + "default": "none", + "param_type": "keyword_only" + }, + "http_port": { + "default": "none", + "param_type": "keyword_only" + }, + "https_port": { + "default": "none", + "param_type": "keyword_only" + }, + "origin_host_header": { + "default": "none", + "param_type": "keyword_only" + }, + "priority": { + "default": "none", + "param_type": "keyword_only" + }, + "weight": { + "default": "none", + "param_type": "keyword_only" + }, + "enabled": { + "default": "none", + "param_type": "keyword_only" + }, + "private_link_alias": { + "default": "none", + "param_type": "keyword_only" + }, + "private_link_resource_id": { + "default": "none", + "param_type": "keyword_only" + }, + "private_link_location": { + "default": "none", + "param_type": "keyword_only" + }, + "private_link_approval_message": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "host_name": { + "attr_type": "host_name" + }, + "http_port": { + "attr_type": "http_port" + }, + "https_port": { + "attr_type": "https_port" + }, + "origin_host_header": { + "attr_type": "origin_host_header" + }, + "priority": { + "attr_type": "priority" + }, + "weight": { + "attr_type": "weight" + }, + "enabled": { + "attr_type": "enabled" + }, + "private_link_alias": { + "attr_type": "private_link_alias" + }, + "private_link_resource_id": { + "attr_type": "private_link_resource_id" + }, + "private_link_location": { + "attr_type": "private_link_location" + }, + "private_link_approval_message": { + "attr_type": "private_link_approval_message" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "OriginUpdatePropertiesParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "host_name": { + "default": "none", + "param_type": "keyword_only" + }, + "http_port": { + "default": "none", + "param_type": "keyword_only" + }, + "https_port": { + "default": "none", + "param_type": "keyword_only" + }, + "origin_host_header": { + "default": "none", + "param_type": "keyword_only" + }, + "priority": { + "default": "none", + "param_type": "keyword_only" + }, + "weight": { + "default": "none", + "param_type": "keyword_only" + }, + "enabled": { + "default": "none", + "param_type": "keyword_only" + }, + "private_link_alias": { + "default": "none", + "param_type": "keyword_only" + }, + "private_link_resource_id": { + "default": "none", + "param_type": "keyword_only" + }, + "private_link_location": { + "default": "none", + "param_type": "keyword_only" + }, + "private_link_approval_message": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "host_name": { + "attr_type": "host_name" + }, + "http_port": { + "attr_type": "http_port" + }, + "https_port": { + "attr_type": "https_port" + }, + "origin_host_header": { + "attr_type": "origin_host_header" + }, + "priority": { + "attr_type": "priority" + }, + "weight": { + "attr_type": "weight" + }, + "enabled": { + "attr_type": "enabled" + }, + "private_link_alias": { + "attr_type": "private_link_alias" + }, + "private_link_resource_id": { + "attr_type": "private_link_resource_id" + }, + "private_link_location": { + "attr_type": "private_link_location" + }, + "private_link_approval_message": { + "attr_type": "private_link_approval_message" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ParamIndicator": { + "type": "Enum", + "methods": {}, + "properties": { + "EXPIRES": "EXPIRES", + "KEY_ID": "KEY_ID", + "SIGNATURE": "SIGNATURE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "PolicyEnabledState": { + "type": "Enum", + "methods": {}, + "properties": { + "DISABLED": "DISABLED", + "ENABLED": "ENABLED", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "PolicyMode": { + "type": "Enum", + "methods": {}, + "properties": { + "DETECTION": "DETECTION", + "PREVENTION": "PREVENTION", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "PolicyResourceState": { + "type": "Enum", + "methods": {}, + "properties": { + "CREATING": "CREATING", + "DELETING": "DELETING", + "DISABLED": "DISABLED", + "DISABLING": "DISABLING", + "ENABLED": "ENABLED", + "ENABLING": "ENABLING", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "PolicySettings": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "enabled_state": { + "default": "none", + "param_type": "keyword_only" + }, + "mode": { + "default": "none", + "param_type": "keyword_only" + }, + "default_redirect_url": { + "default": "none", + "param_type": "keyword_only" + }, + "default_custom_block_response_status_code": { + "default": "none", + "param_type": "keyword_only" + }, + "default_custom_block_response_body": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "enabled_state": { + "attr_type": "enabled_state" + }, + "mode": { + "attr_type": "mode" + }, + "default_redirect_url": { + "attr_type": "default_redirect_url" + }, + "default_custom_block_response_status_code": { + "attr_type": "default_custom_block_response_status_code" + }, + "default_custom_block_response_body": { + "attr_type": "default_custom_block_response_body" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "PolicySettingsDefaultCustomBlockResponseStatusCode": { + "type": "Enum", + "methods": {}, + "properties": { + "FOUR_HUNDRED_FIVE": "FOUR_HUNDRED_FIVE", + "FOUR_HUNDRED_SIX": "FOUR_HUNDRED_SIX", + "FOUR_HUNDRED_THREE": "FOUR_HUNDRED_THREE", + "FOUR_HUNDRED_TWENTY_NINE": "FOUR_HUNDRED_TWENTY_NINE", + "TWO_HUNDRED": "TWO_HUNDRED", + "as_integer_ratio": "as_integer_ratio", + "bit_count": "bit_count", + "bit_length": "bit_length", + "conjugate": "conjugate", + "denominator": "denominator", + "from_bytes": "from_bytes", + "imag": "imag", + "is_integer": "is_integer", + "numerator": "numerator", + "real": "real", + "to_bytes": "to_bytes" + } + }, + "PostArgsMatchConditionParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operator": { + "default": null, + "param_type": "keyword_only" + }, + "selector": { + "default": "none", + "param_type": "keyword_only" + }, + "negate_condition": { + "default": "bool", + "param_type": "keyword_only" + }, + "match_values": { + "default": "none", + "param_type": "keyword_only" + }, + "transforms": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "type_name": { + "attr_type": null + }, + "selector": { + "attr_type": "selector" + }, + "operator": { + "attr_type": "operator" + }, + "negate_condition": { + "attr_type": "negate_condition" + }, + "match_values": { + "attr_type": "match_values" + }, + "transforms": { + "attr_type": "transforms" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "PostArgsOperator": { + "type": "Enum", + "methods": {}, + "properties": { + "ANY": "ANY", + "BEGINS_WITH": "BEGINS_WITH", + "CONTAINS": "CONTAINS", + "ENDS_WITH": "ENDS_WITH", + "EQUAL": "EQUAL", + "GREATER_THAN": "GREATER_THAN", + "GREATER_THAN_OR_EQUAL": "GREATER_THAN_OR_EQUAL", + "LESS_THAN": "LESS_THAN", + "LESS_THAN_OR_EQUAL": "LESS_THAN_OR_EQUAL", + "REG_EX": "REG_EX", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "PrivateEndpointStatus": { + "type": "Enum", + "methods": {}, + "properties": { + "APPROVED": "APPROVED", + "DISCONNECTED": "DISCONNECTED", + "PENDING": "PENDING", + "REJECTED": "REJECTED", + "TIMEOUT": "TIMEOUT", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ProbeProtocol": { + "type": "Enum", + "methods": {}, + "properties": { + "HTTP": "HTTP", + "HTTPS": "HTTPS", + "NOT_SET": "NOT_SET", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "Profile": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "default": null, + "param_type": "keyword_only" + }, + "sku": { + "default": null, + "param_type": "keyword_only" + }, + "tags": { + "default": "none", + "param_type": "keyword_only" + }, + "identity": { + "default": "none", + "param_type": "keyword_only" + }, + "origin_response_timeout_seconds": { + "default": "none", + "param_type": "keyword_only" + }, + "log_scrubbing": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "sku": { + "attr_type": "sku" + }, + "kind": { + "attr_type": null + }, + "identity": { + "attr_type": "identity" + }, + "resource_state": { + "attr_type": null + }, + "provisioning_state": { + "attr_type": null + }, + "extended_properties": { + "attr_type": null + }, + "front_door_id": { + "attr_type": null + }, + "origin_response_timeout_seconds": { + "attr_type": "origin_response_timeout_seconds" + }, + "log_scrubbing": { + "attr_type": "log_scrubbing" + }, + "tags": { + "attr_type": "tags" + }, + "location": { + "attr_type": "location" + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "system_data": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ProfileChangeSkuWafMapping": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "security_policy_name": { + "default": null, + "param_type": "keyword_only" + }, + "change_to_waf_policy": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "security_policy_name": { + "attr_type": "security_policy_name" + }, + "change_to_waf_policy": { + "attr_type": "change_to_waf_policy" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ProfileListResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "next_link": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": null + }, + "next_link": { + "attr_type": "next_link" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ProfileLogScrubbing": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "state": { + "default": "none", + "param_type": "keyword_only" + }, + "scrubbing_rules": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "state": { + "attr_type": "state" + }, + "scrubbing_rules": { + "attr_type": "scrubbing_rules" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ProfileProvisioningState": { + "type": "Enum", + "methods": {}, + "properties": { + "CREATING": "CREATING", + "DELETING": "DELETING", + "FAILED": "FAILED", + "SUCCEEDED": "SUCCEEDED", + "UPDATING": "UPDATING", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ProfileResourceState": { + "type": "Enum", + "methods": {}, + "properties": { + "ABORTING_MIGRATION": "ABORTING_MIGRATION", + "ACTIVE": "ACTIVE", + "COMMITTING_MIGRATION": "COMMITTING_MIGRATION", + "CREATING": "CREATING", + "DELETING": "DELETING", + "DISABLED": "DISABLED", + "MIGRATED": "MIGRATED", + "MIGRATING": "MIGRATING", + "PENDING_MIGRATION_COMMIT": "PENDING_MIGRATION_COMMIT", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ProfileScrubbingRules": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "match_variable": { + "default": null, + "param_type": "keyword_only" + }, + "selector_match_operator": { + "default": null, + "param_type": "keyword_only" + }, + "selector": { + "default": "none", + "param_type": "keyword_only" + }, + "state": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "match_variable": { + "attr_type": "match_variable" + }, + "selector_match_operator": { + "attr_type": "selector_match_operator" + }, + "selector": { + "attr_type": "selector" + }, + "state": { + "attr_type": "state" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ProfileScrubbingState": { + "type": "Enum", + "methods": {}, + "properties": { + "DISABLED": "DISABLED", + "ENABLED": "ENABLED", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ProfileUpdateParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tags": { + "default": "none", + "param_type": "keyword_only" + }, + "identity": { + "default": "none", + "param_type": "keyword_only" + }, + "origin_response_timeout_seconds": { + "default": "none", + "param_type": "keyword_only" + }, + "log_scrubbing": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "tags": { + "attr_type": "tags" + }, + "identity": { + "attr_type": "identity" + }, + "origin_response_timeout_seconds": { + "attr_type": "origin_response_timeout_seconds" + }, + "log_scrubbing": { + "attr_type": "log_scrubbing" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ProfileUpgradeParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "waf_mapping_list": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "waf_mapping_list": { + "attr_type": "waf_mapping_list" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ProtocolType": { + "type": "Enum", + "methods": {}, + "properties": { + "IP_BASED": "IP_BASED", + "SERVER_NAME_INDICATION": "SERVER_NAME_INDICATION", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ProvisioningState": { + "type": "Enum", + "methods": {}, + "properties": { + "CREATING": "CREATING", + "FAILED": "FAILED", + "SUCCEEDED": "SUCCEEDED", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ProxyResource": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "system_data": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "PurgeParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_paths": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "content_paths": { + "attr_type": "content_paths" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "QueryStringBehavior": { + "type": "Enum", + "methods": {}, + "properties": { + "EXCLUDE": "EXCLUDE", + "EXCLUDE_ALL": "EXCLUDE_ALL", + "INCLUDE": "INCLUDE", + "INCLUDE_ALL": "INCLUDE_ALL", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "QueryStringCachingBehavior": { + "type": "Enum", + "methods": {}, + "properties": { + "BYPASS_CACHING": "BYPASS_CACHING", + "IGNORE_QUERY_STRING": "IGNORE_QUERY_STRING", + "NOT_SET": "NOT_SET", + "USE_QUERY_STRING": "USE_QUERY_STRING", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "QueryStringMatchConditionParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operator": { + "default": null, + "param_type": "keyword_only" + }, + "negate_condition": { + "default": "bool", + "param_type": "keyword_only" + }, + "match_values": { + "default": "none", + "param_type": "keyword_only" + }, + "transforms": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "type_name": { + "attr_type": null + }, + "operator": { + "attr_type": "operator" + }, + "negate_condition": { + "attr_type": "negate_condition" + }, + "match_values": { + "attr_type": "match_values" + }, + "transforms": { + "attr_type": "transforms" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "QueryStringOperator": { + "type": "Enum", + "methods": {}, + "properties": { + "ANY": "ANY", + "BEGINS_WITH": "BEGINS_WITH", + "CONTAINS": "CONTAINS", + "ENDS_WITH": "ENDS_WITH", + "EQUAL": "EQUAL", + "GREATER_THAN": "GREATER_THAN", + "GREATER_THAN_OR_EQUAL": "GREATER_THAN_OR_EQUAL", + "LESS_THAN": "LESS_THAN", + "LESS_THAN_OR_EQUAL": "LESS_THAN_OR_EQUAL", + "REG_EX": "REG_EX", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "RankingsResponse": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "date_time_begin": { + "default": "none", + "param_type": "keyword_only" + }, + "date_time_end": { + "default": "none", + "param_type": "keyword_only" + }, + "tables": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "date_time_begin": { + "attr_type": "date_time_begin" + }, + "date_time_end": { + "attr_type": "date_time_end" + }, + "tables": { + "attr_type": "tables" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "RankingsResponseTablesItem": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "ranking": { + "default": "none", + "param_type": "keyword_only" + }, + "data": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "ranking": { + "attr_type": "ranking" + }, + "data": { + "attr_type": "data" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "RankingsResponseTablesPropertiesItemsItem": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": "none", + "param_type": "keyword_only" + }, + "metrics": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "name": { + "attr_type": "name" + }, + "metrics": { + "attr_type": "metrics" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "RankingsResponseTablesPropertiesItemsMetricsItem": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "metric": { + "default": "none", + "param_type": "keyword_only" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "percentage": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "metric": { + "attr_type": "metric" + }, + "value": { + "attr_type": "value" + }, + "percentage": { + "attr_type": "percentage" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "RateLimitRule": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "keyword_only" + }, + "priority": { + "default": null, + "param_type": "keyword_only" + }, + "match_conditions": { + "default": null, + "param_type": "keyword_only" + }, + "action": { + "default": null, + "param_type": "keyword_only" + }, + "rate_limit_threshold": { + "default": null, + "param_type": "keyword_only" + }, + "rate_limit_duration_in_minutes": { + "default": null, + "param_type": "keyword_only" + }, + "enabled_state": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "rate_limit_threshold": { + "attr_type": "rate_limit_threshold" + }, + "rate_limit_duration_in_minutes": { + "attr_type": "rate_limit_duration_in_minutes" + }, + "name": { + "attr_type": "name" + }, + "enabled_state": { + "attr_type": "enabled_state" + }, + "priority": { + "attr_type": "priority" + }, + "match_conditions": { + "attr_type": "match_conditions" + }, + "action": { + "attr_type": "action" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "RateLimitRuleList": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "rules": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "rules": { + "attr_type": "rules" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "RedirectType": { + "type": "Enum", + "methods": {}, + "properties": { + "FOUND": "FOUND", + "MOVED": "MOVED", + "PERMANENT_REDIRECT": "PERMANENT_REDIRECT", + "TEMPORARY_REDIRECT": "TEMPORARY_REDIRECT", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "RemoteAddressMatchConditionParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operator": { + "default": null, + "param_type": "keyword_only" + }, + "negate_condition": { + "default": "bool", + "param_type": "keyword_only" + }, + "match_values": { + "default": "none", + "param_type": "keyword_only" + }, + "transforms": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "type_name": { + "attr_type": null + }, + "operator": { + "attr_type": "operator" + }, + "negate_condition": { + "attr_type": "negate_condition" + }, + "match_values": { + "attr_type": "match_values" + }, + "transforms": { + "attr_type": "transforms" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "RemoteAddressOperator": { + "type": "Enum", + "methods": {}, + "properties": { + "ANY": "ANY", + "GEO_MATCH": "GEO_MATCH", + "IP_MATCH": "IP_MATCH", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "RequestBodyMatchConditionParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operator": { + "default": null, + "param_type": "keyword_only" + }, + "negate_condition": { + "default": "bool", + "param_type": "keyword_only" + }, + "match_values": { + "default": "none", + "param_type": "keyword_only" + }, + "transforms": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "type_name": { + "attr_type": null + }, + "operator": { + "attr_type": "operator" + }, + "negate_condition": { + "attr_type": "negate_condition" + }, + "match_values": { + "attr_type": "match_values" + }, + "transforms": { + "attr_type": "transforms" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "RequestBodyOperator": { + "type": "Enum", + "methods": {}, + "properties": { + "ANY": "ANY", + "BEGINS_WITH": "BEGINS_WITH", + "CONTAINS": "CONTAINS", + "ENDS_WITH": "ENDS_WITH", + "EQUAL": "EQUAL", + "GREATER_THAN": "GREATER_THAN", + "GREATER_THAN_OR_EQUAL": "GREATER_THAN_OR_EQUAL", + "LESS_THAN": "LESS_THAN", + "LESS_THAN_OR_EQUAL": "LESS_THAN_OR_EQUAL", + "REG_EX": "REG_EX", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "RequestHeaderMatchConditionParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operator": { + "default": null, + "param_type": "keyword_only" + }, + "selector": { + "default": "none", + "param_type": "keyword_only" + }, + "negate_condition": { + "default": "bool", + "param_type": "keyword_only" + }, + "match_values": { + "default": "none", + "param_type": "keyword_only" + }, + "transforms": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "type_name": { + "attr_type": null + }, + "selector": { + "attr_type": "selector" + }, + "operator": { + "attr_type": "operator" + }, + "negate_condition": { + "attr_type": "negate_condition" + }, + "match_values": { + "attr_type": "match_values" + }, + "transforms": { + "attr_type": "transforms" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "RequestHeaderOperator": { + "type": "Enum", + "methods": {}, + "properties": { + "ANY": "ANY", + "BEGINS_WITH": "BEGINS_WITH", + "CONTAINS": "CONTAINS", + "ENDS_WITH": "ENDS_WITH", + "EQUAL": "EQUAL", + "GREATER_THAN": "GREATER_THAN", + "GREATER_THAN_OR_EQUAL": "GREATER_THAN_OR_EQUAL", + "LESS_THAN": "LESS_THAN", + "LESS_THAN_OR_EQUAL": "LESS_THAN_OR_EQUAL", + "REG_EX": "REG_EX", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "RequestMethodMatchConditionParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operator": { + "default": null, + "param_type": "keyword_only" + }, + "negate_condition": { + "default": "bool", + "param_type": "keyword_only" + }, + "transforms": { + "default": "none", + "param_type": "keyword_only" + }, + "match_values": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "type_name": { + "attr_type": null + }, + "operator": { + "attr_type": "operator" + }, + "negate_condition": { + "attr_type": "negate_condition" + }, + "transforms": { + "attr_type": "transforms" + }, + "match_values": { + "attr_type": "match_values" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "RequestMethodMatchValue": { + "type": "Enum", + "methods": {}, + "properties": { + "DELETE": "DELETE", + "GET": "GET", + "HEAD": "HEAD", + "OPTIONS": "OPTIONS", + "POST": "POST", + "PUT": "PUT", + "TRACE": "TRACE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "RequestMethodOperator": { + "type": "Enum", + "methods": {}, + "properties": { + "EQUAL": "EQUAL", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "RequestSchemeMatchConditionParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operator": { + "default": null, + "param_type": "keyword_only" + }, + "negate_condition": { + "default": "bool", + "param_type": "keyword_only" + }, + "transforms": { + "default": "none", + "param_type": "keyword_only" + }, + "match_values": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "type_name": { + "attr_type": null + }, + "operator": { + "attr_type": "operator" + }, + "negate_condition": { + "attr_type": "negate_condition" + }, + "transforms": { + "attr_type": "transforms" + }, + "match_values": { + "attr_type": "match_values" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "RequestSchemeMatchConditionParametersOperator": { + "type": "Enum", + "methods": {}, + "properties": { + "EQUAL": "EQUAL", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "RequestSchemeMatchValue": { + "type": "Enum", + "methods": {}, + "properties": { + "HTTP": "HTTP", + "HTTPS": "HTTPS", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "RequestUriMatchConditionParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operator": { + "default": null, + "param_type": "keyword_only" + }, + "negate_condition": { + "default": "bool", + "param_type": "keyword_only" + }, + "match_values": { + "default": "none", + "param_type": "keyword_only" + }, + "transforms": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "type_name": { + "attr_type": null + }, + "operator": { + "attr_type": "operator" + }, + "negate_condition": { + "attr_type": "negate_condition" + }, + "match_values": { + "attr_type": "match_values" + }, + "transforms": { + "attr_type": "transforms" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "RequestUriOperator": { + "type": "Enum", + "methods": {}, + "properties": { + "ANY": "ANY", + "BEGINS_WITH": "BEGINS_WITH", + "CONTAINS": "CONTAINS", + "ENDS_WITH": "ENDS_WITH", + "EQUAL": "EQUAL", + "GREATER_THAN": "GREATER_THAN", + "GREATER_THAN_OR_EQUAL": "GREATER_THAN_OR_EQUAL", + "LESS_THAN": "LESS_THAN", + "LESS_THAN_OR_EQUAL": "LESS_THAN_OR_EQUAL", + "REG_EX": "REG_EX", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "Resource": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "system_data": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ResourceReference": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "id": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "id": { + "attr_type": "id" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ResourceType": { + "type": "Enum", + "methods": {}, + "properties": { + "MICROSOFT_CDN_PROFILES_AFD_ENDPOINTS": "MICROSOFT_CDN_PROFILES_AFD_ENDPOINTS", + "MICROSOFT_CDN_PROFILES_ENDPOINTS": "MICROSOFT_CDN_PROFILES_ENDPOINTS", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ResourceUsage": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "resource_type": { + "attr_type": null + }, + "unit": { + "attr_type": null + }, + "current_value": { + "attr_type": null + }, + "limit": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ResourceUsageListResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "next_link": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": null + }, + "next_link": { + "attr_type": "next_link" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ResourceUsageUnit": { + "type": "Enum", + "methods": {}, + "properties": { + "COUNT": "COUNT", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ResourcesResponse": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoints": { + "default": "none", + "param_type": "keyword_only" + }, + "custom_domains": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "endpoints": { + "attr_type": "endpoints" + }, + "custom_domains": { + "attr_type": "custom_domains" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ResourcesResponseCustomDomainsItem": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "id": { + "default": "none", + "param_type": "keyword_only" + }, + "name": { + "default": "none", + "param_type": "keyword_only" + }, + "endpoint_id": { + "default": "none", + "param_type": "keyword_only" + }, + "history": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "id": { + "attr_type": "id" + }, + "name": { + "attr_type": "name" + }, + "endpoint_id": { + "attr_type": "endpoint_id" + }, + "history": { + "attr_type": "history" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ResourcesResponseEndpointsItem": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "id": { + "default": "none", + "param_type": "keyword_only" + }, + "name": { + "default": "none", + "param_type": "keyword_only" + }, + "history": { + "default": "none", + "param_type": "keyword_only" + }, + "custom_domains": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "id": { + "attr_type": "id" + }, + "name": { + "attr_type": "name" + }, + "history": { + "attr_type": "history" + }, + "custom_domains": { + "attr_type": "custom_domains" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ResourcesResponseEndpointsPropertiesItemsItem": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "id": { + "default": "none", + "param_type": "keyword_only" + }, + "name": { + "default": "none", + "param_type": "keyword_only" + }, + "endpoint_id": { + "default": "none", + "param_type": "keyword_only" + }, + "history": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "id": { + "attr_type": "id" + }, + "name": { + "attr_type": "name" + }, + "endpoint_id": { + "attr_type": "endpoint_id" + }, + "history": { + "attr_type": "history" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ResponseBasedDetectedErrorTypes": { + "type": "Enum", + "methods": {}, + "properties": { + "NONE": "NONE", + "TCP_AND_HTTP_ERRORS": "TCP_AND_HTTP_ERRORS", + "TCP_ERRORS_ONLY": "TCP_ERRORS_ONLY", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ResponseBasedOriginErrorDetectionParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "response_based_detected_error_types": { + "default": "none", + "param_type": "keyword_only" + }, + "response_based_failover_threshold_percentage": { + "default": "none", + "param_type": "keyword_only" + }, + "http_error_ranges": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "response_based_detected_error_types": { + "attr_type": "response_based_detected_error_types" + }, + "response_based_failover_threshold_percentage": { + "attr_type": "response_based_failover_threshold_percentage" + }, + "http_error_ranges": { + "attr_type": "http_error_ranges" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "Route": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domains": { + "default": "none", + "param_type": "keyword_only" + }, + "origin_group": { + "default": "none", + "param_type": "keyword_only" + }, + "origin_path": { + "default": "none", + "param_type": "keyword_only" + }, + "rule_sets": { + "default": "none", + "param_type": "keyword_only" + }, + "supported_protocols": { + "default": "list", + "param_type": "keyword_only" + }, + "patterns_to_match": { + "default": "none", + "param_type": "keyword_only" + }, + "cache_configuration": { + "default": "none", + "param_type": "keyword_only" + }, + "forwarding_protocol": { + "default": "none", + "param_type": "keyword_only" + }, + "link_to_default_domain": { + "default": "str", + "param_type": "keyword_only" + }, + "https_redirect": { + "default": "str", + "param_type": "keyword_only" + }, + "enabled_state": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "endpoint_name": { + "attr_type": null + }, + "custom_domains": { + "attr_type": "custom_domains" + }, + "origin_group": { + "attr_type": "origin_group" + }, + "origin_path": { + "attr_type": "origin_path" + }, + "rule_sets": { + "attr_type": "rule_sets" + }, + "supported_protocols": { + "attr_type": "supported_protocols" + }, + "patterns_to_match": { + "attr_type": "patterns_to_match" + }, + "cache_configuration": { + "attr_type": "cache_configuration" + }, + "forwarding_protocol": { + "attr_type": "forwarding_protocol" + }, + "link_to_default_domain": { + "attr_type": "link_to_default_domain" + }, + "https_redirect": { + "attr_type": "https_redirect" + }, + "enabled_state": { + "attr_type": "enabled_state" + }, + "provisioning_state": { + "attr_type": null + }, + "deployment_status": { + "attr_type": null + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "system_data": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "RouteConfigurationOverrideActionParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_override": { + "default": "none", + "param_type": "keyword_only" + }, + "cache_configuration": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "type_name": { + "attr_type": null + }, + "origin_group_override": { + "attr_type": "origin_group_override" + }, + "cache_configuration": { + "attr_type": "cache_configuration" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "RouteListResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "next_link": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": null + }, + "next_link": { + "attr_type": "next_link" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "RouteProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domains": { + "default": "none", + "param_type": "keyword_only" + }, + "origin_group": { + "default": "none", + "param_type": "keyword_only" + }, + "origin_path": { + "default": "none", + "param_type": "keyword_only" + }, + "rule_sets": { + "default": "none", + "param_type": "keyword_only" + }, + "supported_protocols": { + "default": "list", + "param_type": "keyword_only" + }, + "patterns_to_match": { + "default": "none", + "param_type": "keyword_only" + }, + "cache_configuration": { + "default": "none", + "param_type": "keyword_only" + }, + "forwarding_protocol": { + "default": "none", + "param_type": "keyword_only" + }, + "link_to_default_domain": { + "default": "str", + "param_type": "keyword_only" + }, + "https_redirect": { + "default": "str", + "param_type": "keyword_only" + }, + "enabled_state": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "provisioning_state": { + "attr_type": null + }, + "deployment_status": { + "attr_type": null + }, + "endpoint_name": { + "attr_type": null + }, + "custom_domains": { + "attr_type": "custom_domains" + }, + "origin_group": { + "attr_type": "origin_group" + }, + "origin_path": { + "attr_type": "origin_path" + }, + "rule_sets": { + "attr_type": "rule_sets" + }, + "supported_protocols": { + "attr_type": "supported_protocols" + }, + "patterns_to_match": { + "attr_type": "patterns_to_match" + }, + "cache_configuration": { + "attr_type": "cache_configuration" + }, + "forwarding_protocol": { + "attr_type": "forwarding_protocol" + }, + "link_to_default_domain": { + "attr_type": "link_to_default_domain" + }, + "https_redirect": { + "attr_type": "https_redirect" + }, + "enabled_state": { + "attr_type": "enabled_state" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "RouteUpdateParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domains": { + "default": "none", + "param_type": "keyword_only" + }, + "origin_group": { + "default": "none", + "param_type": "keyword_only" + }, + "origin_path": { + "default": "none", + "param_type": "keyword_only" + }, + "rule_sets": { + "default": "none", + "param_type": "keyword_only" + }, + "supported_protocols": { + "default": "list", + "param_type": "keyword_only" + }, + "patterns_to_match": { + "default": "none", + "param_type": "keyword_only" + }, + "cache_configuration": { + "default": "none", + "param_type": "keyword_only" + }, + "forwarding_protocol": { + "default": "none", + "param_type": "keyword_only" + }, + "link_to_default_domain": { + "default": "str", + "param_type": "keyword_only" + }, + "https_redirect": { + "default": "str", + "param_type": "keyword_only" + }, + "enabled_state": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "endpoint_name": { + "attr_type": null + }, + "custom_domains": { + "attr_type": "custom_domains" + }, + "origin_group": { + "attr_type": "origin_group" + }, + "origin_path": { + "attr_type": "origin_path" + }, + "rule_sets": { + "attr_type": "rule_sets" + }, + "supported_protocols": { + "attr_type": "supported_protocols" + }, + "patterns_to_match": { + "attr_type": "patterns_to_match" + }, + "cache_configuration": { + "attr_type": "cache_configuration" + }, + "forwarding_protocol": { + "attr_type": "forwarding_protocol" + }, + "link_to_default_domain": { + "attr_type": "link_to_default_domain" + }, + "https_redirect": { + "attr_type": "https_redirect" + }, + "enabled_state": { + "attr_type": "enabled_state" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "RouteUpdatePropertiesParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domains": { + "default": "none", + "param_type": "keyword_only" + }, + "origin_group": { + "default": "none", + "param_type": "keyword_only" + }, + "origin_path": { + "default": "none", + "param_type": "keyword_only" + }, + "rule_sets": { + "default": "none", + "param_type": "keyword_only" + }, + "supported_protocols": { + "default": "list", + "param_type": "keyword_only" + }, + "patterns_to_match": { + "default": "none", + "param_type": "keyword_only" + }, + "cache_configuration": { + "default": "none", + "param_type": "keyword_only" + }, + "forwarding_protocol": { + "default": "none", + "param_type": "keyword_only" + }, + "link_to_default_domain": { + "default": "str", + "param_type": "keyword_only" + }, + "https_redirect": { + "default": "str", + "param_type": "keyword_only" + }, + "enabled_state": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "endpoint_name": { + "attr_type": null + }, + "custom_domains": { + "attr_type": "custom_domains" + }, + "origin_group": { + "attr_type": "origin_group" + }, + "origin_path": { + "attr_type": "origin_path" + }, + "rule_sets": { + "attr_type": "rule_sets" + }, + "supported_protocols": { + "attr_type": "supported_protocols" + }, + "patterns_to_match": { + "attr_type": "patterns_to_match" + }, + "cache_configuration": { + "attr_type": "cache_configuration" + }, + "forwarding_protocol": { + "attr_type": "forwarding_protocol" + }, + "link_to_default_domain": { + "attr_type": "link_to_default_domain" + }, + "https_redirect": { + "attr_type": "https_redirect" + }, + "enabled_state": { + "attr_type": "enabled_state" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "Rule": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "order": { + "default": "none", + "param_type": "keyword_only" + }, + "conditions": { + "default": "none", + "param_type": "keyword_only" + }, + "actions": { + "default": "none", + "param_type": "keyword_only" + }, + "match_processing_behavior": { + "default": "str", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "rule_set_name": { + "attr_type": null + }, + "order": { + "attr_type": "order" + }, + "conditions": { + "attr_type": "conditions" + }, + "actions": { + "attr_type": "actions" + }, + "match_processing_behavior": { + "attr_type": "match_processing_behavior" + }, + "provisioning_state": { + "attr_type": null + }, + "deployment_status": { + "attr_type": null + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "system_data": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "RuleCacheBehavior": { + "type": "Enum", + "methods": {}, + "properties": { + "HONOR_ORIGIN": "HONOR_ORIGIN", + "OVERRIDE_ALWAYS": "OVERRIDE_ALWAYS", + "OVERRIDE_IF_ORIGIN_MISSING": "OVERRIDE_IF_ORIGIN_MISSING", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "RuleIsCompressionEnabled": { + "type": "Enum", + "methods": {}, + "properties": { + "DISABLED": "DISABLED", + "ENABLED": "ENABLED", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "RuleListResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "next_link": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": null + }, + "next_link": { + "attr_type": "next_link" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "RuleProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "order": { + "default": "none", + "param_type": "keyword_only" + }, + "conditions": { + "default": "none", + "param_type": "keyword_only" + }, + "actions": { + "default": "none", + "param_type": "keyword_only" + }, + "match_processing_behavior": { + "default": "str", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "provisioning_state": { + "attr_type": null + }, + "deployment_status": { + "attr_type": null + }, + "rule_set_name": { + "attr_type": null + }, + "order": { + "attr_type": "order" + }, + "conditions": { + "attr_type": "conditions" + }, + "actions": { + "attr_type": "actions" + }, + "match_processing_behavior": { + "attr_type": "match_processing_behavior" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "RuleQueryStringCachingBehavior": { + "type": "Enum", + "methods": {}, + "properties": { + "IGNORE_QUERY_STRING": "IGNORE_QUERY_STRING", + "IGNORE_SPECIFIED_QUERY_STRINGS": "IGNORE_SPECIFIED_QUERY_STRINGS", + "INCLUDE_SPECIFIED_QUERY_STRINGS": "INCLUDE_SPECIFIED_QUERY_STRINGS", + "USE_QUERY_STRING": "USE_QUERY_STRING", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "RuleSet": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "provisioning_state": { + "attr_type": null + }, + "deployment_status": { + "attr_type": null + }, + "profile_name": { + "attr_type": null + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "system_data": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "RuleSetListResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "next_link": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": null + }, + "next_link": { + "attr_type": "next_link" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "RuleSetProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "profile_name": { + "attr_type": null + }, + "provisioning_state": { + "attr_type": null + }, + "deployment_status": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "RuleUpdateParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "order": { + "default": "none", + "param_type": "keyword_only" + }, + "conditions": { + "default": "none", + "param_type": "keyword_only" + }, + "actions": { + "default": "none", + "param_type": "keyword_only" + }, + "match_processing_behavior": { + "default": "str", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "rule_set_name": { + "attr_type": null + }, + "order": { + "attr_type": "order" + }, + "conditions": { + "attr_type": "conditions" + }, + "actions": { + "attr_type": "actions" + }, + "match_processing_behavior": { + "attr_type": "match_processing_behavior" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "RuleUpdatePropertiesParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "order": { + "default": "none", + "param_type": "keyword_only" + }, + "conditions": { + "default": "none", + "param_type": "keyword_only" + }, + "actions": { + "default": "none", + "param_type": "keyword_only" + }, + "match_processing_behavior": { + "default": "str", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "rule_set_name": { + "attr_type": null + }, + "order": { + "attr_type": "order" + }, + "conditions": { + "attr_type": "conditions" + }, + "actions": { + "attr_type": "actions" + }, + "match_processing_behavior": { + "attr_type": "match_processing_behavior" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ScrubbingRuleEntryMatchOperator": { + "type": "Enum", + "methods": {}, + "properties": { + "EQUALS_ANY": "EQUALS_ANY", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ScrubbingRuleEntryMatchVariable": { + "type": "Enum", + "methods": {}, + "properties": { + "QUERY_STRING_ARG_NAMES": "QUERY_STRING_ARG_NAMES", + "REQUEST_IP_ADDRESS": "REQUEST_IP_ADDRESS", + "REQUEST_URI": "REQUEST_URI", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ScrubbingRuleEntryState": { + "type": "Enum", + "methods": {}, + "properties": { + "DISABLED": "DISABLED", + "ENABLED": "ENABLED", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "Secret": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "provisioning_state": { + "attr_type": null + }, + "deployment_status": { + "attr_type": null + }, + "profile_name": { + "attr_type": null + }, + "parameters": { + "attr_type": "parameters" + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "system_data": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "SecretListResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "next_link": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": null + }, + "next_link": { + "attr_type": "next_link" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "SecretParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "SecretProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "profile_name": { + "attr_type": null + }, + "parameters": { + "attr_type": "parameters" + }, + "provisioning_state": { + "attr_type": null + }, + "deployment_status": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "SecretType": { + "type": "Enum", + "methods": {}, + "properties": { + "AZURE_FIRST_PARTY_MANAGED_CERTIFICATE": "AZURE_FIRST_PARTY_MANAGED_CERTIFICATE", + "CUSTOMER_CERTIFICATE": "CUSTOMER_CERTIFICATE", + "MANAGED_CERTIFICATE": "MANAGED_CERTIFICATE", + "URL_SIGNING_KEY": "URL_SIGNING_KEY", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "SecurityPolicy": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "provisioning_state": { + "attr_type": null + }, + "deployment_status": { + "attr_type": null + }, + "profile_name": { + "attr_type": null + }, + "parameters": { + "attr_type": "parameters" + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "system_data": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "SecurityPolicyListResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "next_link": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": null + }, + "next_link": { + "attr_type": "next_link" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "SecurityPolicyProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "profile_name": { + "attr_type": null + }, + "parameters": { + "attr_type": "parameters" + }, + "provisioning_state": { + "attr_type": null + }, + "deployment_status": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "SecurityPolicyPropertiesParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "SecurityPolicyType": { + "type": "Enum", + "methods": {}, + "properties": { + "WEB_APPLICATION_FIREWALL": "WEB_APPLICATION_FIREWALL", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "SecurityPolicyUpdateParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "parameters": { + "attr_type": "parameters" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "SecurityPolicyWebApplicationFirewallAssociation": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "domains": { + "default": "none", + "param_type": "keyword_only" + }, + "patterns_to_match": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "domains": { + "attr_type": "domains" + }, + "patterns_to_match": { + "attr_type": "patterns_to_match" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "SecurityPolicyWebApplicationFirewallParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "waf_policy": { + "default": "none", + "param_type": "keyword_only" + }, + "associations": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "type": { + "attr_type": null + }, + "waf_policy": { + "attr_type": "waf_policy" + }, + "associations": { + "attr_type": "associations" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ServerPortMatchConditionParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operator": { + "default": null, + "param_type": "keyword_only" + }, + "negate_condition": { + "default": "bool", + "param_type": "keyword_only" + }, + "match_values": { + "default": "none", + "param_type": "keyword_only" + }, + "transforms": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "type_name": { + "attr_type": null + }, + "operator": { + "attr_type": "operator" + }, + "negate_condition": { + "attr_type": "negate_condition" + }, + "match_values": { + "attr_type": "match_values" + }, + "transforms": { + "attr_type": "transforms" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ServerPortOperator": { + "type": "Enum", + "methods": {}, + "properties": { + "ANY": "ANY", + "BEGINS_WITH": "BEGINS_WITH", + "CONTAINS": "CONTAINS", + "ENDS_WITH": "ENDS_WITH", + "EQUAL": "EQUAL", + "GREATER_THAN": "GREATER_THAN", + "GREATER_THAN_OR_EQUAL": "GREATER_THAN_OR_EQUAL", + "LESS_THAN": "LESS_THAN", + "LESS_THAN_OR_EQUAL": "LESS_THAN_OR_EQUAL", + "REG_EX": "REG_EX", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ServiceSpecification": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "log_specifications": { + "default": "none", + "param_type": "keyword_only" + }, + "metric_specifications": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "log_specifications": { + "attr_type": "log_specifications" + }, + "metric_specifications": { + "attr_type": "metric_specifications" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "SharedPrivateLinkResourceProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "private_link": { + "default": "none", + "param_type": "keyword_only" + }, + "private_link_location": { + "default": "none", + "param_type": "keyword_only" + }, + "group_id": { + "default": "none", + "param_type": "keyword_only" + }, + "request_message": { + "default": "none", + "param_type": "keyword_only" + }, + "status": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "private_link": { + "attr_type": "private_link" + }, + "private_link_location": { + "attr_type": "private_link_location" + }, + "group_id": { + "attr_type": "group_id" + }, + "request_message": { + "attr_type": "request_message" + }, + "status": { + "attr_type": "status" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "SharedPrivateLinkResourceStatus": { + "type": "Enum", + "methods": {}, + "properties": { + "APPROVED": "APPROVED", + "DISCONNECTED": "DISCONNECTED", + "PENDING": "PENDING", + "REJECTED": "REJECTED", + "TIMEOUT": "TIMEOUT", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "Sku": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "name": { + "attr_type": "name" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "SkuName": { + "type": "Enum", + "methods": {}, + "properties": { + "CUSTOM_VERIZON": "CUSTOM_VERIZON", + "PREMIUM_AZURE_FRONT_DOOR": "PREMIUM_AZURE_FRONT_DOOR", + "PREMIUM_VERIZON": "PREMIUM_VERIZON", + "STANDARD955_BAND_WIDTH_CHINA_CDN": "STANDARD955_BAND_WIDTH_CHINA_CDN", + "STANDARD_AKAMAI": "STANDARD_AKAMAI", + "STANDARD_AVG_BAND_WIDTH_CHINA_CDN": "STANDARD_AVG_BAND_WIDTH_CHINA_CDN", + "STANDARD_AZURE_FRONT_DOOR": "STANDARD_AZURE_FRONT_DOOR", + "STANDARD_CHINA_CDN": "STANDARD_CHINA_CDN", + "STANDARD_MICROSOFT": "STANDARD_MICROSOFT", + "STANDARD_PLUS955_BAND_WIDTH_CHINA_CDN": "STANDARD_PLUS955_BAND_WIDTH_CHINA_CDN", + "STANDARD_PLUS_AVG_BAND_WIDTH_CHINA_CDN": "STANDARD_PLUS_AVG_BAND_WIDTH_CHINA_CDN", + "STANDARD_PLUS_CHINA_CDN": "STANDARD_PLUS_CHINA_CDN", + "STANDARD_VERIZON": "STANDARD_VERIZON", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "SocketAddrMatchConditionParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operator": { + "default": null, + "param_type": "keyword_only" + }, + "negate_condition": { + "default": "bool", + "param_type": "keyword_only" + }, + "match_values": { + "default": "none", + "param_type": "keyword_only" + }, + "transforms": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "type_name": { + "attr_type": null + }, + "operator": { + "attr_type": "operator" + }, + "negate_condition": { + "attr_type": "negate_condition" + }, + "match_values": { + "attr_type": "match_values" + }, + "transforms": { + "attr_type": "transforms" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "SocketAddrOperator": { + "type": "Enum", + "methods": {}, + "properties": { + "ANY": "ANY", + "IP_MATCH": "IP_MATCH", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "SslProtocol": { + "type": "Enum", + "methods": {}, + "properties": { + "TL_SV1": "TL_SV1", + "TL_SV1_1": "TL_SV1_1", + "TL_SV1_2": "TL_SV1_2", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "SslProtocolMatchConditionParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operator": { + "default": null, + "param_type": "keyword_only" + }, + "negate_condition": { + "default": "bool", + "param_type": "keyword_only" + }, + "match_values": { + "default": "none", + "param_type": "keyword_only" + }, + "transforms": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "type_name": { + "attr_type": null + }, + "operator": { + "attr_type": "operator" + }, + "negate_condition": { + "attr_type": "negate_condition" + }, + "match_values": { + "attr_type": "match_values" + }, + "transforms": { + "attr_type": "transforms" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "SslProtocolOperator": { + "type": "Enum", + "methods": {}, + "properties": { + "EQUAL": "EQUAL", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "SsoUri": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "sso_uri_value": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "Status": { + "type": "Enum", + "methods": {}, + "properties": { + "ACCESS_DENIED": "ACCESS_DENIED", + "CERTIFICATE_EXPIRED": "CERTIFICATE_EXPIRED", + "INVALID": "INVALID", + "VALID": "VALID", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "SupportedOptimizationTypesListResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "supported_optimization_types": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "SystemData": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "created_by": { + "default": "none", + "param_type": "keyword_only" + }, + "created_by_type": { + "default": "none", + "param_type": "keyword_only" + }, + "created_at": { + "default": "none", + "param_type": "keyword_only" + }, + "last_modified_by": { + "default": "none", + "param_type": "keyword_only" + }, + "last_modified_by_type": { + "default": "none", + "param_type": "keyword_only" + }, + "last_modified_at": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "created_by": { + "attr_type": "created_by" + }, + "created_by_type": { + "attr_type": "created_by_type" + }, + "created_at": { + "attr_type": "created_at" + }, + "last_modified_by": { + "attr_type": "last_modified_by" + }, + "last_modified_by_type": { + "attr_type": "last_modified_by_type" + }, + "last_modified_at": { + "attr_type": "last_modified_at" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "TrackedResource": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "default": null, + "param_type": "keyword_only" + }, + "tags": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "tags": { + "attr_type": "tags" + }, + "location": { + "attr_type": "location" + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "system_data": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "Transform": { + "type": "Enum", + "methods": {}, + "properties": { + "LOWERCASE": "LOWERCASE", + "REMOVE_NULLS": "REMOVE_NULLS", + "TRIM": "TRIM", + "UPPERCASE": "UPPERCASE", + "URL_DECODE": "URL_DECODE", + "URL_ENCODE": "URL_ENCODE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "TransformType": { + "type": "Enum", + "methods": {}, + "properties": { + "LOWERCASE": "LOWERCASE", + "REMOVE_NULLS": "REMOVE_NULLS", + "TRIM": "TRIM", + "UPPERCASE": "UPPERCASE", + "URL_DECODE": "URL_DECODE", + "URL_ENCODE": "URL_ENCODE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "UpdateRule": { + "type": "Enum", + "methods": {}, + "properties": { + "NO_ACTION": "NO_ACTION", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "UrlFileExtensionMatchConditionParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operator": { + "default": null, + "param_type": "keyword_only" + }, + "negate_condition": { + "default": "bool", + "param_type": "keyword_only" + }, + "match_values": { + "default": "none", + "param_type": "keyword_only" + }, + "transforms": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "type_name": { + "attr_type": null + }, + "operator": { + "attr_type": "operator" + }, + "negate_condition": { + "attr_type": "negate_condition" + }, + "match_values": { + "attr_type": "match_values" + }, + "transforms": { + "attr_type": "transforms" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "UrlFileExtensionOperator": { + "type": "Enum", + "methods": {}, + "properties": { + "ANY": "ANY", + "BEGINS_WITH": "BEGINS_WITH", + "CONTAINS": "CONTAINS", + "ENDS_WITH": "ENDS_WITH", + "EQUAL": "EQUAL", + "GREATER_THAN": "GREATER_THAN", + "GREATER_THAN_OR_EQUAL": "GREATER_THAN_OR_EQUAL", + "LESS_THAN": "LESS_THAN", + "LESS_THAN_OR_EQUAL": "LESS_THAN_OR_EQUAL", + "REG_EX": "REG_EX", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "UrlFileNameMatchConditionParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operator": { + "default": null, + "param_type": "keyword_only" + }, + "negate_condition": { + "default": "bool", + "param_type": "keyword_only" + }, + "match_values": { + "default": "none", + "param_type": "keyword_only" + }, + "transforms": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "type_name": { + "attr_type": null + }, + "operator": { + "attr_type": "operator" + }, + "negate_condition": { + "attr_type": "negate_condition" + }, + "match_values": { + "attr_type": "match_values" + }, + "transforms": { + "attr_type": "transforms" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "UrlFileNameOperator": { + "type": "Enum", + "methods": {}, + "properties": { + "ANY": "ANY", + "BEGINS_WITH": "BEGINS_WITH", + "CONTAINS": "CONTAINS", + "ENDS_WITH": "ENDS_WITH", + "EQUAL": "EQUAL", + "GREATER_THAN": "GREATER_THAN", + "GREATER_THAN_OR_EQUAL": "GREATER_THAN_OR_EQUAL", + "LESS_THAN": "LESS_THAN", + "LESS_THAN_OR_EQUAL": "LESS_THAN_OR_EQUAL", + "REG_EX": "REG_EX", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "UrlPathMatchConditionParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operator": { + "default": null, + "param_type": "keyword_only" + }, + "negate_condition": { + "default": "bool", + "param_type": "keyword_only" + }, + "match_values": { + "default": "none", + "param_type": "keyword_only" + }, + "transforms": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "type_name": { + "attr_type": null + }, + "operator": { + "attr_type": "operator" + }, + "negate_condition": { + "attr_type": "negate_condition" + }, + "match_values": { + "attr_type": "match_values" + }, + "transforms": { + "attr_type": "transforms" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "UrlPathOperator": { + "type": "Enum", + "methods": {}, + "properties": { + "ANY": "ANY", + "BEGINS_WITH": "BEGINS_WITH", + "CONTAINS": "CONTAINS", + "ENDS_WITH": "ENDS_WITH", + "EQUAL": "EQUAL", + "GREATER_THAN": "GREATER_THAN", + "GREATER_THAN_OR_EQUAL": "GREATER_THAN_OR_EQUAL", + "LESS_THAN": "LESS_THAN", + "LESS_THAN_OR_EQUAL": "LESS_THAN_OR_EQUAL", + "REG_EX": "REG_EX", + "WILDCARD": "WILDCARD", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "UrlRedirectAction": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "name": { + "attr_type": null + }, + "parameters": { + "attr_type": "parameters" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "UrlRedirectActionParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "redirect_type": { + "default": null, + "param_type": "keyword_only" + }, + "destination_protocol": { + "default": "none", + "param_type": "keyword_only" + }, + "custom_path": { + "default": "none", + "param_type": "keyword_only" + }, + "custom_hostname": { + "default": "none", + "param_type": "keyword_only" + }, + "custom_query_string": { + "default": "none", + "param_type": "keyword_only" + }, + "custom_fragment": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "type_name": { + "attr_type": null + }, + "redirect_type": { + "attr_type": "redirect_type" + }, + "destination_protocol": { + "attr_type": "destination_protocol" + }, + "custom_path": { + "attr_type": "custom_path" + }, + "custom_hostname": { + "attr_type": "custom_hostname" + }, + "custom_query_string": { + "attr_type": "custom_query_string" + }, + "custom_fragment": { + "attr_type": "custom_fragment" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "UrlRewriteAction": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "name": { + "attr_type": null + }, + "parameters": { + "attr_type": "parameters" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "UrlRewriteActionParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "source_pattern": { + "default": null, + "param_type": "keyword_only" + }, + "destination": { + "default": null, + "param_type": "keyword_only" + }, + "preserve_unmatched_path": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "type_name": { + "attr_type": null + }, + "source_pattern": { + "attr_type": "source_pattern" + }, + "destination": { + "attr_type": "destination" + }, + "preserve_unmatched_path": { + "attr_type": "preserve_unmatched_path" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "UrlSigningAction": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "name": { + "attr_type": null + }, + "parameters": { + "attr_type": "parameters" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "UrlSigningActionParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "algorithm": { + "default": "none", + "param_type": "keyword_only" + }, + "parameter_name_override": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "type_name": { + "attr_type": null + }, + "algorithm": { + "attr_type": "algorithm" + }, + "parameter_name_override": { + "attr_type": "parameter_name_override" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "UrlSigningKey": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_id": { + "default": null, + "param_type": "keyword_only" + }, + "key_source_parameters": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "key_id": { + "attr_type": "key_id" + }, + "key_source_parameters": { + "attr_type": "key_source_parameters" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "UrlSigningKeyParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_id": { + "default": null, + "param_type": "keyword_only" + }, + "secret_source": { + "default": null, + "param_type": "keyword_only" + }, + "secret_version": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "type": { + "attr_type": null + }, + "key_id": { + "attr_type": "key_id" + }, + "secret_source": { + "attr_type": "secret_source" + }, + "secret_version": { + "attr_type": "secret_version" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "UrlSigningParamIdentifier": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "param_indicator": { + "default": null, + "param_type": "keyword_only" + }, + "param_name": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "param_indicator": { + "attr_type": "param_indicator" + }, + "param_name": { + "attr_type": "param_name" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "Usage": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "unit": { + "default": null, + "param_type": "keyword_only" + }, + "current_value": { + "default": null, + "param_type": "keyword_only" + }, + "limit": { + "default": null, + "param_type": "keyword_only" + }, + "name": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "id": { + "attr_type": null + }, + "unit": { + "attr_type": "unit" + }, + "current_value": { + "attr_type": "current_value" + }, + "limit": { + "attr_type": "limit" + }, + "name": { + "attr_type": "name" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "UsageName": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "localized_value": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": "value" + }, + "localized_value": { + "attr_type": "localized_value" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "UsageUnit": { + "type": "Enum", + "methods": {}, + "properties": { + "COUNT": "COUNT", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "UsagesListResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "next_link": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": "value" + }, + "next_link": { + "attr_type": "next_link" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "UserAssignedIdentity": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "principal_id": { + "attr_type": null + }, + "client_id": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "UserManagedHttpsParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "protocol_type": { + "default": null, + "param_type": "keyword_only" + }, + "certificate_source_parameters": { + "default": null, + "param_type": "keyword_only" + }, + "minimum_tls_version": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "certificate_source": { + "attr_type": null + }, + "certificate_source_parameters": { + "attr_type": "certificate_source_parameters" + }, + "protocol_type": { + "attr_type": "protocol_type" + }, + "minimum_tls_version": { + "attr_type": "minimum_tls_version" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ValidateCustomDomainInput": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "host_name": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "host_name": { + "attr_type": "host_name" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ValidateCustomDomainOutput": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "custom_domain_validated": { + "attr_type": null + }, + "reason": { + "attr_type": null + }, + "message": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ValidateProbeInput": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "probe_url": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "probe_url": { + "attr_type": "probe_url" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ValidateProbeOutput": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "is_valid": { + "attr_type": null + }, + "error_code": { + "attr_type": null + }, + "message": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ValidateSecretInput": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "secret_type": { + "default": null, + "param_type": "keyword_only" + }, + "secret_source": { + "default": null, + "param_type": "keyword_only" + }, + "secret_version": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "secret_type": { + "attr_type": "secret_type" + }, + "secret_source": { + "attr_type": "secret_source" + }, + "secret_version": { + "attr_type": "secret_version" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ValidateSecretOutput": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "status": { + "default": "none", + "param_type": "keyword_only" + }, + "message": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "status": { + "attr_type": "status" + }, + "message": { + "attr_type": "message" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ValidationToken": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "token": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "WafAction": { + "type": "Enum", + "methods": {}, + "properties": { + "ALLOW": "ALLOW", + "BLOCK": "BLOCK", + "LOG": "LOG", + "REDIRECT": "REDIRECT", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "WafGranularity": { + "type": "Enum", + "methods": {}, + "properties": { + "P1_D": "P1_D", + "PT1_H": "PT1_H", + "PT5_M": "PT5_M", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "WafMatchVariable": { + "type": "Enum", + "methods": {}, + "properties": { + "COOKIES": "COOKIES", + "POST_ARGS": "POST_ARGS", + "QUERY_STRING": "QUERY_STRING", + "REMOTE_ADDR": "REMOTE_ADDR", + "REQUEST_BODY": "REQUEST_BODY", + "REQUEST_HEADER": "REQUEST_HEADER", + "REQUEST_METHOD": "REQUEST_METHOD", + "REQUEST_URI": "REQUEST_URI", + "SOCKET_ADDR": "SOCKET_ADDR", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "WafMetric": { + "type": "Enum", + "methods": {}, + "properties": { + "CLIENT_REQUEST_COUNT": "CLIENT_REQUEST_COUNT", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "WafMetricsGranularity": { + "type": "Enum", + "methods": {}, + "properties": { + "P1_D": "P1_D", + "PT1_H": "PT1_H", + "PT5_M": "PT5_M", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "WafMetricsResponse": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "date_time_begin": { + "default": "none", + "param_type": "keyword_only" + }, + "date_time_end": { + "default": "none", + "param_type": "keyword_only" + }, + "granularity": { + "default": "none", + "param_type": "keyword_only" + }, + "series": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "date_time_begin": { + "attr_type": "date_time_begin" + }, + "date_time_end": { + "attr_type": "date_time_end" + }, + "granularity": { + "attr_type": "granularity" + }, + "series": { + "attr_type": "series" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "WafMetricsResponseSeriesItem": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "metric": { + "default": "none", + "param_type": "keyword_only" + }, + "unit": { + "default": "none", + "param_type": "keyword_only" + }, + "groups": { + "default": "none", + "param_type": "keyword_only" + }, + "data": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "metric": { + "attr_type": "metric" + }, + "unit": { + "attr_type": "unit" + }, + "groups": { + "attr_type": "groups" + }, + "data": { + "attr_type": "data" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "WafMetricsResponseSeriesPropertiesItemsItem": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": "none", + "param_type": "keyword_only" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "name": { + "attr_type": "name" + }, + "value": { + "attr_type": "value" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "WafMetricsSeriesUnit": { + "type": "Enum", + "methods": {}, + "properties": { + "COUNT": "COUNT", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "WafRankingGroupBy": { + "type": "Enum", + "methods": {}, + "properties": { + "CUSTOM_DOMAIN": "CUSTOM_DOMAIN", + "HTTP_STATUS_CODE": "HTTP_STATUS_CODE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "WafRankingType": { + "type": "Enum", + "methods": {}, + "properties": { + "ACTION": "ACTION", + "CLIENT_IP": "CLIENT_IP", + "COUNTRY_OR_REGION": "COUNTRY_OR_REGION", + "RULE_GROUP": "RULE_GROUP", + "RULE_ID": "RULE_ID", + "RULE_TYPE": "RULE_TYPE", + "URL": "URL", + "USER_AGENT": "USER_AGENT", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "WafRankingsResponse": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "date_time_begin": { + "default": "none", + "param_type": "keyword_only" + }, + "date_time_end": { + "default": "none", + "param_type": "keyword_only" + }, + "groups": { + "default": "none", + "param_type": "keyword_only" + }, + "data": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "date_time_begin": { + "attr_type": "date_time_begin" + }, + "date_time_end": { + "attr_type": "date_time_end" + }, + "groups": { + "attr_type": "groups" + }, + "data": { + "attr_type": "data" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "WafRankingsResponseDataItem": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "group_values": { + "default": "none", + "param_type": "keyword_only" + }, + "metrics": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "group_values": { + "attr_type": "group_values" + }, + "metrics": { + "attr_type": "metrics" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "WafRuleType": { + "type": "Enum", + "methods": {}, + "properties": { + "BOT": "BOT", + "CUSTOM": "CUSTOM", + "MANAGED": "MANAGED", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + } + }, + "function_nodes": {} + }, + "azure.mgmt.cdn.operations": { + "class_nodes": { + "AFDCustomDomainsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[AFDDomain]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain": { + "type": "AFDDomain", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[AFDDomain]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[AFDDomain]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[None]", + "overloads": [] + }, + "begin_refresh_validation_token": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[None]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_update_properties": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[AFDDomain]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_update_properties": { + "type": "AFDDomainUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[AFDDomain]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_update_properties": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[AFDDomain]" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AFDDomain", + "overloads": [] + }, + "list_by_profile": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.AFDDomain]", + "overloads": [] + } + }, + "properties": {} + }, + "AFDEndpointsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[AFDEndpoint]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint": { + "type": "AFDEndpoint", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[AFDEndpoint]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[AFDEndpoint]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[None]", + "overloads": [] + }, + "begin_purge_content": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "contents": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[None]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "contents": { + "type": "AfdPurgeParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[None]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "contents": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[None]" + } + ] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_update_properties": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[AFDEndpoint]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_update_properties": { + "type": "AFDEndpointUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[AFDEndpoint]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_update_properties": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[AFDEndpoint]" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AFDEndpoint", + "overloads": [] + }, + "list_by_profile": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.AFDEndpoint]", + "overloads": [] + }, + "list_resource_usage": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.Usage]", + "overloads": [] + }, + "validate_custom_domain": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_properties": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ValidateCustomDomainOutput", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_properties": { + "type": "ValidateCustomDomainInput", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "ValidateCustomDomainOutput" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_properties": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "ValidateCustomDomainOutput" + } + ] + } + }, + "properties": {} + }, + "AFDOriginGroupsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[AFDOriginGroup]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group": { + "type": "AFDOriginGroup", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[AFDOriginGroup]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[AFDOriginGroup]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[None]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_update_properties": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[AFDOriginGroup]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_update_properties": { + "type": "AFDOriginGroupUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[AFDOriginGroup]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_update_properties": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[AFDOriginGroup]" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AFDOriginGroup", + "overloads": [] + }, + "list_by_profile": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.AFDOriginGroup]", + "overloads": [] + }, + "list_resource_usage": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.Usage]", + "overloads": [] + } + }, + "properties": {} + }, + "AFDOriginsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "origin": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[AFDOrigin]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin": { + "type": "AFDOrigin", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[AFDOrigin]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[AFDOrigin]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[None]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_update_properties": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[AFDOrigin]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_update_properties": { + "type": "AFDOriginUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[AFDOrigin]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_update_properties": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[AFDOrigin]" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AFDOrigin", + "overloads": [] + }, + "list_by_origin_group": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.AFDOrigin]", + "overloads": [] + } + }, + "properties": {} + }, + "AFDProfilesOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_upgrade": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_upgrade_parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[Profile]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_upgrade_parameters": { + "type": "ProfileUpgradeParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[Profile]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_upgrade_parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[Profile]" + } + ] + }, + "check_endpoint_name_availability": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "check_endpoint_name_availability_input": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "CheckEndpointNameAvailabilityOutput", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "check_endpoint_name_availability_input": { + "type": "CheckEndpointNameAvailabilityInput", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "CheckEndpointNameAvailabilityOutput" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "check_endpoint_name_availability_input": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "CheckEndpointNameAvailabilityOutput" + } + ] + }, + "check_host_name_availability": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "check_host_name_availability_input": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "CheckNameAvailabilityOutput", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "check_host_name_availability_input": { + "type": "CheckHostNameAvailabilityInput", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "CheckNameAvailabilityOutput" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "check_host_name_availability_input": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "CheckNameAvailabilityOutput" + } + ] + }, + "list_resource_usage": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.Usage]", + "overloads": [] + }, + "validate_secret": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "validate_secret_input": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ValidateSecretOutput", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "validate_secret_input": { + "type": "ValidateSecretInput", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "ValidateSecretOutput" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "validate_secret_input": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "ValidateSecretOutput" + } + ] + } + }, + "properties": {} + }, + "CustomDomainsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_properties": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[CustomDomain]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_properties": { + "type": "CustomDomainParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[CustomDomain]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_properties": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[CustomDomain]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[CustomDomain]", + "overloads": [] + }, + "begin_disable_custom_https": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[CustomDomain]", + "overloads": [] + }, + "begin_enable_custom_https": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_https_parameters": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[CustomDomain]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_https_parameters": { + "type": "Optional[CustomDomainHttpsParameters]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[CustomDomain]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_https_parameters": { + "type": "Optional[IO[bytes]]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[CustomDomain]" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "CustomDomain", + "overloads": [] + }, + "list_by_endpoint": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.CustomDomain]", + "overloads": [] + } + }, + "properties": {} + }, + "EdgeNodesOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.EdgeNode]", + "overloads": [] + } + }, + "properties": {} + }, + "EndpointsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[Endpoint]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint": { + "type": "Endpoint", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[Endpoint]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[Endpoint]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[None]", + "overloads": [] + }, + "begin_load_content": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_file_paths": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[None]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_file_paths": { + "type": "LoadParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[None]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_file_paths": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[None]" + } + ] + }, + "begin_purge_content": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_file_paths": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[None]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_file_paths": { + "type": "PurgeParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[None]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_file_paths": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[None]" + } + ] + }, + "begin_start": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[Endpoint]", + "overloads": [] + }, + "begin_stop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[Endpoint]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_update_properties": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[Endpoint]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_update_properties": { + "type": "EndpointUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[Endpoint]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_update_properties": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[Endpoint]" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "Endpoint", + "overloads": [] + }, + "list_by_profile": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.Endpoint]", + "overloads": [] + }, + "list_resource_usage": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.ResourceUsage]", + "overloads": [] + }, + "validate_custom_domain": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_properties": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ValidateCustomDomainOutput", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_properties": { + "type": "ValidateCustomDomainInput", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "ValidateCustomDomainOutput" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_properties": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "ValidateCustomDomainOutput" + } + ] + } + }, + "properties": {} + }, + "LogAnalyticsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "get_log_analytics_locations": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ContinentsResponse", + "overloads": [] + }, + "get_log_analytics_metrics": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "metrics": { + "default": null, + "param_type": "positional_or_keyword" + }, + "date_time_begin": { + "default": null, + "param_type": "positional_or_keyword" + }, + "date_time_end": { + "default": null, + "param_type": "positional_or_keyword" + }, + "granularity": { + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domains": { + "default": null, + "param_type": "positional_or_keyword" + }, + "protocols": { + "default": null, + "param_type": "positional_or_keyword" + }, + "group_by": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "continents": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "country_or_regions": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "MetricsResponse", + "overloads": [] + }, + "get_log_analytics_rankings": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "rankings": { + "default": null, + "param_type": "positional_or_keyword" + }, + "metrics": { + "default": null, + "param_type": "positional_or_keyword" + }, + "max_ranking": { + "default": null, + "param_type": "positional_or_keyword" + }, + "date_time_begin": { + "default": null, + "param_type": "positional_or_keyword" + }, + "date_time_end": { + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domains": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "RankingsResponse", + "overloads": [] + }, + "get_log_analytics_resources": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ResourcesResponse", + "overloads": [] + }, + "get_waf_log_analytics_metrics": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "metrics": { + "default": null, + "param_type": "positional_or_keyword" + }, + "date_time_begin": { + "default": null, + "param_type": "positional_or_keyword" + }, + "date_time_end": { + "default": null, + "param_type": "positional_or_keyword" + }, + "granularity": { + "default": null, + "param_type": "positional_or_keyword" + }, + "actions": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "group_by": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "rule_types": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "WafMetricsResponse", + "overloads": [] + }, + "get_waf_log_analytics_rankings": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "metrics": { + "default": null, + "param_type": "positional_or_keyword" + }, + "date_time_begin": { + "default": null, + "param_type": "positional_or_keyword" + }, + "date_time_end": { + "default": null, + "param_type": "positional_or_keyword" + }, + "max_ranking": { + "default": null, + "param_type": "positional_or_keyword" + }, + "rankings": { + "default": null, + "param_type": "positional_or_keyword" + }, + "actions": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "rule_types": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "WafRankingsResponse", + "overloads": [] + } + }, + "properties": {} + }, + "ManagedRuleSetsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.ManagedRuleSetDefinition]", + "overloads": [] + } + }, + "properties": {} + }, + "Operations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.Operation]", + "overloads": [] + } + }, + "properties": {} + }, + "OriginGroupsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[OriginGroup]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group": { + "type": "OriginGroup", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[OriginGroup]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[OriginGroup]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[None]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_update_properties": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[OriginGroup]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_update_properties": { + "type": "OriginGroupUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[OriginGroup]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_update_properties": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[OriginGroup]" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "OriginGroup", + "overloads": [] + }, + "list_by_endpoint": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.OriginGroup]", + "overloads": [] + } + }, + "properties": {} + }, + "OriginsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "origin": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[Origin]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin": { + "type": "Origin", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[Origin]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[Origin]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[None]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_update_properties": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[Origin]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_update_properties": { + "type": "OriginUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[Origin]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_update_properties": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[Origin]" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "Origin", + "overloads": [] + }, + "list_by_endpoint": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.Origin]", + "overloads": [] + } + }, + "properties": {} + }, + "PoliciesOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cdn_web_application_firewall_policy": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[CdnWebApplicationFirewallPolicy]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cdn_web_application_firewall_policy": { + "type": "CdnWebApplicationFirewallPolicy", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[CdnWebApplicationFirewallPolicy]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cdn_web_application_firewall_policy": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[CdnWebApplicationFirewallPolicy]" + } + ] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cdn_web_application_firewall_policy_patch_parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[CdnWebApplicationFirewallPolicy]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cdn_web_application_firewall_policy_patch_parameters": { + "type": "CdnWebApplicationFirewallPolicyPatchParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[CdnWebApplicationFirewallPolicy]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cdn_web_application_firewall_policy_patch_parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[CdnWebApplicationFirewallPolicy]" + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "CdnWebApplicationFirewallPolicy", + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.CdnWebApplicationFirewallPolicy]", + "overloads": [] + } + }, + "properties": {} + }, + "ProfilesOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_can_migrate": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "can_migrate_parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[CanMigrateResult]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "can_migrate_parameters": { + "type": "CanMigrateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[CanMigrateResult]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "can_migrate_parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[CanMigrateResult]" + } + ] + }, + "begin_cdn_can_migrate_to_afd": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[CanMigrateResult]", + "overloads": [] + }, + "begin_cdn_migrate_to_afd": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "migration_parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[MigrateResult]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "migration_parameters": { + "type": "CdnMigrationToAfdParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[MigrateResult]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "migration_parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[MigrateResult]" + } + ] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[Profile]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile": { + "type": "Profile", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[Profile]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[Profile]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[None]", + "overloads": [] + }, + "begin_migrate": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "migration_parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[MigrateResult]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "migration_parameters": { + "type": "MigrationParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[MigrateResult]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "migration_parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[MigrateResult]" + } + ] + }, + "begin_migration_abort": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[None]", + "overloads": [] + }, + "begin_migration_commit": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[None]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_update_parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[Profile]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_update_parameters": { + "type": "ProfileUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[Profile]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_update_parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[Profile]" + } + ] + }, + "generate_sso_uri": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "SsoUri", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "Profile", + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.Profile]", + "overloads": [] + }, + "list_by_resource_group": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.Profile]", + "overloads": [] + }, + "list_resource_usage": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.ResourceUsage]", + "overloads": [] + }, + "list_supported_optimization_types": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "SupportedOptimizationTypesListResult", + "overloads": [] + } + }, + "properties": {} + }, + "ResourceUsageOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.ResourceUsage]", + "overloads": [] + } + }, + "properties": {} + }, + "RoutesOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "route_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "route": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[Route]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "route_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "route": { + "type": "Route", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[Route]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "route_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "route": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[Route]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "route_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[None]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "route_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "route_update_properties": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[Route]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "route_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "route_update_properties": { + "type": "RouteUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[Route]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "route_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "route_update_properties": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[Route]" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "route_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "Route", + "overloads": [] + }, + "list_by_endpoint": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.Route]", + "overloads": [] + } + }, + "properties": {} + }, + "RuleSetsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_set_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[None]", + "overloads": [] + }, + "create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_set_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "RuleSet", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_set_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "RuleSet", + "overloads": [] + }, + "list_by_profile": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.RuleSet]", + "overloads": [] + }, + "list_resource_usage": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_set_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.Usage]", + "overloads": [] + } + }, + "properties": {} + }, + "RulesOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_set_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "rule": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[Rule]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_set_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "rule": { + "type": "Rule", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[Rule]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_set_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "rule": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[Rule]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_set_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[None]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_set_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_update_properties": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[Rule]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_set_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_update_properties": { + "type": "RuleUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[Rule]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_set_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_update_properties": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[Rule]" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_set_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "Rule", + "overloads": [] + }, + "list_by_rule_set": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_set_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.Rule]", + "overloads": [] + } + }, + "properties": {} + }, + "SecretsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "secret_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "secret": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[Secret]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "secret_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "secret": { + "type": "Secret", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[Secret]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "secret_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "secret": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[Secret]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "secret_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[None]", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "secret_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "Secret", + "overloads": [] + }, + "list_by_profile": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.Secret]", + "overloads": [] + } + }, + "properties": {} + }, + "SecurityPoliciesOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "security_policy_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "security_policy": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[SecurityPolicy]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "security_policy_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "security_policy": { + "type": "SecurityPolicy", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[SecurityPolicy]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "security_policy_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "security_policy": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[SecurityPolicy]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "security_policy_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[None]", + "overloads": [] + }, + "begin_patch": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "security_policy_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "security_policy_update_properties": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[SecurityPolicy]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "security_policy_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "security_policy_update_properties": { + "type": "SecurityPolicyUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[SecurityPolicy]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "security_policy_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "security_policy_update_properties": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[SecurityPolicy]" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "security_policy_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "SecurityPolicy", + "overloads": [] + }, + "list_by_profile": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.SecurityPolicy]", + "overloads": [] + } + }, + "properties": {} + } + }, + "function_nodes": {} + } +} \ No newline at end of file diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_custom_domains_create.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_custom_domains_create.py index 232c2e014f9f..9e83e8369513 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_custom_domains_create.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_custom_domains_create.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,8 +7,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.cdn import CdnManagementClient @@ -29,7 +28,7 @@ def main(): client = CdnManagementClient( credential=DefaultAzureCredential(), - subscription_id="subid", + subscription_id="00000000-0000-0000-0000-000000000000", ) response = client.afd_custom_domains.begin_create( @@ -40,13 +39,21 @@ def main(): "properties": { "azureDnsZone": {"id": ""}, "hostName": "www.someDomain.net", - "tlsSettings": {"certificateType": "ManagedCertificate", "minimumTlsVersion": "TLS12"}, + "tlsSettings": { + "certificateType": "ManagedCertificate", + "cipherSuiteSetType": "Customized", + "customizedCipherSuiteSet": { + "cipherSuiteSetForTls12": ["ECDHE_RSA_AES128_GCM_SHA256"], + "cipherSuiteSetForTls13": ["TLS_AES_128_GCM_SHA256", "TLS_AES_256_GCM_SHA384"], + }, + "minimumTlsVersion": "TLS12", + }, } }, ).result() print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/AFDCustomDomains_Create.json +# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/AFDCustomDomains_Create.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_custom_domains_delete.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_custom_domains_delete.py index cdde1ccd7199..a537ab9f1885 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_custom_domains_delete.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_custom_domains_delete.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -27,7 +28,7 @@ def main(): client = CdnManagementClient( credential=DefaultAzureCredential(), - subscription_id="subid", + subscription_id="00000000-0000-0000-0000-000000000000", ) client.afd_custom_domains.begin_delete( @@ -37,6 +38,6 @@ def main(): ).result() -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/AFDCustomDomains_Delete.json +# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/AFDCustomDomains_Delete.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_custom_domains_get.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_custom_domains_get.py index c529ac66adb1..950bfe5d7f29 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_custom_domains_get.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_custom_domains_get.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -27,7 +28,7 @@ def main(): client = CdnManagementClient( credential=DefaultAzureCredential(), - subscription_id="subid", + subscription_id="00000000-0000-0000-0000-000000000000", ) response = client.afd_custom_domains.get( @@ -38,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/AFDCustomDomains_Get.json +# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/AFDCustomDomains_Get.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_custom_domains_list_by_profile.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_custom_domains_list_by_profile.py index 9838f20f9aa9..c569f8c01c3e 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_custom_domains_list_by_profile.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_custom_domains_list_by_profile.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -27,7 +28,7 @@ def main(): client = CdnManagementClient( credential=DefaultAzureCredential(), - subscription_id="subid", + subscription_id="00000000-0000-0000-0000-000000000000", ) response = client.afd_custom_domains.list_by_profile( @@ -38,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/AFDCustomDomains_ListByProfile.json +# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/AFDCustomDomains_ListByProfile.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_custom_domains_refresh_validation_token.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_custom_domains_refresh_validation_token.py index 14687b97d07d..61db9f4523d2 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_custom_domains_refresh_validation_token.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_custom_domains_refresh_validation_token.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -27,7 +28,7 @@ def main(): client = CdnManagementClient( credential=DefaultAzureCredential(), - subscription_id="subid", + subscription_id="00000000-0000-0000-0000-000000000000", ) client.afd_custom_domains.begin_refresh_validation_token( @@ -37,6 +38,6 @@ def main(): ).result() -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/AFDCustomDomains_RefreshValidationToken.json +# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/AFDCustomDomains_RefreshValidationToken.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_custom_domains_update.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_custom_domains_update.py index 383d3fee790e..c022ba457f31 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_custom_domains_update.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_custom_domains_update.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,8 +7,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.cdn import CdnManagementClient @@ -29,7 +28,7 @@ def main(): client = CdnManagementClient( credential=DefaultAzureCredential(), - subscription_id="subid", + subscription_id="00000000-0000-0000-0000-000000000000", ) response = client.afd_custom_domains.begin_update( @@ -39,13 +38,21 @@ def main(): custom_domain_update_properties={ "properties": { "azureDnsZone": {"id": ""}, - "tlsSettings": {"certificateType": "CustomerCertificate", "minimumTlsVersion": "TLS12"}, + "tlsSettings": { + "certificateType": "ManagedCertificate", + "cipherSuiteSetType": "Customized", + "customizedCipherSuiteSet": { + "cipherSuiteSetForTls12": ["ECDHE_RSA_AES128_GCM_SHA256"], + "cipherSuiteSetForTls13": ["TLS_AES_128_GCM_SHA256", "TLS_AES_256_GCM_SHA384"], + }, + "minimumTlsVersion": "TLS12", + }, } }, ).result() print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/AFDCustomDomains_Update.json +# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/AFDCustomDomains_Update.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_endpoints_create.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_endpoints_create.py index 6c47e4ba6e73..34547765e57e 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_endpoints_create.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_endpoints_create.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,8 +7,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.cdn import CdnManagementClient @@ -29,7 +28,7 @@ def main(): client = CdnManagementClient( credential=DefaultAzureCredential(), - subscription_id="subid", + subscription_id="00000000-0000-0000-0000-000000000000", ) response = client.afd_endpoints.begin_create( @@ -45,6 +44,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/AFDEndpoints_Create.json +# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/AFDEndpoints_Create.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_endpoints_delete.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_endpoints_delete.py index 2d4f28011117..eebd2e2a3055 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_endpoints_delete.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_endpoints_delete.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -27,7 +28,7 @@ def main(): client = CdnManagementClient( credential=DefaultAzureCredential(), - subscription_id="subid", + subscription_id="00000000-0000-0000-0000-000000000000", ) client.afd_endpoints.begin_delete( @@ -37,6 +38,6 @@ def main(): ).result() -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/AFDEndpoints_Delete.json +# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/AFDEndpoints_Delete.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_endpoints_get.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_endpoints_get.py index eca25cfe859c..ca756a968714 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_endpoints_get.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_endpoints_get.py @@ -27,7 +27,7 @@ def main(): client = CdnManagementClient( credential=DefaultAzureCredential(), - subscription_id="subid", + subscription_id="00000000-0000-0000-0000-000000000000", ) response = client.afd_endpoints.get( @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/AFDEndpoints_Get.json +# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/AFDEndpoints_Get.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_endpoints_list_by_profile.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_endpoints_list_by_profile.py index b678db5bb2db..f7c279da295f 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_endpoints_list_by_profile.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_endpoints_list_by_profile.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -27,7 +28,7 @@ def main(): client = CdnManagementClient( credential=DefaultAzureCredential(), - subscription_id="subid", + subscription_id="00000000-0000-0000-0000-000000000000", ) response = client.afd_endpoints.list_by_profile( @@ -38,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/AFDEndpoints_ListByProfile.json +# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/AFDEndpoints_ListByProfile.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_endpoints_list_resource_usage.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_endpoints_list_resource_usage.py index 656ee738021c..d2a5c14b81ab 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_endpoints_list_resource_usage.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_endpoints_list_resource_usage.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -27,7 +28,7 @@ def main(): client = CdnManagementClient( credential=DefaultAzureCredential(), - subscription_id="subid", + subscription_id="00000000-0000-0000-0000-000000000000", ) response = client.afd_endpoints.list_resource_usage( @@ -39,6 +40,6 @@ def main(): print(item) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/AFDEndpoints_ListResourceUsage.json +# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/AFDEndpoints_ListResourceUsage.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_endpoints_purge_content.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_endpoints_purge_content.py index aebb6dbb77e8..b6a220d1c31d 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_endpoints_purge_content.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_endpoints_purge_content.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,8 +7,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.cdn import CdnManagementClient @@ -29,7 +28,7 @@ def main(): client = CdnManagementClient( credential=DefaultAzureCredential(), - subscription_id="subid", + subscription_id="00000000-0000-0000-0000-000000000000", ) client.afd_endpoints.begin_purge_content( @@ -40,6 +39,6 @@ def main(): ).result() -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/AFDEndpoints_PurgeContent.json +# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/AFDEndpoints_PurgeContent.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_endpoints_update.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_endpoints_update.py index f84366b6e02e..e60b6c0e5602 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_endpoints_update.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_endpoints_update.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,8 +7,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.cdn import CdnManagementClient @@ -29,7 +28,7 @@ def main(): client = CdnManagementClient( credential=DefaultAzureCredential(), - subscription_id="subid", + subscription_id="00000000-0000-0000-0000-000000000000", ) response = client.afd_endpoints.begin_update( @@ -41,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/AFDEndpoints_Update.json +# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/AFDEndpoints_Update.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_endpoints_validate_custom_domain.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_endpoints_validate_custom_domain.py index 37fd7a89af3f..23f735619e7d 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_endpoints_validate_custom_domain.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_endpoints_validate_custom_domain.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,8 +7,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.cdn import CdnManagementClient @@ -29,7 +28,7 @@ def main(): client = CdnManagementClient( credential=DefaultAzureCredential(), - subscription_id="subid", + subscription_id="00000000-0000-0000-0000-000000000000", ) response = client.afd_endpoints.validate_custom_domain( @@ -41,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/AFDEndpoints_ValidateCustomDomain.json +# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/AFDEndpoints_ValidateCustomDomain.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_origin_groups_create.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_origin_groups_create.py index 5f1a41348821..bc92c84cfb4a 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_origin_groups_create.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_origin_groups_create.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,8 +7,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.cdn import CdnManagementClient @@ -29,7 +28,7 @@ def main(): client = CdnManagementClient( credential=DefaultAzureCredential(), - subscription_id="subid", + subscription_id="00000000-0000-0000-0000-000000000000", ) response = client.afd_origin_groups.begin_create( @@ -38,6 +37,13 @@ def main(): origin_group_name="origingroup1", origin_group={ "properties": { + "authentication": { + "scope": "https://www.contoso.com/.default", + "type": "UserAssignedIdentity", + "userAssignedIdentity": { + "id": "/subscriptions/subid/resourcegroups/RG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/user-assigned-id-1" + }, + }, "healthProbeSettings": { "probeIntervalInSeconds": 10, "probePath": "/path2", @@ -56,6 +62,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/AFDOriginGroups_Create.json +# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/AFDOriginGroups_Create.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_origin_groups_delete.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_origin_groups_delete.py index 79952a91120c..13d620d40e7d 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_origin_groups_delete.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_origin_groups_delete.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -27,7 +28,7 @@ def main(): client = CdnManagementClient( credential=DefaultAzureCredential(), - subscription_id="subid", + subscription_id="00000000-0000-0000-0000-000000000000", ) client.afd_origin_groups.begin_delete( @@ -37,6 +38,6 @@ def main(): ).result() -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/AFDOriginGroups_Delete.json +# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/AFDOriginGroups_Delete.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_origin_groups_get.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_origin_groups_get.py index 606b8be50db8..210dc52da731 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_origin_groups_get.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_origin_groups_get.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -27,7 +28,7 @@ def main(): client = CdnManagementClient( credential=DefaultAzureCredential(), - subscription_id="subid", + subscription_id="00000000-0000-0000-0000-000000000000", ) response = client.afd_origin_groups.get( @@ -38,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/AFDOriginGroups_Get.json +# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/AFDOriginGroups_Get.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_origin_groups_list_by_profile.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_origin_groups_list_by_profile.py index de8a9f7f5725..7fd3c62b205b 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_origin_groups_list_by_profile.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_origin_groups_list_by_profile.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -27,7 +28,7 @@ def main(): client = CdnManagementClient( credential=DefaultAzureCredential(), - subscription_id="subid", + subscription_id="00000000-0000-0000-0000-000000000000", ) response = client.afd_origin_groups.list_by_profile( @@ -38,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/AFDOriginGroups_ListByProfile.json +# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/AFDOriginGroups_ListByProfile.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_origin_groups_list_resource_usage.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_origin_groups_list_resource_usage.py index 0297a249bcdb..b04b8575749a 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_origin_groups_list_resource_usage.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_origin_groups_list_resource_usage.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -27,7 +28,7 @@ def main(): client = CdnManagementClient( credential=DefaultAzureCredential(), - subscription_id="subid", + subscription_id="00000000-0000-0000-0000-000000000000", ) response = client.afd_origin_groups.list_resource_usage( @@ -39,6 +40,6 @@ def main(): print(item) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/AFDOriginGroups_ListResourceUsage.json +# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/AFDOriginGroups_ListResourceUsage.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_origin_groups_update.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_origin_groups_update.py index 0a17f8587bb0..df7627eebfd2 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_origin_groups_update.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_origin_groups_update.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,8 +7,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.cdn import CdnManagementClient @@ -29,7 +28,7 @@ def main(): client = CdnManagementClient( credential=DefaultAzureCredential(), - subscription_id="subid", + subscription_id="00000000-0000-0000-0000-000000000000", ) response = client.afd_origin_groups.begin_update( @@ -38,6 +37,13 @@ def main(): origin_group_name="origingroup1", origin_group_update_properties={ "properties": { + "authentication": { + "scope": "https://www.contoso.com/.default", + "type": "UserAssignedIdentity", + "userAssignedIdentity": { + "id": "/subscriptions/subid/resourcegroups/RG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/user-assigned-id-1" + }, + }, "healthProbeSettings": { "probeIntervalInSeconds": 10, "probePath": "/path2", @@ -56,6 +62,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/AFDOriginGroups_Update.json +# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/AFDOriginGroups_Update.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_origins_create.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_origins_create.py index c42baa3cadc9..023ca26633b3 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_origins_create.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_origins_create.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.cdn import CdnManagementClient @@ -29,7 +27,7 @@ def main(): client = CdnManagementClient( credential=DefaultAzureCredential(), - subscription_id="subid", + subscription_id="00000000-0000-0000-0000-000000000000", ) response = client.afd_origins.begin_create( @@ -50,6 +48,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/AFDOrigins_Create.json +# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/AFDOrigins_Create.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_origins_delete.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_origins_delete.py index d8e79eddaa4a..176d80af5131 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_origins_delete.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_origins_delete.py @@ -27,7 +27,7 @@ def main(): client = CdnManagementClient( credential=DefaultAzureCredential(), - subscription_id="subid", + subscription_id="00000000-0000-0000-0000-000000000000", ) client.afd_origins.begin_delete( @@ -38,6 +38,6 @@ def main(): ).result() -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/AFDOrigins_Delete.json +# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/AFDOrigins_Delete.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_origins_get.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_origins_get.py index 4216fff73b9d..786b006c3f1f 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_origins_get.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_origins_get.py @@ -27,7 +27,7 @@ def main(): client = CdnManagementClient( credential=DefaultAzureCredential(), - subscription_id="subid", + subscription_id="00000000-0000-0000-0000-000000000000", ) response = client.afd_origins.get( @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/AFDOrigins_Get.json +# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/AFDOrigins_Get.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_origins_list_by_origin_group.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_origins_list_by_origin_group.py index 8aca66fa1ea7..d9044d71933e 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_origins_list_by_origin_group.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_origins_list_by_origin_group.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -27,7 +28,7 @@ def main(): client = CdnManagementClient( credential=DefaultAzureCredential(), - subscription_id="subid", + subscription_id="00000000-0000-0000-0000-000000000000", ) response = client.afd_origins.list_by_origin_group( @@ -39,6 +40,6 @@ def main(): print(item) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/AFDOrigins_ListByOriginGroup.json +# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/AFDOrigins_ListByOriginGroup.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_origins_update.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_origins_update.py index ffdd1c9eb0c4..d3cc9470d816 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_origins_update.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_origins_update.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.cdn import CdnManagementClient @@ -29,7 +27,7 @@ def main(): client = CdnManagementClient( credential=DefaultAzureCredential(), - subscription_id="subid", + subscription_id="00000000-0000-0000-0000-000000000000", ) response = client.afd_origins.begin_update( @@ -49,6 +47,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/AFDOrigins_Update.json +# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/AFDOrigins_Update.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_profiles_check_endpoint_name_availability.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_profiles_check_endpoint_name_availability.py index 3cd89e63f42a..718f7ee666b3 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_profiles_check_endpoint_name_availability.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_profiles_check_endpoint_name_availability.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,8 +7,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.cdn import CdnManagementClient @@ -29,7 +28,7 @@ def main(): client = CdnManagementClient( credential=DefaultAzureCredential(), - subscription_id="subid", + subscription_id="00000000-0000-0000-0000-000000000000", ) response = client.afd_profiles.check_endpoint_name_availability( @@ -44,6 +43,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/AFDProfiles_CheckEndpointNameAvailability.json +# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/AFDProfiles_CheckEndpointNameAvailability.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_profiles_check_host_name_availability.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_profiles_check_host_name_availability.py index 0c58ab223c3d..160b7d7b4b61 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_profiles_check_host_name_availability.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_profiles_check_host_name_availability.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,8 +7,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.cdn import CdnManagementClient @@ -29,7 +28,7 @@ def main(): client = CdnManagementClient( credential=DefaultAzureCredential(), - subscription_id="subid", + subscription_id="00000000-0000-0000-0000-000000000000", ) response = client.afd_profiles.check_host_name_availability( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/AFDProfiles_CheckHostNameAvailability.json +# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/AFDProfiles_CheckHostNameAvailability.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_profiles_list_resource_usage.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_profiles_list_resource_usage.py index 7d952f353b0f..8bf3e612f6f8 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_profiles_list_resource_usage.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_profiles_list_resource_usage.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -27,7 +28,7 @@ def main(): client = CdnManagementClient( credential=DefaultAzureCredential(), - subscription_id="subid", + subscription_id="00000000-0000-0000-0000-000000000000", ) response = client.afd_profiles.list_resource_usage( @@ -38,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/AFDProfiles_ListResourceUsage.json +# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/AFDProfiles_ListResourceUsage.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_profiles_upgrade.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_profiles_upgrade.py index 183a03ed50d9..41225644e7b8 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_profiles_upgrade.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_profiles_upgrade.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,8 +7,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.cdn import CdnManagementClient @@ -29,7 +28,7 @@ def main(): client = CdnManagementClient( credential=DefaultAzureCredential(), - subscription_id="subid", + subscription_id="00000000-0000-0000-0000-000000000000", ) response = client.afd_profiles.begin_upgrade( @@ -49,6 +48,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/AFDProfiles_Upgrade.json +# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/AFDProfiles_Upgrade.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_profiles_validate_secret.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_profiles_validate_secret.py index 66b34e4ba7d8..b9a63f1eb9b7 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_profiles_validate_secret.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_profiles_validate_secret.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,8 +7,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.cdn import CdnManagementClient @@ -29,7 +28,7 @@ def main(): client = CdnManagementClient( credential=DefaultAzureCredential(), - subscription_id="subid", + subscription_id="00000000-0000-0000-0000-000000000000", ) response = client.afd_profiles.validate_secret( @@ -45,6 +44,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/AFDProfiles_ValidateSecret.json +# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/AFDProfiles_ValidateSecret.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/cdn_profiles_can_migrate.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/cdn_profiles_can_migrate.py new file mode 100644 index 000000000000..aaec77d1f482 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/cdn_profiles_can_migrate.py @@ -0,0 +1,43 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.cdn import CdnManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-cdn +# USAGE + python cdn_profiles_can_migrate.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = CdnManagementClient( + credential=DefaultAzureCredential(), + subscription_id="00000000-0000-0000-0000-000000000000", + ) + + response = client.profiles.begin_cdn_can_migrate_to_afd( + resource_group_name="RG", + profile_name="profile1", + ).result() + print(response) + + +# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/CdnProfiles_CanMigrate.json +if __name__ == "__main__": + main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/cdn_profiles_migrate.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/cdn_profiles_migrate.py new file mode 100644 index 000000000000..d28444604a54 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/cdn_profiles_migrate.py @@ -0,0 +1,44 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.cdn import CdnManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-cdn +# USAGE + python cdn_profiles_migrate.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = CdnManagementClient( + credential=DefaultAzureCredential(), + subscription_id="00000000-0000-0000-0000-000000000000", + ) + + response = client.profiles.begin_cdn_migrate_to_afd( + resource_group_name="RG", + profile_name="profile1", + migration_parameters={"sku": {"name": "Standard_AzureFrontDoor"}}, + ).result() + print(response) + + +# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/CdnProfiles_Migrate.json +if __name__ == "__main__": + main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/check_endpoint_name_availability.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/check_endpoint_name_availability.py index e674cea2011f..9a8abf989b4e 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/check_endpoint_name_availability.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/check_endpoint_name_availability.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,8 +7,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.cdn import CdnManagementClient @@ -29,7 +28,7 @@ def main(): client = CdnManagementClient( credential=DefaultAzureCredential(), - subscription_id="subid", + subscription_id="00000000-0000-0000-0000-000000000000", ) response = client.check_endpoint_name_availability( @@ -43,6 +42,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/CheckEndpointNameAvailability.json +# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/CheckEndpointNameAvailability.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/check_name_availability.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/check_name_availability.py index ef2972396a83..9efba1012d5c 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/check_name_availability.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/check_name_availability.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,8 +7,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.cdn import CdnManagementClient @@ -38,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/CheckNameAvailability.json +# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/CheckNameAvailability.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/check_name_availability_with_subscription.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/check_name_availability_with_subscription.py index dafc98d6dee6..fd1d929c030f 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/check_name_availability_with_subscription.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/check_name_availability_with_subscription.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,8 +7,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.cdn import CdnManagementClient @@ -29,7 +28,7 @@ def main(): client = CdnManagementClient( credential=DefaultAzureCredential(), - subscription_id="subid", + subscription_id="00000000-0000-0000-0000-000000000000", ) response = client.check_name_availability_with_subscription( @@ -38,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/CheckNameAvailabilityWithSubscription.json +# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/CheckNameAvailabilityWithSubscription.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/custom_domains_create.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/custom_domains_create.py index 7f0e634b4aa4..d4959c427809 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/custom_domains_create.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/custom_domains_create.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,8 +7,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.cdn import CdnManagementClient @@ -29,7 +28,7 @@ def main(): client = CdnManagementClient( credential=DefaultAzureCredential(), - subscription_id="subid", + subscription_id="00000000-0000-0000-0000-000000000000", ) response = client.custom_domains.begin_create( @@ -42,6 +41,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/CustomDomains_Create.json +# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/CustomDomains_Create.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/custom_domains_delete.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/custom_domains_delete.py index 7861318578bd..5322c28aacfc 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/custom_domains_delete.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/custom_domains_delete.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -27,7 +28,7 @@ def main(): client = CdnManagementClient( credential=DefaultAzureCredential(), - subscription_id="subid", + subscription_id="00000000-0000-0000-0000-000000000000", ) response = client.custom_domains.begin_delete( @@ -39,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/CustomDomains_Delete.json +# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/CustomDomains_Delete.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/custom_domains_disable_custom_https.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/custom_domains_disable_custom_https.py index f9194bef7069..00f6fabc9efd 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/custom_domains_disable_custom_https.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/custom_domains_disable_custom_https.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -27,7 +28,7 @@ def main(): client = CdnManagementClient( credential=DefaultAzureCredential(), - subscription_id="subid", + subscription_id="00000000-0000-0000-0000-000000000000", ) response = client.custom_domains.begin_disable_custom_https( @@ -39,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/CustomDomains_DisableCustomHttps.json +# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/CustomDomains_DisableCustomHttps.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/custom_domains_enable_custom_https_using_byoc.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/custom_domains_enable_custom_https_using_byoc.py index 4f88e220d426..8acf70264a2f 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/custom_domains_enable_custom_https_using_byoc.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/custom_domains_enable_custom_https_using_byoc.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -27,7 +28,7 @@ def main(): client = CdnManagementClient( credential=DefaultAzureCredential(), - subscription_id="subid", + subscription_id="00000000-0000-0000-0000-000000000000", ) response = client.custom_domains.begin_enable_custom_https( @@ -39,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/CustomDomains_EnableCustomHttpsUsingBYOC.json +# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/CustomDomains_EnableCustomHttpsUsingBYOC.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/custom_domains_enable_custom_https_using_cdn_managed_certificate.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/custom_domains_enable_custom_https_using_cdn_managed_certificate.py index c62b5e115f17..243db9cb0120 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/custom_domains_enable_custom_https_using_cdn_managed_certificate.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/custom_domains_enable_custom_https_using_cdn_managed_certificate.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -27,7 +28,7 @@ def main(): client = CdnManagementClient( credential=DefaultAzureCredential(), - subscription_id="subid", + subscription_id="00000000-0000-0000-0000-000000000000", ) response = client.custom_domains.begin_enable_custom_https( @@ -39,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/CustomDomains_EnableCustomHttpsUsingCDNManagedCertificate.json +# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/CustomDomains_EnableCustomHttpsUsingCDNManagedCertificate.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/custom_domains_get.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/custom_domains_get.py index 09b7e305b0e2..a4b50d3f1e52 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/custom_domains_get.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/custom_domains_get.py @@ -27,7 +27,7 @@ def main(): client = CdnManagementClient( credential=DefaultAzureCredential(), - subscription_id="subid", + subscription_id="00000000-0000-0000-0000-000000000000", ) response = client.custom_domains.get( @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/CustomDomains_Get.json +# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/CustomDomains_Get.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/custom_domains_list_by_endpoint.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/custom_domains_list_by_endpoint.py index 13a26666662b..e51a7dbbb0b5 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/custom_domains_list_by_endpoint.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/custom_domains_list_by_endpoint.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -27,7 +28,7 @@ def main(): client = CdnManagementClient( credential=DefaultAzureCredential(), - subscription_id="subid", + subscription_id="00000000-0000-0000-0000-000000000000", ) response = client.custom_domains.list_by_endpoint( @@ -39,6 +40,6 @@ def main(): print(item) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/CustomDomains_ListByEndpoint.json +# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/CustomDomains_ListByEndpoint.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/edge_nodes_list.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/edge_nodes_list.py index c7e2062ae372..0cc034739ccb 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/edge_nodes_list.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/edge_nodes_list.py @@ -35,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/EdgeNodes_List.json +# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/EdgeNodes_List.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/endpoints_create.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/endpoints_create.py index 9168c89ae5a4..605aac0a2453 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/endpoints_create.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/endpoints_create.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,8 +7,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.cdn import CdnManagementClient @@ -29,7 +28,7 @@ def main(): client = CdnManagementClient( credential=DefaultAzureCredential(), - subscription_id="subid", + subscription_id="00000000-0000-0000-0000-000000000000", ) response = client.endpoints.begin_create( @@ -156,6 +155,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/Endpoints_Create.json +# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/Endpoints_Create.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/endpoints_delete.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/endpoints_delete.py index 39a54278d76d..10ad81899ad1 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/endpoints_delete.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/endpoints_delete.py @@ -27,7 +27,7 @@ def main(): client = CdnManagementClient( credential=DefaultAzureCredential(), - subscription_id="subid", + subscription_id="00000000-0000-0000-0000-000000000000", ) client.endpoints.begin_delete( @@ -37,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/Endpoints_Delete.json +# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/Endpoints_Delete.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/endpoints_get.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/endpoints_get.py index 301f9f733c6a..27d87b25a7ec 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/endpoints_get.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/endpoints_get.py @@ -27,7 +27,7 @@ def main(): client = CdnManagementClient( credential=DefaultAzureCredential(), - subscription_id="subid", + subscription_id="00000000-0000-0000-0000-000000000000", ) response = client.endpoints.get( @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/Endpoints_Get.json +# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/Endpoints_Get.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/endpoints_list_by_profile.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/endpoints_list_by_profile.py index f5461c728bc4..8a75d8b6ff0a 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/endpoints_list_by_profile.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/endpoints_list_by_profile.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -27,7 +28,7 @@ def main(): client = CdnManagementClient( credential=DefaultAzureCredential(), - subscription_id="subid", + subscription_id="00000000-0000-0000-0000-000000000000", ) response = client.endpoints.list_by_profile( @@ -38,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/Endpoints_ListByProfile.json +# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/Endpoints_ListByProfile.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/endpoints_list_resource_usage.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/endpoints_list_resource_usage.py index 405675b567fe..4c56bc010dc2 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/endpoints_list_resource_usage.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/endpoints_list_resource_usage.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -27,7 +28,7 @@ def main(): client = CdnManagementClient( credential=DefaultAzureCredential(), - subscription_id="subid", + subscription_id="00000000-0000-0000-0000-000000000000", ) response = client.endpoints.list_resource_usage( @@ -39,6 +40,6 @@ def main(): print(item) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/Endpoints_ListResourceUsage.json +# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/Endpoints_ListResourceUsage.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/endpoints_load_content.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/endpoints_load_content.py index 1cf246f15099..16a03c2547ce 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/endpoints_load_content.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/endpoints_load_content.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,8 +7,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.cdn import CdnManagementClient @@ -29,7 +28,7 @@ def main(): client = CdnManagementClient( credential=DefaultAzureCredential(), - subscription_id="subid", + subscription_id="00000000-0000-0000-0000-000000000000", ) client.endpoints.begin_load_content( @@ -40,6 +39,6 @@ def main(): ).result() -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/Endpoints_LoadContent.json +# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/Endpoints_LoadContent.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/endpoints_purge_content.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/endpoints_purge_content.py index 57adb262b0fa..8e3b5ec99613 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/endpoints_purge_content.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/endpoints_purge_content.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,8 +7,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.cdn import CdnManagementClient @@ -29,7 +28,7 @@ def main(): client = CdnManagementClient( credential=DefaultAzureCredential(), - subscription_id="subid", + subscription_id="00000000-0000-0000-0000-000000000000", ) client.endpoints.begin_purge_content( @@ -40,6 +39,6 @@ def main(): ).result() -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/Endpoints_PurgeContent.json +# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/Endpoints_PurgeContent.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/endpoints_start.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/endpoints_start.py index 87f3f2134ca8..a7079aa3c913 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/endpoints_start.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/endpoints_start.py @@ -27,7 +27,7 @@ def main(): client = CdnManagementClient( credential=DefaultAzureCredential(), - subscription_id="subid", + subscription_id="00000000-0000-0000-0000-000000000000", ) response = client.endpoints.begin_start( @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/Endpoints_Start.json +# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/Endpoints_Start.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/endpoints_stop.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/endpoints_stop.py index d8ec097a2211..38427e8f7965 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/endpoints_stop.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/endpoints_stop.py @@ -27,7 +27,7 @@ def main(): client = CdnManagementClient( credential=DefaultAzureCredential(), - subscription_id="subid", + subscription_id="00000000-0000-0000-0000-000000000000", ) response = client.endpoints.begin_stop( @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/Endpoints_Stop.json +# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/Endpoints_Stop.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/endpoints_update.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/endpoints_update.py index 828459ba88ef..41b5c5c3adbe 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/endpoints_update.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/endpoints_update.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.cdn import CdnManagementClient @@ -29,7 +27,7 @@ def main(): client = CdnManagementClient( credential=DefaultAzureCredential(), - subscription_id="subid", + subscription_id="00000000-0000-0000-0000-000000000000", ) response = client.endpoints.begin_update( @@ -41,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/Endpoints_Update.json +# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/Endpoints_Update.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/endpoints_validate_custom_domain.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/endpoints_validate_custom_domain.py index af88a31d15c6..5940e854a6e9 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/endpoints_validate_custom_domain.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/endpoints_validate_custom_domain.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,8 +7,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.cdn import CdnManagementClient @@ -29,7 +28,7 @@ def main(): client = CdnManagementClient( credential=DefaultAzureCredential(), - subscription_id="subid", + subscription_id="00000000-0000-0000-0000-000000000000", ) response = client.endpoints.validate_custom_domain( @@ -41,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/Endpoints_ValidateCustomDomain.json +# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/Endpoints_ValidateCustomDomain.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/log_analytics_get_log_analytics_locations.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/log_analytics_get_log_analytics_locations.py index 3a8bd6124731..a9ede172ff83 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/log_analytics_get_log_analytics_locations.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/log_analytics_get_log_analytics_locations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -27,7 +28,7 @@ def main(): client = CdnManagementClient( credential=DefaultAzureCredential(), - subscription_id="subid", + subscription_id="00000000-0000-0000-0000-000000000000", ) response = client.log_analytics.get_log_analytics_locations( @@ -37,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/LogAnalytics_GetLogAnalyticsLocations.json +# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/LogAnalytics_GetLogAnalyticsLocations.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/log_analytics_get_log_analytics_metrics.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/log_analytics_get_log_analytics_metrics.py index 99792edff08a..ba93233e3768 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/log_analytics_get_log_analytics_metrics.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/log_analytics_get_log_analytics_metrics.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,17 +7,12 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import datetime import isodate -from typing import List, TYPE_CHECKING, Union from azure.identity import DefaultAzureCredential from azure.mgmt.cdn import CdnManagementClient -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from .. import models as _models """ # PREREQUISITES pip install azure-identity @@ -34,7 +30,7 @@ def main(): client = CdnManagementClient( credential=DefaultAzureCredential(), - subscription_id="subid", + subscription_id="00000000-0000-0000-0000-000000000000", ) response = client.log_analytics.get_log_analytics_metrics( @@ -50,6 +46,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/LogAnalytics_GetLogAnalyticsMetrics.json +# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/LogAnalytics_GetLogAnalyticsMetrics.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/log_analytics_get_log_analytics_rankings.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/log_analytics_get_log_analytics_rankings.py index 1b476cdd4515..ce8c5e1c23ac 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/log_analytics_get_log_analytics_rankings.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/log_analytics_get_log_analytics_rankings.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,17 +7,12 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import datetime import isodate -from typing import List, TYPE_CHECKING, Union from azure.identity import DefaultAzureCredential from azure.mgmt.cdn import CdnManagementClient -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from .. import models as _models """ # PREREQUISITES pip install azure-identity @@ -34,7 +30,7 @@ def main(): client = CdnManagementClient( credential=DefaultAzureCredential(), - subscription_id="subid", + subscription_id="00000000-0000-0000-0000-000000000000", ) response = client.log_analytics.get_log_analytics_rankings( @@ -49,6 +45,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/LogAnalytics_GetLogAnalyticsRankings.json +# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/LogAnalytics_GetLogAnalyticsRankings.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/log_analytics_get_log_analytics_resources.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/log_analytics_get_log_analytics_resources.py index ba65e42c3cef..bf9ca81ab1a5 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/log_analytics_get_log_analytics_resources.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/log_analytics_get_log_analytics_resources.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -27,7 +28,7 @@ def main(): client = CdnManagementClient( credential=DefaultAzureCredential(), - subscription_id="subid", + subscription_id="00000000-0000-0000-0000-000000000000", ) response = client.log_analytics.get_log_analytics_resources( @@ -37,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/LogAnalytics_GetLogAnalyticsResources.json +# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/LogAnalytics_GetLogAnalyticsResources.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/log_analytics_get_waf_log_analytics_metrics.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/log_analytics_get_waf_log_analytics_metrics.py index bd7f9b3079db..2257efc12710 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/log_analytics_get_waf_log_analytics_metrics.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/log_analytics_get_waf_log_analytics_metrics.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,17 +7,12 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import datetime import isodate -from typing import List, TYPE_CHECKING, Union from azure.identity import DefaultAzureCredential from azure.mgmt.cdn import CdnManagementClient -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from .. import models as _models """ # PREREQUISITES pip install azure-identity @@ -34,7 +30,7 @@ def main(): client = CdnManagementClient( credential=DefaultAzureCredential(), - subscription_id="subid", + subscription_id="00000000-0000-0000-0000-000000000000", ) response = client.log_analytics.get_waf_log_analytics_metrics( @@ -48,6 +44,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/LogAnalytics_GetWafLogAnalyticsMetrics.json +# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/LogAnalytics_GetWafLogAnalyticsMetrics.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/log_analytics_get_waf_log_analytics_rankings.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/log_analytics_get_waf_log_analytics_rankings.py index d6c05717d1e6..423b09064ce4 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/log_analytics_get_waf_log_analytics_rankings.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/log_analytics_get_waf_log_analytics_rankings.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,17 +7,12 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import datetime import isodate -from typing import List, TYPE_CHECKING, Union from azure.identity import DefaultAzureCredential from azure.mgmt.cdn import CdnManagementClient -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from .. import models as _models """ # PREREQUISITES pip install azure-identity @@ -34,7 +30,7 @@ def main(): client = CdnManagementClient( credential=DefaultAzureCredential(), - subscription_id="subid", + subscription_id="00000000-0000-0000-0000-000000000000", ) response = client.log_analytics.get_waf_log_analytics_rankings( @@ -49,6 +45,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/LogAnalytics_GetWafLogAnalyticsRankings.json +# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/LogAnalytics_GetWafLogAnalyticsRankings.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/operations_list.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/operations_list.py index 60380404b906..3484d5df0616 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/operations_list.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/operations_list.py @@ -35,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/Operations_List.json +# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/Operations_List.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/origin_groups_create.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/origin_groups_create.py index 8fc8ae01c77a..084525138507 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/origin_groups_create.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/origin_groups_create.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,8 +7,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.cdn import CdnManagementClient @@ -29,7 +28,7 @@ def main(): client = CdnManagementClient( credential=DefaultAzureCredential(), - subscription_id="subid", + subscription_id="00000000-0000-0000-0000-000000000000", ) response = client.origin_groups.begin_create( @@ -60,6 +59,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/OriginGroups_Create.json +# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/OriginGroups_Create.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/origin_groups_delete.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/origin_groups_delete.py index 16263ab85319..ed9f3d27f93b 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/origin_groups_delete.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/origin_groups_delete.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -27,7 +28,7 @@ def main(): client = CdnManagementClient( credential=DefaultAzureCredential(), - subscription_id="subid", + subscription_id="00000000-0000-0000-0000-000000000000", ) client.origin_groups.begin_delete( @@ -38,6 +39,6 @@ def main(): ).result() -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/OriginGroups_Delete.json +# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/OriginGroups_Delete.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/origin_groups_get.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/origin_groups_get.py index e0e64c28f83d..19d2eaabeb3a 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/origin_groups_get.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/origin_groups_get.py @@ -27,7 +27,7 @@ def main(): client = CdnManagementClient( credential=DefaultAzureCredential(), - subscription_id="subid", + subscription_id="00000000-0000-0000-0000-000000000000", ) response = client.origin_groups.get( @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/OriginGroups_Get.json +# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/OriginGroups_Get.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/origin_groups_list_by_endpoint.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/origin_groups_list_by_endpoint.py index 59a0711ca5a5..ea86f8bff275 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/origin_groups_list_by_endpoint.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/origin_groups_list_by_endpoint.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -27,7 +28,7 @@ def main(): client = CdnManagementClient( credential=DefaultAzureCredential(), - subscription_id="subid", + subscription_id="00000000-0000-0000-0000-000000000000", ) response = client.origin_groups.list_by_endpoint( @@ -39,6 +40,6 @@ def main(): print(item) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/OriginGroups_ListByEndpoint.json +# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/OriginGroups_ListByEndpoint.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/origin_groups_update.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/origin_groups_update.py index 9ca87890ab2c..81b86e4fb3f3 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/origin_groups_update.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/origin_groups_update.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,8 +7,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.cdn import CdnManagementClient @@ -29,7 +28,7 @@ def main(): client = CdnManagementClient( credential=DefaultAzureCredential(), - subscription_id="subid", + subscription_id="00000000-0000-0000-0000-000000000000", ) response = client.origin_groups.begin_update( @@ -56,6 +55,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/OriginGroups_Update.json +# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/OriginGroups_Update.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/origins_create.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/origins_create.py index df360fce2549..3a2536376ad5 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/origins_create.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/origins_create.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,8 +7,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.cdn import CdnManagementClient @@ -29,7 +28,7 @@ def main(): client = CdnManagementClient( credential=DefaultAzureCredential(), - subscription_id="subid", + subscription_id="00000000-0000-0000-0000-000000000000", ) response = client.origins.begin_create( @@ -55,6 +54,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/Origins_Create.json +# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/Origins_Create.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/origins_delete.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/origins_delete.py index 2e0262ae7112..a4fddec72615 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/origins_delete.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/origins_delete.py @@ -27,7 +27,7 @@ def main(): client = CdnManagementClient( credential=DefaultAzureCredential(), - subscription_id="subid", + subscription_id="00000000-0000-0000-0000-000000000000", ) client.origins.begin_delete( @@ -38,6 +38,6 @@ def main(): ).result() -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/Origins_Delete.json +# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/Origins_Delete.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/origins_get.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/origins_get.py index babb5673bbf7..f285b8d253e7 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/origins_get.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/origins_get.py @@ -27,7 +27,7 @@ def main(): client = CdnManagementClient( credential=DefaultAzureCredential(), - subscription_id="subid", + subscription_id="00000000-0000-0000-0000-000000000000", ) response = client.origins.get( @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/Origins_Get.json +# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/Origins_Get.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/origins_list_by_endpoint.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/origins_list_by_endpoint.py index 9841934192fd..c855bfff599b 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/origins_list_by_endpoint.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/origins_list_by_endpoint.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -27,7 +28,7 @@ def main(): client = CdnManagementClient( credential=DefaultAzureCredential(), - subscription_id="subid", + subscription_id="00000000-0000-0000-0000-000000000000", ) response = client.origins.list_by_endpoint( @@ -39,6 +40,6 @@ def main(): print(item) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/Origins_ListByEndpoint.json +# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/Origins_ListByEndpoint.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/origins_update.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/origins_update.py index 048a05562201..8a930cb7449c 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/origins_update.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/origins_update.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.cdn import CdnManagementClient @@ -29,7 +27,7 @@ def main(): client = CdnManagementClient( credential=DefaultAzureCredential(), - subscription_id="subid", + subscription_id="00000000-0000-0000-0000-000000000000", ) response = client.origins.begin_update( @@ -52,6 +50,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/Origins_Update.json +# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/Origins_Update.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/profiles_can_migrate.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/profiles_can_migrate.py index 61208bef63d0..58dee607611d 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/profiles_can_migrate.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/profiles_can_migrate.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,8 +7,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.cdn import CdnManagementClient @@ -29,7 +28,7 @@ def main(): client = CdnManagementClient( credential=DefaultAzureCredential(), - subscription_id="subid", + subscription_id="00000000-0000-0000-0000-000000000000", ) response = client.profiles.begin_can_migrate( @@ -43,6 +42,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/Profiles_CanMigrate.json +# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/Profiles_CanMigrate.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/profiles_create.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/profiles_create.py index 139587290691..c94797f0b411 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/profiles_create.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/profiles_create.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.cdn import CdnManagementClient @@ -29,7 +27,7 @@ def main(): client = CdnManagementClient( credential=DefaultAzureCredential(), - subscription_id="subid", + subscription_id="00000000-0000-0000-0000-000000000000", ) response = client.profiles.begin_create( @@ -40,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/Profiles_Create.json +# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/Profiles_Create.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/profiles_delete.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/profiles_delete.py index e15c08f6a878..6cc4bb845edb 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/profiles_delete.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/profiles_delete.py @@ -27,7 +27,7 @@ def main(): client = CdnManagementClient( credential=DefaultAzureCredential(), - subscription_id="subid", + subscription_id="00000000-0000-0000-0000-000000000000", ) client.profiles.begin_delete( @@ -36,6 +36,6 @@ def main(): ).result() -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/Profiles_Delete.json +# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/Profiles_Delete.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/profiles_generate_sso_uri.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/profiles_generate_sso_uri.py index ccbc01208071..637bb8ba8063 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/profiles_generate_sso_uri.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/profiles_generate_sso_uri.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -27,7 +28,7 @@ def main(): client = CdnManagementClient( credential=DefaultAzureCredential(), - subscription_id="subid", + subscription_id="00000000-0000-0000-0000-000000000000", ) response = client.profiles.generate_sso_uri( @@ -37,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/Profiles_GenerateSsoUri.json +# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/Profiles_GenerateSsoUri.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/profiles_get.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/profiles_get.py index 172c69425889..7e2faaddb9e5 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/profiles_get.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/profiles_get.py @@ -27,7 +27,7 @@ def main(): client = CdnManagementClient( credential=DefaultAzureCredential(), - subscription_id="subid", + subscription_id="00000000-0000-0000-0000-000000000000", ) response = client.profiles.get( @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/Profiles_Get.json +# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/Profiles_Get.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/profiles_list.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/profiles_list.py index d14470182ced..90ffdbaf8c79 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/profiles_list.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/profiles_list.py @@ -27,7 +27,7 @@ def main(): client = CdnManagementClient( credential=DefaultAzureCredential(), - subscription_id="subid", + subscription_id="00000000-0000-0000-0000-000000000000", ) response = client.profiles.list() @@ -35,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/Profiles_List.json +# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/Profiles_List.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/profiles_list_by_resource_group.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/profiles_list_by_resource_group.py index b97c6fa4f15c..205528432ec2 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/profiles_list_by_resource_group.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/profiles_list_by_resource_group.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -27,7 +28,7 @@ def main(): client = CdnManagementClient( credential=DefaultAzureCredential(), - subscription_id="subid", + subscription_id="00000000-0000-0000-0000-000000000000", ) response = client.profiles.list_by_resource_group( @@ -37,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/Profiles_ListByResourceGroup.json +# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/Profiles_ListByResourceGroup.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/profiles_list_resource_usage.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/profiles_list_resource_usage.py index b4d07330bcbe..a9002d953c2f 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/profiles_list_resource_usage.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/profiles_list_resource_usage.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -27,7 +28,7 @@ def main(): client = CdnManagementClient( credential=DefaultAzureCredential(), - subscription_id="subid", + subscription_id="00000000-0000-0000-0000-000000000000", ) response = client.profiles.list_resource_usage( @@ -38,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/Profiles_ListResourceUsage.json +# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/Profiles_ListResourceUsage.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/profiles_list_supported_optimization_types.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/profiles_list_supported_optimization_types.py index 2f16d6104d98..96daa1ce2e91 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/profiles_list_supported_optimization_types.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/profiles_list_supported_optimization_types.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -27,7 +28,7 @@ def main(): client = CdnManagementClient( credential=DefaultAzureCredential(), - subscription_id="subid", + subscription_id="00000000-0000-0000-0000-000000000000", ) response = client.profiles.list_supported_optimization_types( @@ -37,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/Profiles_ListSupportedOptimizationTypes.json +# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/Profiles_ListSupportedOptimizationTypes.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/profiles_migrate.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/profiles_migrate.py index ff448f96f765..f95bc09a3bc1 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/profiles_migrate.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/profiles_migrate.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.cdn import CdnManagementClient @@ -29,7 +27,7 @@ def main(): client = CdnManagementClient( credential=DefaultAzureCredential(), - subscription_id="subid", + subscription_id="00000000-0000-0000-0000-000000000000", ) response = client.profiles.begin_migrate( @@ -45,6 +43,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/Profiles_Migrate.json +# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/Profiles_Migrate.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/profiles_migration_abort.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/profiles_migration_abort.py new file mode 100644 index 000000000000..23dc3fc366f2 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/profiles_migration_abort.py @@ -0,0 +1,42 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.cdn import CdnManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-cdn +# USAGE + python profiles_migration_abort.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = CdnManagementClient( + credential=DefaultAzureCredential(), + subscription_id="00000000-0000-0000-0000-000000000000", + ) + + client.profiles.begin_migration_abort( + resource_group_name="RG", + profile_name="profile1", + ).result() + + +# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/Profiles_MigrationAbort.json +if __name__ == "__main__": + main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/profiles_migration_commit.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/profiles_migration_commit.py index 39880c2a7040..98803bbbad8e 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/profiles_migration_commit.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/profiles_migration_commit.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -27,7 +28,7 @@ def main(): client = CdnManagementClient( credential=DefaultAzureCredential(), - subscription_id="subid", + subscription_id="00000000-0000-0000-0000-000000000000", ) client.profiles.begin_migration_commit( @@ -36,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/Profiles_MigrationCommit.json +# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/Profiles_MigrationCommit.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/profiles_update.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/profiles_update.py index 7a77aa5cf83a..b27d79d3fdb3 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/profiles_update.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/profiles_update.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.cdn import CdnManagementClient @@ -29,7 +27,7 @@ def main(): client = CdnManagementClient( credential=DefaultAzureCredential(), - subscription_id="subid", + subscription_id="00000000-0000-0000-0000-000000000000", ) response = client.profiles.begin_update( @@ -40,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/Profiles_Update.json +# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/Profiles_Update.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/resource_usage_list.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/resource_usage_list.py index f13ebbc36df5..124ae0a59312 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/resource_usage_list.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/resource_usage_list.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -27,7 +28,7 @@ def main(): client = CdnManagementClient( credential=DefaultAzureCredential(), - subscription_id="subid", + subscription_id="00000000-0000-0000-0000-000000000000", ) response = client.resource_usage.list() @@ -35,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/ResourceUsage_List.json +# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/ResourceUsage_List.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/routes_create.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/routes_create.py index ac4b9aac1942..a0cef3f31760 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/routes_create.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/routes_create.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,8 +7,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.cdn import CdnManagementClient @@ -29,7 +28,7 @@ def main(): client = CdnManagementClient( credential=DefaultAzureCredential(), - subscription_id="subid", + subscription_id="00000000-0000-0000-0000-000000000000", ) response = client.routes.begin_create( @@ -73,6 +72,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/Routes_Create.json +# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/Routes_Create.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/routes_delete.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/routes_delete.py index 005a5640be13..716462c41f96 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/routes_delete.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/routes_delete.py @@ -27,7 +27,7 @@ def main(): client = CdnManagementClient( credential=DefaultAzureCredential(), - subscription_id="subid", + subscription_id="00000000-0000-0000-0000-000000000000", ) client.routes.begin_delete( @@ -38,6 +38,6 @@ def main(): ).result() -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/Routes_Delete.json +# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/Routes_Delete.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/routes_get.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/routes_get.py index 97d3bbb4ffed..3deef0cdbb0d 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/routes_get.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/routes_get.py @@ -27,7 +27,7 @@ def main(): client = CdnManagementClient( credential=DefaultAzureCredential(), - subscription_id="subid", + subscription_id="00000000-0000-0000-0000-000000000000", ) response = client.routes.get( @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/Routes_Get.json +# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/Routes_Get.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/routes_list_by_endpoint.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/routes_list_by_endpoint.py index 975bbf16c82e..0b807e7ab1d1 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/routes_list_by_endpoint.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/routes_list_by_endpoint.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -27,7 +28,7 @@ def main(): client = CdnManagementClient( credential=DefaultAzureCredential(), - subscription_id="subid", + subscription_id="00000000-0000-0000-0000-000000000000", ) response = client.routes.list_by_endpoint( @@ -39,6 +40,6 @@ def main(): print(item) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/Routes_ListByEndpoint.json +# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/Routes_ListByEndpoint.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/routes_update.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/routes_update.py index 2e1431b0c52d..3ea6386cd24a 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/routes_update.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/routes_update.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,8 +7,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.cdn import CdnManagementClient @@ -29,7 +28,7 @@ def main(): client = CdnManagementClient( credential=DefaultAzureCredential(), - subscription_id="subid", + subscription_id="00000000-0000-0000-0000-000000000000", ) response = client.routes.begin_update( @@ -72,6 +71,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/Routes_Update.json +# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/Routes_Update.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/rule_sets_create.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/rule_sets_create.py index e3c4d5ab619a..c76bfba00ced 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/rule_sets_create.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/rule_sets_create.py @@ -27,7 +27,7 @@ def main(): client = CdnManagementClient( credential=DefaultAzureCredential(), - subscription_id="subid", + subscription_id="00000000-0000-0000-0000-000000000000", ) response = client.rule_sets.create( @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/RuleSets_Create.json +# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/RuleSets_Create.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/rule_sets_delete.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/rule_sets_delete.py index 129ba69060cb..e7550e82ce1f 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/rule_sets_delete.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/rule_sets_delete.py @@ -27,7 +27,7 @@ def main(): client = CdnManagementClient( credential=DefaultAzureCredential(), - subscription_id="subid", + subscription_id="00000000-0000-0000-0000-000000000000", ) client.rule_sets.begin_delete( @@ -37,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/RuleSets_Delete.json +# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/RuleSets_Delete.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/rule_sets_get.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/rule_sets_get.py index 4108b7daa08e..03d4b54b7a60 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/rule_sets_get.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/rule_sets_get.py @@ -27,7 +27,7 @@ def main(): client = CdnManagementClient( credential=DefaultAzureCredential(), - subscription_id="subid", + subscription_id="00000000-0000-0000-0000-000000000000", ) response = client.rule_sets.get( @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/RuleSets_Get.json +# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/RuleSets_Get.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/rule_sets_list_by_profile.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/rule_sets_list_by_profile.py index 30b1fd7b2c27..4eb8cf1c1ad2 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/rule_sets_list_by_profile.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/rule_sets_list_by_profile.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -27,7 +28,7 @@ def main(): client = CdnManagementClient( credential=DefaultAzureCredential(), - subscription_id="subid", + subscription_id="00000000-0000-0000-0000-000000000000", ) response = client.rule_sets.list_by_profile( @@ -38,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/RuleSets_ListByProfile.json +# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/RuleSets_ListByProfile.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/rule_sets_list_resource_usage.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/rule_sets_list_resource_usage.py index 310c77ba4f71..a4b180e834ac 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/rule_sets_list_resource_usage.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/rule_sets_list_resource_usage.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -27,7 +28,7 @@ def main(): client = CdnManagementClient( credential=DefaultAzureCredential(), - subscription_id="subid", + subscription_id="00000000-0000-0000-0000-000000000000", ) response = client.rule_sets.list_resource_usage( @@ -39,6 +40,6 @@ def main(): print(item) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/RuleSets_ListResourceUsage.json +# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/RuleSets_ListResourceUsage.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/rules_create.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/rules_create.py index 07e893135dd6..c8aefda93b55 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/rules_create.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/rules_create.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.cdn import CdnManagementClient @@ -29,7 +27,7 @@ def main(): client = CdnManagementClient( credential=DefaultAzureCredential(), - subscription_id="subid", + subscription_id="00000000-0000-0000-0000-000000000000", ) response = client.rules.begin_create( @@ -68,6 +66,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/Rules_Create.json +# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/Rules_Create.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/rules_delete.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/rules_delete.py index bae4e0fabfe8..a6b72b4a3d26 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/rules_delete.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/rules_delete.py @@ -27,7 +27,7 @@ def main(): client = CdnManagementClient( credential=DefaultAzureCredential(), - subscription_id="subid", + subscription_id="00000000-0000-0000-0000-000000000000", ) client.rules.begin_delete( @@ -38,6 +38,6 @@ def main(): ).result() -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/Rules_Delete.json +# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/Rules_Delete.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/rules_get.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/rules_get.py index 2e2505d9f09f..56abf04fb0dc 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/rules_get.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/rules_get.py @@ -27,7 +27,7 @@ def main(): client = CdnManagementClient( credential=DefaultAzureCredential(), - subscription_id="subid", + subscription_id="00000000-0000-0000-0000-000000000000", ) response = client.rules.get( @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/Rules_Get.json +# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/Rules_Get.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/rules_list_by_rule_set.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/rules_list_by_rule_set.py index f096b56e948a..b05afa9a1b12 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/rules_list_by_rule_set.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/rules_list_by_rule_set.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -27,7 +28,7 @@ def main(): client = CdnManagementClient( credential=DefaultAzureCredential(), - subscription_id="subid", + subscription_id="00000000-0000-0000-0000-000000000000", ) response = client.rules.list_by_rule_set( @@ -39,6 +40,6 @@ def main(): print(item) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/Rules_ListByRuleSet.json +# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/Rules_ListByRuleSet.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/rules_update.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/rules_update.py index ab1eb23507e3..0cf34d248f1b 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/rules_update.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/rules_update.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.cdn import CdnManagementClient @@ -29,7 +27,7 @@ def main(): client = CdnManagementClient( credential=DefaultAzureCredential(), - subscription_id="subid", + subscription_id="00000000-0000-0000-0000-000000000000", ) response = client.rules.begin_update( @@ -57,6 +55,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/Rules_Update.json +# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/Rules_Update.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/secrets_create.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/secrets_create.py index ce98279c2883..8eb78497c0a9 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/secrets_create.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/secrets_create.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,8 +7,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.cdn import CdnManagementClient @@ -29,7 +28,7 @@ def main(): client = CdnManagementClient( credential=DefaultAzureCredential(), - subscription_id="subid", + subscription_id="00000000-0000-0000-0000-000000000000", ) response = client.secrets.begin_create( @@ -52,6 +51,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/Secrets_Create.json +# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/Secrets_Create.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/secrets_delete.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/secrets_delete.py index 247d04c46c71..ada36628b632 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/secrets_delete.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/secrets_delete.py @@ -27,7 +27,7 @@ def main(): client = CdnManagementClient( credential=DefaultAzureCredential(), - subscription_id="subid", + subscription_id="00000000-0000-0000-0000-000000000000", ) client.secrets.begin_delete( @@ -37,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/Secrets_Delete.json +# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/Secrets_Delete.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/secrets_get.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/secrets_get.py index 18e6df120ff9..937b8354f6a7 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/secrets_get.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/secrets_get.py @@ -27,7 +27,7 @@ def main(): client = CdnManagementClient( credential=DefaultAzureCredential(), - subscription_id="subid", + subscription_id="00000000-0000-0000-0000-000000000000", ) response = client.secrets.get( @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/Secrets_Get.json +# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/Secrets_Get.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/secrets_list_by_profile.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/secrets_list_by_profile.py index a23988e572f4..177e91c8e916 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/secrets_list_by_profile.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/secrets_list_by_profile.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -27,7 +28,7 @@ def main(): client = CdnManagementClient( credential=DefaultAzureCredential(), - subscription_id="subid", + subscription_id="00000000-0000-0000-0000-000000000000", ) response = client.secrets.list_by_profile( @@ -38,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/Secrets_ListByProfile.json +# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/Secrets_ListByProfile.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/security_policies_create.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/security_policies_create.py index 007ffa21a147..7a8aa5bc3f29 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/security_policies_create.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/security_policies_create.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,8 +7,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.cdn import CdnManagementClient @@ -29,7 +28,7 @@ def main(): client = CdnManagementClient( credential=DefaultAzureCredential(), - subscription_id="subid", + subscription_id="00000000-0000-0000-0000-000000000000", ) response = client.security_policies.begin_create( @@ -63,6 +62,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/SecurityPolicies_Create.json +# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/SecurityPolicies_Create.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/security_policies_delete.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/security_policies_delete.py index 53a393cf71b8..e7ff48ba7e67 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/security_policies_delete.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/security_policies_delete.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -27,7 +28,7 @@ def main(): client = CdnManagementClient( credential=DefaultAzureCredential(), - subscription_id="subid", + subscription_id="00000000-0000-0000-0000-000000000000", ) client.security_policies.begin_delete( @@ -37,6 +38,6 @@ def main(): ).result() -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/SecurityPolicies_Delete.json +# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/SecurityPolicies_Delete.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/security_policies_get.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/security_policies_get.py index 9ffd420f9622..c0e8d5ccd54b 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/security_policies_get.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/security_policies_get.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -27,7 +28,7 @@ def main(): client = CdnManagementClient( credential=DefaultAzureCredential(), - subscription_id="subid", + subscription_id="00000000-0000-0000-0000-000000000000", ) response = client.security_policies.get( @@ -38,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/SecurityPolicies_Get.json +# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/SecurityPolicies_Get.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/security_policies_list_by_profile.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/security_policies_list_by_profile.py index a73aab33dff3..0ba36f8d7ec6 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/security_policies_list_by_profile.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/security_policies_list_by_profile.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -27,7 +28,7 @@ def main(): client = CdnManagementClient( credential=DefaultAzureCredential(), - subscription_id="subid", + subscription_id="00000000-0000-0000-0000-000000000000", ) response = client.security_policies.list_by_profile( @@ -38,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/SecurityPolicies_ListByProfile.json +# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/SecurityPolicies_ListByProfile.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/security_policies_patch.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/security_policies_patch.py index 9bc7789afd81..f8f3f72f41c5 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/security_policies_patch.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/security_policies_patch.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,8 +7,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.cdn import CdnManagementClient @@ -29,7 +28,7 @@ def main(): client = CdnManagementClient( credential=DefaultAzureCredential(), - subscription_id="subid", + subscription_id="00000000-0000-0000-0000-000000000000", ) response = client.security_policies.begin_patch( @@ -63,6 +62,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/SecurityPolicies_Patch.json +# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/SecurityPolicies_Patch.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/validate_probe.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/validate_probe.py index eb0e8b8c8ad5..aa3d1ac6047c 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/validate_probe.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/validate_probe.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.cdn import CdnManagementClient @@ -29,7 +27,7 @@ def main(): client = CdnManagementClient( credential=DefaultAzureCredential(), - subscription_id="subid", + subscription_id="00000000-0000-0000-0000-000000000000", ) response = client.validate_probe( @@ -38,6 +36,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/ValidateProbe.json +# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/ValidateProbe.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/waf_list_managed_rule_sets.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/waf_list_managed_rule_sets.py index 8d0ee8e8fcb0..9a39a5d28e5a 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/waf_list_managed_rule_sets.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/waf_list_managed_rule_sets.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -27,7 +28,7 @@ def main(): client = CdnManagementClient( credential=DefaultAzureCredential(), - subscription_id="subid", + subscription_id="00000000-0000-0000-0000-000000000000", ) response = client.managed_rule_sets.list() @@ -35,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/WafListManagedRuleSets.json +# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/WafListManagedRuleSets.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/waf_list_policies.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/waf_list_policies.py index 94470f323fe4..5292d6e933c9 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/waf_list_policies.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/waf_list_policies.py @@ -27,7 +27,7 @@ def main(): client = CdnManagementClient( credential=DefaultAzureCredential(), - subscription_id="subid", + subscription_id="00000000-0000-0000-0000-000000000000", ) response = client.policies.list( @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/WafListPolicies.json +# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/WafListPolicies.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/waf_patch_policy.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/waf_patch_policy.py index 0478923b8574..ba96a0c55f43 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/waf_patch_policy.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/waf_patch_policy.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.cdn import CdnManagementClient @@ -29,7 +27,7 @@ def main(): client = CdnManagementClient( credential=DefaultAzureCredential(), - subscription_id="subid", + subscription_id="00000000-0000-0000-0000-000000000000", ) response = client.policies.begin_update( @@ -40,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/WafPatchPolicy.json +# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/WafPatchPolicy.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/waf_policy_create_or_update.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/waf_policy_create_or_update.py index 63b8ee7c267d..8c9bd2a420c4 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/waf_policy_create_or_update.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/waf_policy_create_or_update.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,8 +7,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.cdn import CdnManagementClient @@ -29,7 +28,7 @@ def main(): client = CdnManagementClient( credential=DefaultAzureCredential(), - subscription_id="subid", + subscription_id="00000000-0000-0000-0000-000000000000", ) response = client.policies.begin_create_or_update( @@ -125,6 +124,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/WafPolicyCreateOrUpdate.json +# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/WafPolicyCreateOrUpdate.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/waf_policy_delete.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/waf_policy_delete.py index c0b10e7d8496..16eda5ae27a7 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/waf_policy_delete.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/waf_policy_delete.py @@ -27,7 +27,7 @@ def main(): client = CdnManagementClient( credential=DefaultAzureCredential(), - subscription_id="subid", + subscription_id="00000000-0000-0000-0000-000000000000", ) client.policies.delete( @@ -36,6 +36,6 @@ def main(): ) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/WafPolicyDelete.json +# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/WafPolicyDelete.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/waf_policy_get.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/waf_policy_get.py index eecc00b102f2..d0ff173f8b30 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/waf_policy_get.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/waf_policy_get.py @@ -27,7 +27,7 @@ def main(): client = CdnManagementClient( credential=DefaultAzureCredential(), - subscription_id="subid", + subscription_id="00000000-0000-0000-0000-000000000000", ) response = client.policies.get( @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/WafPolicyGet.json +# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/WafPolicyGet.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_tests/conftest.py b/sdk/cdn/azure-mgmt-cdn/generated_tests/conftest.py new file mode 100644 index 000000000000..02cbe090acc4 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/generated_tests/conftest.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import os +import pytest +from dotenv import load_dotenv +from devtools_testutils import ( + test_proxy, + add_general_regex_sanitizer, + add_body_key_sanitizer, + add_header_regex_sanitizer, +) + +load_dotenv() + + +# For security, please avoid record sensitive identity information in recordings +@pytest.fixture(scope="session", autouse=True) +def add_sanitizers(test_proxy): + cdnmanagement_subscription_id = os.environ.get("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") + cdnmanagement_tenant_id = os.environ.get("AZURE_TENANT_ID", "00000000-0000-0000-0000-000000000000") + cdnmanagement_client_id = os.environ.get("AZURE_CLIENT_ID", "00000000-0000-0000-0000-000000000000") + cdnmanagement_client_secret = os.environ.get("AZURE_CLIENT_SECRET", "00000000-0000-0000-0000-000000000000") + add_general_regex_sanitizer(regex=cdnmanagement_subscription_id, value="00000000-0000-0000-0000-000000000000") + add_general_regex_sanitizer(regex=cdnmanagement_tenant_id, value="00000000-0000-0000-0000-000000000000") + add_general_regex_sanitizer(regex=cdnmanagement_client_id, value="00000000-0000-0000-0000-000000000000") + add_general_regex_sanitizer(regex=cdnmanagement_client_secret, value="00000000-0000-0000-0000-000000000000") + + add_header_regex_sanitizer(key="Set-Cookie", value="[set-cookie;]") + add_header_regex_sanitizer(key="Cookie", value="cookie;") + add_body_key_sanitizer(json_path="$..access_token", value="access_token") diff --git a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management.py b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management.py new file mode 100644 index 000000000000..789925061cb5 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management.py @@ -0,0 +1,68 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.cdn import CdnManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestCdnManagement(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(CdnManagementClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_check_endpoint_name_availability(self, resource_group): + response = self.client.check_endpoint_name_availability( + resource_group_name=resource_group.name, + check_endpoint_name_availability_input={ + "name": "str", + "type": "str", + "autoGeneratedDomainNameLabelScope": "str", + }, + api_version="2025-06-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_check_name_availability(self, resource_group): + response = self.client.check_name_availability( + check_name_availability_input={"name": "str", "type": "str"}, + api_version="2025-06-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_check_name_availability_with_subscription(self, resource_group): + response = self.client.check_name_availability_with_subscription( + check_name_availability_input={"name": "str", "type": "str"}, + api_version="2025-06-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_validate_probe(self, resource_group): + response = self.client.validate_probe( + validate_probe_input={"probeURL": "str"}, + api_version="2025-06-01", + ) + + # please add some check logic here by yourself + # ... diff --git a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_afd_custom_domains_operations.py b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_afd_custom_domains_operations.py new file mode 100644 index 000000000000..3c14ccc638b6 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_afd_custom_domains_operations.py @@ -0,0 +1,137 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.cdn import CdnManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestCdnManagementAFDCustomDomainsOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(CdnManagementClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_afd_custom_domains_list_by_profile(self, resource_group): + response = self.client.afd_custom_domains.list_by_profile( + resource_group_name=resource_group.name, + profile_name="str", + api_version="2025-06-01", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_afd_custom_domains_get(self, resource_group): + response = self.client.afd_custom_domains.get( + resource_group_name=resource_group.name, + profile_name="str", + custom_domain_name="str", + api_version="2025-06-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_afd_custom_domains_begin_create(self, resource_group): + response = self.client.afd_custom_domains.begin_create( + resource_group_name=resource_group.name, + profile_name="str", + custom_domain_name="str", + custom_domain={ + "azureDnsZone": {"id": "str"}, + "deploymentStatus": "str", + "domainValidationState": "str", + "extendedProperties": {"str": "str"}, + "hostName": "str", + "id": "str", + "name": "str", + "preValidatedCustomDomainResourceId": {"id": "str"}, + "profileName": "str", + "provisioningState": "str", + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "tlsSettings": { + "certificateType": "str", + "cipherSuiteSetType": "str", + "customizedCipherSuiteSet": {"cipherSuiteSetForTls12": ["str"], "cipherSuiteSetForTls13": ["str"]}, + "minimumTlsVersion": "str", + "secret": {"id": "str"}, + }, + "type": "str", + "validationProperties": {"expirationDate": "str", "validationToken": "str"}, + }, + api_version="2025-06-01", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_afd_custom_domains_begin_update(self, resource_group): + response = self.client.afd_custom_domains.begin_update( + resource_group_name=resource_group.name, + profile_name="str", + custom_domain_name="str", + custom_domain_update_properties={ + "azureDnsZone": {"id": "str"}, + "preValidatedCustomDomainResourceId": {"id": "str"}, + "profileName": "str", + "tlsSettings": { + "certificateType": "str", + "cipherSuiteSetType": "str", + "customizedCipherSuiteSet": {"cipherSuiteSetForTls12": ["str"], "cipherSuiteSetForTls13": ["str"]}, + "minimumTlsVersion": "str", + "secret": {"id": "str"}, + }, + }, + api_version="2025-06-01", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_afd_custom_domains_begin_delete(self, resource_group): + response = self.client.afd_custom_domains.begin_delete( + resource_group_name=resource_group.name, + profile_name="str", + custom_domain_name="str", + api_version="2025-06-01", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_afd_custom_domains_begin_refresh_validation_token(self, resource_group): + response = self.client.afd_custom_domains.begin_refresh_validation_token( + resource_group_name=resource_group.name, + profile_name="str", + custom_domain_name="str", + api_version="2025-06-01", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... diff --git a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_afd_custom_domains_operations_async.py b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_afd_custom_domains_operations_async.py new file mode 100644 index 000000000000..49a329d1118e --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_afd_custom_domains_operations_async.py @@ -0,0 +1,152 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.cdn.aio import CdnManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestCdnManagementAFDCustomDomainsOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(CdnManagementClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_afd_custom_domains_list_by_profile(self, resource_group): + response = self.client.afd_custom_domains.list_by_profile( + resource_group_name=resource_group.name, + profile_name="str", + api_version="2025-06-01", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_afd_custom_domains_get(self, resource_group): + response = await self.client.afd_custom_domains.get( + resource_group_name=resource_group.name, + profile_name="str", + custom_domain_name="str", + api_version="2025-06-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_afd_custom_domains_begin_create(self, resource_group): + response = await ( + await self.client.afd_custom_domains.begin_create( + resource_group_name=resource_group.name, + profile_name="str", + custom_domain_name="str", + custom_domain={ + "azureDnsZone": {"id": "str"}, + "deploymentStatus": "str", + "domainValidationState": "str", + "extendedProperties": {"str": "str"}, + "hostName": "str", + "id": "str", + "name": "str", + "preValidatedCustomDomainResourceId": {"id": "str"}, + "profileName": "str", + "provisioningState": "str", + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "tlsSettings": { + "certificateType": "str", + "cipherSuiteSetType": "str", + "customizedCipherSuiteSet": { + "cipherSuiteSetForTls12": ["str"], + "cipherSuiteSetForTls13": ["str"], + }, + "minimumTlsVersion": "str", + "secret": {"id": "str"}, + }, + "type": "str", + "validationProperties": {"expirationDate": "str", "validationToken": "str"}, + }, + api_version="2025-06-01", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_afd_custom_domains_begin_update(self, resource_group): + response = await ( + await self.client.afd_custom_domains.begin_update( + resource_group_name=resource_group.name, + profile_name="str", + custom_domain_name="str", + custom_domain_update_properties={ + "azureDnsZone": {"id": "str"}, + "preValidatedCustomDomainResourceId": {"id": "str"}, + "profileName": "str", + "tlsSettings": { + "certificateType": "str", + "cipherSuiteSetType": "str", + "customizedCipherSuiteSet": { + "cipherSuiteSetForTls12": ["str"], + "cipherSuiteSetForTls13": ["str"], + }, + "minimumTlsVersion": "str", + "secret": {"id": "str"}, + }, + }, + api_version="2025-06-01", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_afd_custom_domains_begin_delete(self, resource_group): + response = await ( + await self.client.afd_custom_domains.begin_delete( + resource_group_name=resource_group.name, + profile_name="str", + custom_domain_name="str", + api_version="2025-06-01", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_afd_custom_domains_begin_refresh_validation_token(self, resource_group): + response = await ( + await self.client.afd_custom_domains.begin_refresh_validation_token( + resource_group_name=resource_group.name, + profile_name="str", + custom_domain_name="str", + api_version="2025-06-01", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... diff --git a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_afd_endpoints_operations.py b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_afd_endpoints_operations.py new file mode 100644 index 000000000000..e1a6af0617bc --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_afd_endpoints_operations.py @@ -0,0 +1,146 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.cdn import CdnManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestCdnManagementAFDEndpointsOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(CdnManagementClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_afd_endpoints_list_by_profile(self, resource_group): + response = self.client.afd_endpoints.list_by_profile( + resource_group_name=resource_group.name, + profile_name="str", + api_version="2025-06-01", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_afd_endpoints_get(self, resource_group): + response = self.client.afd_endpoints.get( + resource_group_name=resource_group.name, + profile_name="str", + endpoint_name="str", + api_version="2025-06-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_afd_endpoints_begin_create(self, resource_group): + response = self.client.afd_endpoints.begin_create( + resource_group_name=resource_group.name, + profile_name="str", + endpoint_name="str", + endpoint={ + "location": "str", + "autoGeneratedDomainNameLabelScope": "str", + "deploymentStatus": "str", + "enabledState": "str", + "hostName": "str", + "id": "str", + "name": "str", + "profileName": "str", + "provisioningState": "str", + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "tags": {"str": "str"}, + "type": "str", + }, + api_version="2025-06-01", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_afd_endpoints_begin_update(self, resource_group): + response = self.client.afd_endpoints.begin_update( + resource_group_name=resource_group.name, + profile_name="str", + endpoint_name="str", + endpoint_update_properties={"enabledState": "str", "profileName": "str", "tags": {"str": "str"}}, + api_version="2025-06-01", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_afd_endpoints_begin_delete(self, resource_group): + response = self.client.afd_endpoints.begin_delete( + resource_group_name=resource_group.name, + profile_name="str", + endpoint_name="str", + api_version="2025-06-01", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_afd_endpoints_begin_purge_content(self, resource_group): + response = self.client.afd_endpoints.begin_purge_content( + resource_group_name=resource_group.name, + profile_name="str", + endpoint_name="str", + contents={"contentPaths": ["str"], "domains": ["str"]}, + api_version="2025-06-01", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_afd_endpoints_list_resource_usage(self, resource_group): + response = self.client.afd_endpoints.list_resource_usage( + resource_group_name=resource_group.name, + profile_name="str", + endpoint_name="str", + api_version="2025-06-01", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_afd_endpoints_validate_custom_domain(self, resource_group): + response = self.client.afd_endpoints.validate_custom_domain( + resource_group_name=resource_group.name, + profile_name="str", + endpoint_name="str", + custom_domain_properties={"hostName": "str"}, + api_version="2025-06-01", + ) + + # please add some check logic here by yourself + # ... diff --git a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_afd_endpoints_operations_async.py b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_afd_endpoints_operations_async.py new file mode 100644 index 000000000000..0a3c18c56d6e --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_afd_endpoints_operations_async.py @@ -0,0 +1,155 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.cdn.aio import CdnManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestCdnManagementAFDEndpointsOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(CdnManagementClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_afd_endpoints_list_by_profile(self, resource_group): + response = self.client.afd_endpoints.list_by_profile( + resource_group_name=resource_group.name, + profile_name="str", + api_version="2025-06-01", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_afd_endpoints_get(self, resource_group): + response = await self.client.afd_endpoints.get( + resource_group_name=resource_group.name, + profile_name="str", + endpoint_name="str", + api_version="2025-06-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_afd_endpoints_begin_create(self, resource_group): + response = await ( + await self.client.afd_endpoints.begin_create( + resource_group_name=resource_group.name, + profile_name="str", + endpoint_name="str", + endpoint={ + "location": "str", + "autoGeneratedDomainNameLabelScope": "str", + "deploymentStatus": "str", + "enabledState": "str", + "hostName": "str", + "id": "str", + "name": "str", + "profileName": "str", + "provisioningState": "str", + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "tags": {"str": "str"}, + "type": "str", + }, + api_version="2025-06-01", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_afd_endpoints_begin_update(self, resource_group): + response = await ( + await self.client.afd_endpoints.begin_update( + resource_group_name=resource_group.name, + profile_name="str", + endpoint_name="str", + endpoint_update_properties={"enabledState": "str", "profileName": "str", "tags": {"str": "str"}}, + api_version="2025-06-01", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_afd_endpoints_begin_delete(self, resource_group): + response = await ( + await self.client.afd_endpoints.begin_delete( + resource_group_name=resource_group.name, + profile_name="str", + endpoint_name="str", + api_version="2025-06-01", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_afd_endpoints_begin_purge_content(self, resource_group): + response = await ( + await self.client.afd_endpoints.begin_purge_content( + resource_group_name=resource_group.name, + profile_name="str", + endpoint_name="str", + contents={"contentPaths": ["str"], "domains": ["str"]}, + api_version="2025-06-01", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_afd_endpoints_list_resource_usage(self, resource_group): + response = self.client.afd_endpoints.list_resource_usage( + resource_group_name=resource_group.name, + profile_name="str", + endpoint_name="str", + api_version="2025-06-01", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_afd_endpoints_validate_custom_domain(self, resource_group): + response = await self.client.afd_endpoints.validate_custom_domain( + resource_group_name=resource_group.name, + profile_name="str", + endpoint_name="str", + custom_domain_properties={"hostName": "str"}, + api_version="2025-06-01", + ) + + # please add some check logic here by yourself + # ... diff --git a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_afd_origin_groups_operations.py b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_afd_origin_groups_operations.py new file mode 100644 index 000000000000..95cb08f23f3e --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_afd_origin_groups_operations.py @@ -0,0 +1,143 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.cdn import CdnManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestCdnManagementAFDOriginGroupsOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(CdnManagementClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_afd_origin_groups_list_by_profile(self, resource_group): + response = self.client.afd_origin_groups.list_by_profile( + resource_group_name=resource_group.name, + profile_name="str", + api_version="2025-06-01", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_afd_origin_groups_get(self, resource_group): + response = self.client.afd_origin_groups.get( + resource_group_name=resource_group.name, + profile_name="str", + origin_group_name="str", + api_version="2025-06-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_afd_origin_groups_begin_create(self, resource_group): + response = self.client.afd_origin_groups.begin_create( + resource_group_name=resource_group.name, + profile_name="str", + origin_group_name="str", + origin_group={ + "authentication": {"scope": "str", "type": "str", "userAssignedIdentity": {"id": "str"}}, + "deploymentStatus": "str", + "healthProbeSettings": { + "probeIntervalInSeconds": 0, + "probePath": "str", + "probeProtocol": "str", + "probeRequestType": "str", + }, + "id": "str", + "loadBalancingSettings": { + "additionalLatencyInMilliseconds": 0, + "sampleSize": 0, + "successfulSamplesRequired": 0, + }, + "name": "str", + "profileName": "str", + "provisioningState": "str", + "sessionAffinityState": "str", + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "trafficRestorationTimeToHealedOrNewEndpointsInMinutes": 0, + "type": "str", + }, + api_version="2025-06-01", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_afd_origin_groups_begin_update(self, resource_group): + response = self.client.afd_origin_groups.begin_update( + resource_group_name=resource_group.name, + profile_name="str", + origin_group_name="str", + origin_group_update_properties={ + "authentication": {"scope": "str", "type": "str", "userAssignedIdentity": {"id": "str"}}, + "healthProbeSettings": { + "probeIntervalInSeconds": 0, + "probePath": "str", + "probeProtocol": "str", + "probeRequestType": "str", + }, + "loadBalancingSettings": { + "additionalLatencyInMilliseconds": 0, + "sampleSize": 0, + "successfulSamplesRequired": 0, + }, + "profileName": "str", + "sessionAffinityState": "str", + "trafficRestorationTimeToHealedOrNewEndpointsInMinutes": 0, + }, + api_version="2025-06-01", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_afd_origin_groups_begin_delete(self, resource_group): + response = self.client.afd_origin_groups.begin_delete( + resource_group_name=resource_group.name, + profile_name="str", + origin_group_name="str", + api_version="2025-06-01", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_afd_origin_groups_list_resource_usage(self, resource_group): + response = self.client.afd_origin_groups.list_resource_usage( + resource_group_name=resource_group.name, + profile_name="str", + origin_group_name="str", + api_version="2025-06-01", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_afd_origin_groups_operations_async.py b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_afd_origin_groups_operations_async.py new file mode 100644 index 000000000000..c9aeadbb09ae --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_afd_origin_groups_operations_async.py @@ -0,0 +1,150 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.cdn.aio import CdnManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestCdnManagementAFDOriginGroupsOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(CdnManagementClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_afd_origin_groups_list_by_profile(self, resource_group): + response = self.client.afd_origin_groups.list_by_profile( + resource_group_name=resource_group.name, + profile_name="str", + api_version="2025-06-01", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_afd_origin_groups_get(self, resource_group): + response = await self.client.afd_origin_groups.get( + resource_group_name=resource_group.name, + profile_name="str", + origin_group_name="str", + api_version="2025-06-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_afd_origin_groups_begin_create(self, resource_group): + response = await ( + await self.client.afd_origin_groups.begin_create( + resource_group_name=resource_group.name, + profile_name="str", + origin_group_name="str", + origin_group={ + "authentication": {"scope": "str", "type": "str", "userAssignedIdentity": {"id": "str"}}, + "deploymentStatus": "str", + "healthProbeSettings": { + "probeIntervalInSeconds": 0, + "probePath": "str", + "probeProtocol": "str", + "probeRequestType": "str", + }, + "id": "str", + "loadBalancingSettings": { + "additionalLatencyInMilliseconds": 0, + "sampleSize": 0, + "successfulSamplesRequired": 0, + }, + "name": "str", + "profileName": "str", + "provisioningState": "str", + "sessionAffinityState": "str", + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "trafficRestorationTimeToHealedOrNewEndpointsInMinutes": 0, + "type": "str", + }, + api_version="2025-06-01", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_afd_origin_groups_begin_update(self, resource_group): + response = await ( + await self.client.afd_origin_groups.begin_update( + resource_group_name=resource_group.name, + profile_name="str", + origin_group_name="str", + origin_group_update_properties={ + "authentication": {"scope": "str", "type": "str", "userAssignedIdentity": {"id": "str"}}, + "healthProbeSettings": { + "probeIntervalInSeconds": 0, + "probePath": "str", + "probeProtocol": "str", + "probeRequestType": "str", + }, + "loadBalancingSettings": { + "additionalLatencyInMilliseconds": 0, + "sampleSize": 0, + "successfulSamplesRequired": 0, + }, + "profileName": "str", + "sessionAffinityState": "str", + "trafficRestorationTimeToHealedOrNewEndpointsInMinutes": 0, + }, + api_version="2025-06-01", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_afd_origin_groups_begin_delete(self, resource_group): + response = await ( + await self.client.afd_origin_groups.begin_delete( + resource_group_name=resource_group.name, + profile_name="str", + origin_group_name="str", + api_version="2025-06-01", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_afd_origin_groups_list_resource_usage(self, resource_group): + response = self.client.afd_origin_groups.list_resource_usage( + resource_group_name=resource_group.name, + profile_name="str", + origin_group_name="str", + api_version="2025-06-01", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_afd_origins_operations.py b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_afd_origins_operations.py new file mode 100644 index 000000000000..2ea5f9735867 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_afd_origins_operations.py @@ -0,0 +1,139 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.cdn import CdnManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestCdnManagementAFDOriginsOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(CdnManagementClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_afd_origins_list_by_origin_group(self, resource_group): + response = self.client.afd_origins.list_by_origin_group( + resource_group_name=resource_group.name, + profile_name="str", + origin_group_name="str", + api_version="2025-06-01", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_afd_origins_get(self, resource_group): + response = self.client.afd_origins.get( + resource_group_name=resource_group.name, + profile_name="str", + origin_group_name="str", + origin_name="str", + api_version="2025-06-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_afd_origins_begin_create(self, resource_group): + response = self.client.afd_origins.begin_create( + resource_group_name=resource_group.name, + profile_name="str", + origin_group_name="str", + origin_name="str", + origin={ + "azureOrigin": {"id": "str"}, + "deploymentStatus": "str", + "enabledState": "str", + "enforceCertificateNameCheck": True, + "hostName": "str", + "httpPort": 80, + "httpsPort": 443, + "id": "str", + "name": "str", + "originGroupName": "str", + "originHostHeader": "str", + "priority": 0, + "provisioningState": "str", + "sharedPrivateLinkResource": { + "groupId": "str", + "privateLink": {"id": "str"}, + "privateLinkLocation": "str", + "requestMessage": "str", + "status": "str", + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + "weight": 0, + }, + api_version="2025-06-01", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_afd_origins_begin_update(self, resource_group): + response = self.client.afd_origins.begin_update( + resource_group_name=resource_group.name, + profile_name="str", + origin_group_name="str", + origin_name="str", + origin_update_properties={ + "azureOrigin": {"id": "str"}, + "enabledState": "str", + "enforceCertificateNameCheck": True, + "hostName": "str", + "httpPort": 80, + "httpsPort": 443, + "originGroupName": "str", + "originHostHeader": "str", + "priority": 0, + "sharedPrivateLinkResource": { + "groupId": "str", + "privateLink": {"id": "str"}, + "privateLinkLocation": "str", + "requestMessage": "str", + "status": "str", + }, + "weight": 0, + }, + api_version="2025-06-01", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_afd_origins_begin_delete(self, resource_group): + response = self.client.afd_origins.begin_delete( + resource_group_name=resource_group.name, + profile_name="str", + origin_group_name="str", + origin_name="str", + api_version="2025-06-01", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... diff --git a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_afd_origins_operations_async.py b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_afd_origins_operations_async.py new file mode 100644 index 000000000000..4d63be3edeee --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_afd_origins_operations_async.py @@ -0,0 +1,146 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.cdn.aio import CdnManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestCdnManagementAFDOriginsOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(CdnManagementClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_afd_origins_list_by_origin_group(self, resource_group): + response = self.client.afd_origins.list_by_origin_group( + resource_group_name=resource_group.name, + profile_name="str", + origin_group_name="str", + api_version="2025-06-01", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_afd_origins_get(self, resource_group): + response = await self.client.afd_origins.get( + resource_group_name=resource_group.name, + profile_name="str", + origin_group_name="str", + origin_name="str", + api_version="2025-06-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_afd_origins_begin_create(self, resource_group): + response = await ( + await self.client.afd_origins.begin_create( + resource_group_name=resource_group.name, + profile_name="str", + origin_group_name="str", + origin_name="str", + origin={ + "azureOrigin": {"id": "str"}, + "deploymentStatus": "str", + "enabledState": "str", + "enforceCertificateNameCheck": True, + "hostName": "str", + "httpPort": 80, + "httpsPort": 443, + "id": "str", + "name": "str", + "originGroupName": "str", + "originHostHeader": "str", + "priority": 0, + "provisioningState": "str", + "sharedPrivateLinkResource": { + "groupId": "str", + "privateLink": {"id": "str"}, + "privateLinkLocation": "str", + "requestMessage": "str", + "status": "str", + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + "weight": 0, + }, + api_version="2025-06-01", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_afd_origins_begin_update(self, resource_group): + response = await ( + await self.client.afd_origins.begin_update( + resource_group_name=resource_group.name, + profile_name="str", + origin_group_name="str", + origin_name="str", + origin_update_properties={ + "azureOrigin": {"id": "str"}, + "enabledState": "str", + "enforceCertificateNameCheck": True, + "hostName": "str", + "httpPort": 80, + "httpsPort": 443, + "originGroupName": "str", + "originHostHeader": "str", + "priority": 0, + "sharedPrivateLinkResource": { + "groupId": "str", + "privateLink": {"id": "str"}, + "privateLinkLocation": "str", + "requestMessage": "str", + "status": "str", + }, + "weight": 0, + }, + api_version="2025-06-01", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_afd_origins_begin_delete(self, resource_group): + response = await ( + await self.client.afd_origins.begin_delete( + resource_group_name=resource_group.name, + profile_name="str", + origin_group_name="str", + origin_name="str", + api_version="2025-06-01", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... diff --git a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_afd_profiles_operations.py b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_afd_profiles_operations.py new file mode 100644 index 000000000000..caac8e80ef5f --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_afd_profiles_operations.py @@ -0,0 +1,89 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.cdn import CdnManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestCdnManagementAFDProfilesOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(CdnManagementClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_afd_profiles_check_endpoint_name_availability(self, resource_group): + response = self.client.afd_profiles.check_endpoint_name_availability( + resource_group_name=resource_group.name, + profile_name="str", + check_endpoint_name_availability_input={ + "name": "str", + "type": "str", + "autoGeneratedDomainNameLabelScope": "str", + }, + api_version="2025-06-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_afd_profiles_list_resource_usage(self, resource_group): + response = self.client.afd_profiles.list_resource_usage( + resource_group_name=resource_group.name, + profile_name="str", + api_version="2025-06-01", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_afd_profiles_check_host_name_availability(self, resource_group): + response = self.client.afd_profiles.check_host_name_availability( + resource_group_name=resource_group.name, + profile_name="str", + check_host_name_availability_input={"hostName": "str"}, + api_version="2025-06-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_afd_profiles_validate_secret(self, resource_group): + response = self.client.afd_profiles.validate_secret( + resource_group_name=resource_group.name, + profile_name="str", + validate_secret_input={"secretSource": {"id": "str"}, "secretType": "str", "secretVersion": "str"}, + api_version="2025-06-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_afd_profiles_begin_upgrade(self, resource_group): + response = self.client.afd_profiles.begin_upgrade( + resource_group_name=resource_group.name, + profile_name="str", + profile_upgrade_parameters={ + "wafMappingList": [{"changeToWafPolicy": {"id": "str"}, "securityPolicyName": "str"}] + }, + api_version="2025-06-01", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... diff --git a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_afd_profiles_operations_async.py b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_afd_profiles_operations_async.py new file mode 100644 index 000000000000..69f58b48e81e --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_afd_profiles_operations_async.py @@ -0,0 +1,92 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.cdn.aio import CdnManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestCdnManagementAFDProfilesOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(CdnManagementClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_afd_profiles_check_endpoint_name_availability(self, resource_group): + response = await self.client.afd_profiles.check_endpoint_name_availability( + resource_group_name=resource_group.name, + profile_name="str", + check_endpoint_name_availability_input={ + "name": "str", + "type": "str", + "autoGeneratedDomainNameLabelScope": "str", + }, + api_version="2025-06-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_afd_profiles_list_resource_usage(self, resource_group): + response = self.client.afd_profiles.list_resource_usage( + resource_group_name=resource_group.name, + profile_name="str", + api_version="2025-06-01", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_afd_profiles_check_host_name_availability(self, resource_group): + response = await self.client.afd_profiles.check_host_name_availability( + resource_group_name=resource_group.name, + profile_name="str", + check_host_name_availability_input={"hostName": "str"}, + api_version="2025-06-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_afd_profiles_validate_secret(self, resource_group): + response = await self.client.afd_profiles.validate_secret( + resource_group_name=resource_group.name, + profile_name="str", + validate_secret_input={"secretSource": {"id": "str"}, "secretType": "str", "secretVersion": "str"}, + api_version="2025-06-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_afd_profiles_begin_upgrade(self, resource_group): + response = await ( + await self.client.afd_profiles.begin_upgrade( + resource_group_name=resource_group.name, + profile_name="str", + profile_upgrade_parameters={ + "wafMappingList": [{"changeToWafPolicy": {"id": "str"}, "securityPolicyName": "str"}] + }, + api_version="2025-06-01", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... diff --git a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_async.py b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_async.py new file mode 100644 index 000000000000..5bd1f10ed667 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_async.py @@ -0,0 +1,69 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.cdn.aio import CdnManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestCdnManagementAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(CdnManagementClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_check_endpoint_name_availability(self, resource_group): + response = await self.client.check_endpoint_name_availability( + resource_group_name=resource_group.name, + check_endpoint_name_availability_input={ + "name": "str", + "type": "str", + "autoGeneratedDomainNameLabelScope": "str", + }, + api_version="2025-06-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_check_name_availability(self, resource_group): + response = await self.client.check_name_availability( + check_name_availability_input={"name": "str", "type": "str"}, + api_version="2025-06-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_check_name_availability_with_subscription(self, resource_group): + response = await self.client.check_name_availability_with_subscription( + check_name_availability_input={"name": "str", "type": "str"}, + api_version="2025-06-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_validate_probe(self, resource_group): + response = await self.client.validate_probe( + validate_probe_input={"probeURL": "str"}, + api_version="2025-06-01", + ) + + # please add some check logic here by yourself + # ... diff --git a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_custom_domains_operations.py b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_custom_domains_operations.py new file mode 100644 index 000000000000..e80b7ba3055f --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_custom_domains_operations.py @@ -0,0 +1,103 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.cdn import CdnManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestCdnManagementCustomDomainsOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(CdnManagementClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_custom_domains_list_by_endpoint(self, resource_group): + response = self.client.custom_domains.list_by_endpoint( + resource_group_name=resource_group.name, + profile_name="str", + endpoint_name="str", + api_version="2025-06-01", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_custom_domains_get(self, resource_group): + response = self.client.custom_domains.get( + resource_group_name=resource_group.name, + profile_name="str", + endpoint_name="str", + custom_domain_name="str", + api_version="2025-06-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_custom_domains_begin_create(self, resource_group): + response = self.client.custom_domains.begin_create( + resource_group_name=resource_group.name, + profile_name="str", + endpoint_name="str", + custom_domain_name="str", + custom_domain_properties={"hostName": "str"}, + api_version="2025-06-01", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_custom_domains_begin_delete(self, resource_group): + response = self.client.custom_domains.begin_delete( + resource_group_name=resource_group.name, + profile_name="str", + endpoint_name="str", + custom_domain_name="str", + api_version="2025-06-01", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_custom_domains_begin_disable_custom_https(self, resource_group): + response = self.client.custom_domains.begin_disable_custom_https( + resource_group_name=resource_group.name, + profile_name="str", + endpoint_name="str", + custom_domain_name="str", + api_version="2025-06-01", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_custom_domains_begin_enable_custom_https(self, resource_group): + response = self.client.custom_domains.begin_enable_custom_https( + resource_group_name=resource_group.name, + profile_name="str", + endpoint_name="str", + custom_domain_name="str", + api_version="2025-06-01", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... diff --git a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_custom_domains_operations_async.py b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_custom_domains_operations_async.py new file mode 100644 index 000000000000..4498aae77c81 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_custom_domains_operations_async.py @@ -0,0 +1,112 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.cdn.aio import CdnManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestCdnManagementCustomDomainsOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(CdnManagementClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_custom_domains_list_by_endpoint(self, resource_group): + response = self.client.custom_domains.list_by_endpoint( + resource_group_name=resource_group.name, + profile_name="str", + endpoint_name="str", + api_version="2025-06-01", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_custom_domains_get(self, resource_group): + response = await self.client.custom_domains.get( + resource_group_name=resource_group.name, + profile_name="str", + endpoint_name="str", + custom_domain_name="str", + api_version="2025-06-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_custom_domains_begin_create(self, resource_group): + response = await ( + await self.client.custom_domains.begin_create( + resource_group_name=resource_group.name, + profile_name="str", + endpoint_name="str", + custom_domain_name="str", + custom_domain_properties={"hostName": "str"}, + api_version="2025-06-01", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_custom_domains_begin_delete(self, resource_group): + response = await ( + await self.client.custom_domains.begin_delete( + resource_group_name=resource_group.name, + profile_name="str", + endpoint_name="str", + custom_domain_name="str", + api_version="2025-06-01", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_custom_domains_begin_disable_custom_https(self, resource_group): + response = await ( + await self.client.custom_domains.begin_disable_custom_https( + resource_group_name=resource_group.name, + profile_name="str", + endpoint_name="str", + custom_domain_name="str", + api_version="2025-06-01", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_custom_domains_begin_enable_custom_https(self, resource_group): + response = await ( + await self.client.custom_domains.begin_enable_custom_https( + resource_group_name=resource_group.name, + profile_name="str", + endpoint_name="str", + custom_domain_name="str", + api_version="2025-06-01", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... diff --git a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_edge_nodes_operations.py b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_edge_nodes_operations.py new file mode 100644 index 000000000000..2625ebfdbcb2 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_edge_nodes_operations.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.cdn import CdnManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestCdnManagementEdgeNodesOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(CdnManagementClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_edge_nodes_list(self, resource_group): + response = self.client.edge_nodes.list( + api_version="2025-06-01", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_edge_nodes_operations_async.py b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_edge_nodes_operations_async.py new file mode 100644 index 000000000000..e2d50d7db586 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_edge_nodes_operations_async.py @@ -0,0 +1,30 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.cdn.aio import CdnManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestCdnManagementEdgeNodesOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(CdnManagementClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_edge_nodes_list(self, resource_group): + response = self.client.edge_nodes.list( + api_version="2025-06-01", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_endpoints_operations.py b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_endpoints_operations.py new file mode 100644 index 000000000000..e1ec67f8cd62 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_endpoints_operations.py @@ -0,0 +1,293 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.cdn import CdnManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestCdnManagementEndpointsOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(CdnManagementClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_endpoints_list_by_profile(self, resource_group): + response = self.client.endpoints.list_by_profile( + resource_group_name=resource_group.name, + profile_name="str", + api_version="2025-06-01", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_endpoints_get(self, resource_group): + response = self.client.endpoints.get( + resource_group_name=resource_group.name, + profile_name="str", + endpoint_name="str", + api_version="2025-06-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_endpoints_begin_create(self, resource_group): + response = self.client.endpoints.begin_create( + resource_group_name=resource_group.name, + profile_name="str", + endpoint_name="str", + endpoint={ + "location": "str", + "contentTypesToCompress": ["str"], + "customDomains": [{"name": "str", "hostName": "str", "validationData": "str"}], + "defaultOriginGroup": {"id": "str"}, + "deliveryPolicy": { + "rules": [ + { + "actions": ["delivery_rule_action"], + "order": 0, + "conditions": ["delivery_rule_condition"], + "name": "str", + } + ], + "description": "str", + }, + "geoFilters": [{"action": "str", "countryCodes": ["str"], "relativePath": "str"}], + "hostName": "str", + "id": "str", + "isCompressionEnabled": bool, + "isHttpAllowed": True, + "isHttpsAllowed": True, + "name": "str", + "optimizationType": "str", + "originGroups": [ + { + "name": "str", + "healthProbeSettings": { + "probeIntervalInSeconds": 0, + "probePath": "str", + "probeProtocol": "str", + "probeRequestType": "str", + }, + "origins": [{"id": "str"}], + "responseBasedOriginErrorDetectionSettings": { + "httpErrorRanges": [{"begin": 0, "end": 0}], + "responseBasedDetectedErrorTypes": "str", + "responseBasedFailoverThresholdPercentage": 0, + }, + "trafficRestorationTimeToHealedOrNewEndpointsInMinutes": 0, + } + ], + "originHostHeader": "str", + "originPath": "str", + "origins": [ + { + "name": "str", + "enabled": bool, + "hostName": "str", + "httpPort": 0, + "httpsPort": 0, + "originHostHeader": "str", + "priority": 0, + "privateEndpointStatus": "str", + "privateLinkAlias": "str", + "privateLinkApprovalMessage": "str", + "privateLinkLocation": "str", + "privateLinkResourceId": "str", + "weight": 0, + } + ], + "probePath": "str", + "provisioningState": "str", + "queryStringCachingBehavior": "str", + "resourceState": "str", + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "tags": {"str": "str"}, + "type": "str", + "urlSigningKeys": [ + { + "keyId": "str", + "keySourceParameters": { + "resourceGroupName": "str", + "secretName": "str", + "secretVersion": "str", + "subscriptionId": "str", + "typeName": "str", + "vaultName": "str", + }, + } + ], + "webApplicationFirewallPolicyLink": {"id": "str"}, + }, + api_version="2025-06-01", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_endpoints_begin_update(self, resource_group): + response = self.client.endpoints.begin_update( + resource_group_name=resource_group.name, + profile_name="str", + endpoint_name="str", + endpoint_update_properties={ + "contentTypesToCompress": ["str"], + "defaultOriginGroup": {"id": "str"}, + "deliveryPolicy": { + "rules": [ + { + "actions": ["delivery_rule_action"], + "order": 0, + "conditions": ["delivery_rule_condition"], + "name": "str", + } + ], + "description": "str", + }, + "geoFilters": [{"action": "str", "countryCodes": ["str"], "relativePath": "str"}], + "isCompressionEnabled": bool, + "isHttpAllowed": True, + "isHttpsAllowed": True, + "optimizationType": "str", + "originHostHeader": "str", + "originPath": "str", + "probePath": "str", + "queryStringCachingBehavior": "str", + "tags": {"str": "str"}, + "urlSigningKeys": [ + { + "keyId": "str", + "keySourceParameters": { + "resourceGroupName": "str", + "secretName": "str", + "secretVersion": "str", + "subscriptionId": "str", + "typeName": "str", + "vaultName": "str", + }, + } + ], + "webApplicationFirewallPolicyLink": {"id": "str"}, + }, + api_version="2025-06-01", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_endpoints_begin_delete(self, resource_group): + response = self.client.endpoints.begin_delete( + resource_group_name=resource_group.name, + profile_name="str", + endpoint_name="str", + api_version="2025-06-01", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_endpoints_begin_start(self, resource_group): + response = self.client.endpoints.begin_start( + resource_group_name=resource_group.name, + profile_name="str", + endpoint_name="str", + api_version="2025-06-01", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_endpoints_begin_stop(self, resource_group): + response = self.client.endpoints.begin_stop( + resource_group_name=resource_group.name, + profile_name="str", + endpoint_name="str", + api_version="2025-06-01", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_endpoints_begin_purge_content(self, resource_group): + response = self.client.endpoints.begin_purge_content( + resource_group_name=resource_group.name, + profile_name="str", + endpoint_name="str", + content_file_paths={"contentPaths": ["str"]}, + api_version="2025-06-01", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_endpoints_begin_load_content(self, resource_group): + response = self.client.endpoints.begin_load_content( + resource_group_name=resource_group.name, + profile_name="str", + endpoint_name="str", + content_file_paths={"contentPaths": ["str"]}, + api_version="2025-06-01", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_endpoints_validate_custom_domain(self, resource_group): + response = self.client.endpoints.validate_custom_domain( + resource_group_name=resource_group.name, + profile_name="str", + endpoint_name="str", + custom_domain_properties={"hostName": "str"}, + api_version="2025-06-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_endpoints_list_resource_usage(self, resource_group): + response = self.client.endpoints.list_resource_usage( + resource_group_name=resource_group.name, + profile_name="str", + endpoint_name="str", + api_version="2025-06-01", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_endpoints_operations_async.py b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_endpoints_operations_async.py new file mode 100644 index 000000000000..15bfef821377 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_endpoints_operations_async.py @@ -0,0 +1,308 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.cdn.aio import CdnManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestCdnManagementEndpointsOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(CdnManagementClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_endpoints_list_by_profile(self, resource_group): + response = self.client.endpoints.list_by_profile( + resource_group_name=resource_group.name, + profile_name="str", + api_version="2025-06-01", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_endpoints_get(self, resource_group): + response = await self.client.endpoints.get( + resource_group_name=resource_group.name, + profile_name="str", + endpoint_name="str", + api_version="2025-06-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_endpoints_begin_create(self, resource_group): + response = await ( + await self.client.endpoints.begin_create( + resource_group_name=resource_group.name, + profile_name="str", + endpoint_name="str", + endpoint={ + "location": "str", + "contentTypesToCompress": ["str"], + "customDomains": [{"name": "str", "hostName": "str", "validationData": "str"}], + "defaultOriginGroup": {"id": "str"}, + "deliveryPolicy": { + "rules": [ + { + "actions": ["delivery_rule_action"], + "order": 0, + "conditions": ["delivery_rule_condition"], + "name": "str", + } + ], + "description": "str", + }, + "geoFilters": [{"action": "str", "countryCodes": ["str"], "relativePath": "str"}], + "hostName": "str", + "id": "str", + "isCompressionEnabled": bool, + "isHttpAllowed": True, + "isHttpsAllowed": True, + "name": "str", + "optimizationType": "str", + "originGroups": [ + { + "name": "str", + "healthProbeSettings": { + "probeIntervalInSeconds": 0, + "probePath": "str", + "probeProtocol": "str", + "probeRequestType": "str", + }, + "origins": [{"id": "str"}], + "responseBasedOriginErrorDetectionSettings": { + "httpErrorRanges": [{"begin": 0, "end": 0}], + "responseBasedDetectedErrorTypes": "str", + "responseBasedFailoverThresholdPercentage": 0, + }, + "trafficRestorationTimeToHealedOrNewEndpointsInMinutes": 0, + } + ], + "originHostHeader": "str", + "originPath": "str", + "origins": [ + { + "name": "str", + "enabled": bool, + "hostName": "str", + "httpPort": 0, + "httpsPort": 0, + "originHostHeader": "str", + "priority": 0, + "privateEndpointStatus": "str", + "privateLinkAlias": "str", + "privateLinkApprovalMessage": "str", + "privateLinkLocation": "str", + "privateLinkResourceId": "str", + "weight": 0, + } + ], + "probePath": "str", + "provisioningState": "str", + "queryStringCachingBehavior": "str", + "resourceState": "str", + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "tags": {"str": "str"}, + "type": "str", + "urlSigningKeys": [ + { + "keyId": "str", + "keySourceParameters": { + "resourceGroupName": "str", + "secretName": "str", + "secretVersion": "str", + "subscriptionId": "str", + "typeName": "str", + "vaultName": "str", + }, + } + ], + "webApplicationFirewallPolicyLink": {"id": "str"}, + }, + api_version="2025-06-01", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_endpoints_begin_update(self, resource_group): + response = await ( + await self.client.endpoints.begin_update( + resource_group_name=resource_group.name, + profile_name="str", + endpoint_name="str", + endpoint_update_properties={ + "contentTypesToCompress": ["str"], + "defaultOriginGroup": {"id": "str"}, + "deliveryPolicy": { + "rules": [ + { + "actions": ["delivery_rule_action"], + "order": 0, + "conditions": ["delivery_rule_condition"], + "name": "str", + } + ], + "description": "str", + }, + "geoFilters": [{"action": "str", "countryCodes": ["str"], "relativePath": "str"}], + "isCompressionEnabled": bool, + "isHttpAllowed": True, + "isHttpsAllowed": True, + "optimizationType": "str", + "originHostHeader": "str", + "originPath": "str", + "probePath": "str", + "queryStringCachingBehavior": "str", + "tags": {"str": "str"}, + "urlSigningKeys": [ + { + "keyId": "str", + "keySourceParameters": { + "resourceGroupName": "str", + "secretName": "str", + "secretVersion": "str", + "subscriptionId": "str", + "typeName": "str", + "vaultName": "str", + }, + } + ], + "webApplicationFirewallPolicyLink": {"id": "str"}, + }, + api_version="2025-06-01", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_endpoints_begin_delete(self, resource_group): + response = await ( + await self.client.endpoints.begin_delete( + resource_group_name=resource_group.name, + profile_name="str", + endpoint_name="str", + api_version="2025-06-01", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_endpoints_begin_start(self, resource_group): + response = await ( + await self.client.endpoints.begin_start( + resource_group_name=resource_group.name, + profile_name="str", + endpoint_name="str", + api_version="2025-06-01", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_endpoints_begin_stop(self, resource_group): + response = await ( + await self.client.endpoints.begin_stop( + resource_group_name=resource_group.name, + profile_name="str", + endpoint_name="str", + api_version="2025-06-01", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_endpoints_begin_purge_content(self, resource_group): + response = await ( + await self.client.endpoints.begin_purge_content( + resource_group_name=resource_group.name, + profile_name="str", + endpoint_name="str", + content_file_paths={"contentPaths": ["str"]}, + api_version="2025-06-01", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_endpoints_begin_load_content(self, resource_group): + response = await ( + await self.client.endpoints.begin_load_content( + resource_group_name=resource_group.name, + profile_name="str", + endpoint_name="str", + content_file_paths={"contentPaths": ["str"]}, + api_version="2025-06-01", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_endpoints_validate_custom_domain(self, resource_group): + response = await self.client.endpoints.validate_custom_domain( + resource_group_name=resource_group.name, + profile_name="str", + endpoint_name="str", + custom_domain_properties={"hostName": "str"}, + api_version="2025-06-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_endpoints_list_resource_usage(self, resource_group): + response = self.client.endpoints.list_resource_usage( + resource_group_name=resource_group.name, + profile_name="str", + endpoint_name="str", + api_version="2025-06-01", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_log_analytics_operations.py b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_log_analytics_operations.py new file mode 100644 index 000000000000..063f04864481 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_log_analytics_operations.py @@ -0,0 +1,111 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.cdn import CdnManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestCdnManagementLogAnalyticsOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(CdnManagementClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_log_analytics_get_log_analytics_metrics(self, resource_group): + response = self.client.log_analytics.get_log_analytics_metrics( + resource_group_name=resource_group.name, + profile_name="str", + metrics=["str"], + date_time_begin="2020-02-20 00:00:00", + date_time_end="2020-02-20 00:00:00", + granularity="str", + custom_domains=["str"], + protocols=["str"], + api_version="2025-06-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_log_analytics_get_log_analytics_rankings(self, resource_group): + response = self.client.log_analytics.get_log_analytics_rankings( + resource_group_name=resource_group.name, + profile_name="str", + rankings=["str"], + metrics=["str"], + max_ranking=0, + date_time_begin="2020-02-20 00:00:00", + date_time_end="2020-02-20 00:00:00", + api_version="2025-06-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_log_analytics_get_log_analytics_locations(self, resource_group): + response = self.client.log_analytics.get_log_analytics_locations( + resource_group_name=resource_group.name, + profile_name="str", + api_version="2025-06-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_log_analytics_get_log_analytics_resources(self, resource_group): + response = self.client.log_analytics.get_log_analytics_resources( + resource_group_name=resource_group.name, + profile_name="str", + api_version="2025-06-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_log_analytics_get_waf_log_analytics_metrics(self, resource_group): + response = self.client.log_analytics.get_waf_log_analytics_metrics( + resource_group_name=resource_group.name, + profile_name="str", + metrics=["str"], + date_time_begin="2020-02-20 00:00:00", + date_time_end="2020-02-20 00:00:00", + granularity="str", + api_version="2025-06-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_log_analytics_get_waf_log_analytics_rankings(self, resource_group): + response = self.client.log_analytics.get_waf_log_analytics_rankings( + resource_group_name=resource_group.name, + profile_name="str", + metrics=["str"], + date_time_begin="2020-02-20 00:00:00", + date_time_end="2020-02-20 00:00:00", + max_ranking=0, + rankings=["str"], + api_version="2025-06-01", + ) + + # please add some check logic here by yourself + # ... diff --git a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_log_analytics_operations_async.py b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_log_analytics_operations_async.py new file mode 100644 index 000000000000..1fb5bbc98b37 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_log_analytics_operations_async.py @@ -0,0 +1,112 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.cdn.aio import CdnManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestCdnManagementLogAnalyticsOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(CdnManagementClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_log_analytics_get_log_analytics_metrics(self, resource_group): + response = await self.client.log_analytics.get_log_analytics_metrics( + resource_group_name=resource_group.name, + profile_name="str", + metrics=["str"], + date_time_begin="2020-02-20 00:00:00", + date_time_end="2020-02-20 00:00:00", + granularity="str", + custom_domains=["str"], + protocols=["str"], + api_version="2025-06-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_log_analytics_get_log_analytics_rankings(self, resource_group): + response = await self.client.log_analytics.get_log_analytics_rankings( + resource_group_name=resource_group.name, + profile_name="str", + rankings=["str"], + metrics=["str"], + max_ranking=0, + date_time_begin="2020-02-20 00:00:00", + date_time_end="2020-02-20 00:00:00", + api_version="2025-06-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_log_analytics_get_log_analytics_locations(self, resource_group): + response = await self.client.log_analytics.get_log_analytics_locations( + resource_group_name=resource_group.name, + profile_name="str", + api_version="2025-06-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_log_analytics_get_log_analytics_resources(self, resource_group): + response = await self.client.log_analytics.get_log_analytics_resources( + resource_group_name=resource_group.name, + profile_name="str", + api_version="2025-06-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_log_analytics_get_waf_log_analytics_metrics(self, resource_group): + response = await self.client.log_analytics.get_waf_log_analytics_metrics( + resource_group_name=resource_group.name, + profile_name="str", + metrics=["str"], + date_time_begin="2020-02-20 00:00:00", + date_time_end="2020-02-20 00:00:00", + granularity="str", + api_version="2025-06-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_log_analytics_get_waf_log_analytics_rankings(self, resource_group): + response = await self.client.log_analytics.get_waf_log_analytics_rankings( + resource_group_name=resource_group.name, + profile_name="str", + metrics=["str"], + date_time_begin="2020-02-20 00:00:00", + date_time_end="2020-02-20 00:00:00", + max_ranking=0, + rankings=["str"], + api_version="2025-06-01", + ) + + # please add some check logic here by yourself + # ... diff --git a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_managed_rule_sets_operations.py b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_managed_rule_sets_operations.py new file mode 100644 index 000000000000..8100c0030aaa --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_managed_rule_sets_operations.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.cdn import CdnManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestCdnManagementManagedRuleSetsOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(CdnManagementClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_managed_rule_sets_list(self, resource_group): + response = self.client.managed_rule_sets.list( + api_version="2025-06-01", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_managed_rule_sets_operations_async.py b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_managed_rule_sets_operations_async.py new file mode 100644 index 000000000000..d48e4d1b1037 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_managed_rule_sets_operations_async.py @@ -0,0 +1,30 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.cdn.aio import CdnManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestCdnManagementManagedRuleSetsOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(CdnManagementClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_managed_rule_sets_list(self, resource_group): + response = self.client.managed_rule_sets.list( + api_version="2025-06-01", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_operations.py b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_operations.py new file mode 100644 index 000000000000..b76413ccb9af --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_operations.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.cdn import CdnManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestCdnManagementOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(CdnManagementClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_operations_list(self, resource_group): + response = self.client.operations.list( + api_version="2025-06-01", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_operations_async.py b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_operations_async.py new file mode 100644 index 000000000000..747d6b74e898 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_operations_async.py @@ -0,0 +1,30 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.cdn.aio import CdnManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestCdnManagementOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(CdnManagementClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_operations_list(self, resource_group): + response = self.client.operations.list( + api_version="2025-06-01", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_origin_groups_operations.py b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_origin_groups_operations.py new file mode 100644 index 000000000000..309f06bd8bc5 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_origin_groups_operations.py @@ -0,0 +1,131 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.cdn import CdnManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestCdnManagementOriginGroupsOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(CdnManagementClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_origin_groups_list_by_endpoint(self, resource_group): + response = self.client.origin_groups.list_by_endpoint( + resource_group_name=resource_group.name, + profile_name="str", + endpoint_name="str", + api_version="2025-06-01", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_origin_groups_get(self, resource_group): + response = self.client.origin_groups.get( + resource_group_name=resource_group.name, + profile_name="str", + endpoint_name="str", + origin_group_name="str", + api_version="2025-06-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_origin_groups_begin_create(self, resource_group): + response = self.client.origin_groups.begin_create( + resource_group_name=resource_group.name, + profile_name="str", + endpoint_name="str", + origin_group_name="str", + origin_group={ + "healthProbeSettings": { + "probeIntervalInSeconds": 0, + "probePath": "str", + "probeProtocol": "str", + "probeRequestType": "str", + }, + "id": "str", + "name": "str", + "origins": [{"id": "str"}], + "provisioningState": "str", + "resourceState": "str", + "responseBasedOriginErrorDetectionSettings": { + "httpErrorRanges": [{"begin": 0, "end": 0}], + "responseBasedDetectedErrorTypes": "str", + "responseBasedFailoverThresholdPercentage": 0, + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "trafficRestorationTimeToHealedOrNewEndpointsInMinutes": 0, + "type": "str", + }, + api_version="2025-06-01", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_origin_groups_begin_update(self, resource_group): + response = self.client.origin_groups.begin_update( + resource_group_name=resource_group.name, + profile_name="str", + endpoint_name="str", + origin_group_name="str", + origin_group_update_properties={ + "healthProbeSettings": { + "probeIntervalInSeconds": 0, + "probePath": "str", + "probeProtocol": "str", + "probeRequestType": "str", + }, + "origins": [{"id": "str"}], + "responseBasedOriginErrorDetectionSettings": { + "httpErrorRanges": [{"begin": 0, "end": 0}], + "responseBasedDetectedErrorTypes": "str", + "responseBasedFailoverThresholdPercentage": 0, + }, + "trafficRestorationTimeToHealedOrNewEndpointsInMinutes": 0, + }, + api_version="2025-06-01", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_origin_groups_begin_delete(self, resource_group): + response = self.client.origin_groups.begin_delete( + resource_group_name=resource_group.name, + profile_name="str", + endpoint_name="str", + origin_group_name="str", + api_version="2025-06-01", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... diff --git a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_origin_groups_operations_async.py b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_origin_groups_operations_async.py new file mode 100644 index 000000000000..79e817fc8eb4 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_origin_groups_operations_async.py @@ -0,0 +1,138 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.cdn.aio import CdnManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestCdnManagementOriginGroupsOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(CdnManagementClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_origin_groups_list_by_endpoint(self, resource_group): + response = self.client.origin_groups.list_by_endpoint( + resource_group_name=resource_group.name, + profile_name="str", + endpoint_name="str", + api_version="2025-06-01", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_origin_groups_get(self, resource_group): + response = await self.client.origin_groups.get( + resource_group_name=resource_group.name, + profile_name="str", + endpoint_name="str", + origin_group_name="str", + api_version="2025-06-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_origin_groups_begin_create(self, resource_group): + response = await ( + await self.client.origin_groups.begin_create( + resource_group_name=resource_group.name, + profile_name="str", + endpoint_name="str", + origin_group_name="str", + origin_group={ + "healthProbeSettings": { + "probeIntervalInSeconds": 0, + "probePath": "str", + "probeProtocol": "str", + "probeRequestType": "str", + }, + "id": "str", + "name": "str", + "origins": [{"id": "str"}], + "provisioningState": "str", + "resourceState": "str", + "responseBasedOriginErrorDetectionSettings": { + "httpErrorRanges": [{"begin": 0, "end": 0}], + "responseBasedDetectedErrorTypes": "str", + "responseBasedFailoverThresholdPercentage": 0, + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "trafficRestorationTimeToHealedOrNewEndpointsInMinutes": 0, + "type": "str", + }, + api_version="2025-06-01", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_origin_groups_begin_update(self, resource_group): + response = await ( + await self.client.origin_groups.begin_update( + resource_group_name=resource_group.name, + profile_name="str", + endpoint_name="str", + origin_group_name="str", + origin_group_update_properties={ + "healthProbeSettings": { + "probeIntervalInSeconds": 0, + "probePath": "str", + "probeProtocol": "str", + "probeRequestType": "str", + }, + "origins": [{"id": "str"}], + "responseBasedOriginErrorDetectionSettings": { + "httpErrorRanges": [{"begin": 0, "end": 0}], + "responseBasedDetectedErrorTypes": "str", + "responseBasedFailoverThresholdPercentage": 0, + }, + "trafficRestorationTimeToHealedOrNewEndpointsInMinutes": 0, + }, + api_version="2025-06-01", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_origin_groups_begin_delete(self, resource_group): + response = await ( + await self.client.origin_groups.begin_delete( + resource_group_name=resource_group.name, + profile_name="str", + endpoint_name="str", + origin_group_name="str", + api_version="2025-06-01", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... diff --git a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_origins_operations.py b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_origins_operations.py new file mode 100644 index 000000000000..d043c4623ce3 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_origins_operations.py @@ -0,0 +1,128 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.cdn import CdnManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestCdnManagementOriginsOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(CdnManagementClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_origins_list_by_endpoint(self, resource_group): + response = self.client.origins.list_by_endpoint( + resource_group_name=resource_group.name, + profile_name="str", + endpoint_name="str", + api_version="2025-06-01", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_origins_get(self, resource_group): + response = self.client.origins.get( + resource_group_name=resource_group.name, + profile_name="str", + endpoint_name="str", + origin_name="str", + api_version="2025-06-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_origins_begin_create(self, resource_group): + response = self.client.origins.begin_create( + resource_group_name=resource_group.name, + profile_name="str", + endpoint_name="str", + origin_name="str", + origin={ + "enabled": bool, + "hostName": "str", + "httpPort": 0, + "httpsPort": 0, + "id": "str", + "name": "str", + "originHostHeader": "str", + "priority": 0, + "privateEndpointStatus": "str", + "privateLinkAlias": "str", + "privateLinkApprovalMessage": "str", + "privateLinkLocation": "str", + "privateLinkResourceId": "str", + "provisioningState": "str", + "resourceState": "str", + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + "weight": 0, + }, + api_version="2025-06-01", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_origins_begin_update(self, resource_group): + response = self.client.origins.begin_update( + resource_group_name=resource_group.name, + profile_name="str", + endpoint_name="str", + origin_name="str", + origin_update_properties={ + "enabled": bool, + "hostName": "str", + "httpPort": 0, + "httpsPort": 0, + "originHostHeader": "str", + "priority": 0, + "privateLinkAlias": "str", + "privateLinkApprovalMessage": "str", + "privateLinkLocation": "str", + "privateLinkResourceId": "str", + "weight": 0, + }, + api_version="2025-06-01", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_origins_begin_delete(self, resource_group): + response = self.client.origins.begin_delete( + resource_group_name=resource_group.name, + profile_name="str", + endpoint_name="str", + origin_name="str", + api_version="2025-06-01", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... diff --git a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_origins_operations_async.py b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_origins_operations_async.py new file mode 100644 index 000000000000..aac7dc3c736f --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_origins_operations_async.py @@ -0,0 +1,135 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.cdn.aio import CdnManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestCdnManagementOriginsOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(CdnManagementClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_origins_list_by_endpoint(self, resource_group): + response = self.client.origins.list_by_endpoint( + resource_group_name=resource_group.name, + profile_name="str", + endpoint_name="str", + api_version="2025-06-01", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_origins_get(self, resource_group): + response = await self.client.origins.get( + resource_group_name=resource_group.name, + profile_name="str", + endpoint_name="str", + origin_name="str", + api_version="2025-06-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_origins_begin_create(self, resource_group): + response = await ( + await self.client.origins.begin_create( + resource_group_name=resource_group.name, + profile_name="str", + endpoint_name="str", + origin_name="str", + origin={ + "enabled": bool, + "hostName": "str", + "httpPort": 0, + "httpsPort": 0, + "id": "str", + "name": "str", + "originHostHeader": "str", + "priority": 0, + "privateEndpointStatus": "str", + "privateLinkAlias": "str", + "privateLinkApprovalMessage": "str", + "privateLinkLocation": "str", + "privateLinkResourceId": "str", + "provisioningState": "str", + "resourceState": "str", + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + "weight": 0, + }, + api_version="2025-06-01", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_origins_begin_update(self, resource_group): + response = await ( + await self.client.origins.begin_update( + resource_group_name=resource_group.name, + profile_name="str", + endpoint_name="str", + origin_name="str", + origin_update_properties={ + "enabled": bool, + "hostName": "str", + "httpPort": 0, + "httpsPort": 0, + "originHostHeader": "str", + "priority": 0, + "privateLinkAlias": "str", + "privateLinkApprovalMessage": "str", + "privateLinkLocation": "str", + "privateLinkResourceId": "str", + "weight": 0, + }, + api_version="2025-06-01", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_origins_begin_delete(self, resource_group): + response = await ( + await self.client.origins.begin_delete( + resource_group_name=resource_group.name, + profile_name="str", + endpoint_name="str", + origin_name="str", + api_version="2025-06-01", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... diff --git a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_policies_operations.py b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_policies_operations.py new file mode 100644 index 000000000000..93122aa76d4d --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_policies_operations.py @@ -0,0 +1,164 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.cdn import CdnManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestCdnManagementPoliciesOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(CdnManagementClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_policies_list(self, resource_group): + response = self.client.policies.list( + resource_group_name=resource_group.name, + api_version="2025-06-01", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_policies_get(self, resource_group): + response = self.client.policies.get( + resource_group_name=resource_group.name, + policy_name="str", + api_version="2025-06-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_policies_begin_create_or_update(self, resource_group): + response = self.client.policies.begin_create_or_update( + resource_group_name=resource_group.name, + policy_name="str", + cdn_web_application_firewall_policy={ + "location": "str", + "sku": {"name": "str"}, + "customRules": { + "rules": [ + { + "action": "str", + "matchConditions": [ + { + "matchValue": ["str"], + "matchVariable": "str", + "operator": "str", + "negateCondition": bool, + "selector": "str", + "transforms": ["str"], + } + ], + "name": "str", + "priority": 0, + "enabledState": "str", + } + ] + }, + "endpointLinks": [{"id": "str"}], + "etag": "str", + "extendedProperties": {"str": "str"}, + "id": "str", + "managedRules": { + "managedRuleSets": [ + { + "ruleSetType": "str", + "ruleSetVersion": "str", + "anomalyScore": 0, + "ruleGroupOverrides": [ + { + "ruleGroupName": "str", + "rules": [{"ruleId": "str", "action": "str", "enabledState": "str"}], + } + ], + } + ] + }, + "name": "str", + "policySettings": { + "defaultCustomBlockResponseBody": "str", + "defaultCustomBlockResponseStatusCode": 0, + "defaultRedirectUrl": "str", + "enabledState": "str", + "mode": "str", + }, + "provisioningState": "str", + "rateLimitRules": { + "rules": [ + { + "action": "str", + "matchConditions": [ + { + "matchValue": ["str"], + "matchVariable": "str", + "operator": "str", + "negateCondition": bool, + "selector": "str", + "transforms": ["str"], + } + ], + "name": "str", + "priority": 0, + "rateLimitDurationInMinutes": 0, + "rateLimitThreshold": 0, + "enabledState": "str", + } + ] + }, + "resourceState": "str", + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "tags": {"str": "str"}, + "type": "str", + }, + api_version="2025-06-01", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_policies_begin_update(self, resource_group): + response = self.client.policies.begin_update( + resource_group_name=resource_group.name, + policy_name="str", + cdn_web_application_firewall_policy_patch_parameters={"tags": {"str": "str"}}, + api_version="2025-06-01", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_policies_delete(self, resource_group): + response = self.client.policies.delete( + resource_group_name=resource_group.name, + policy_name="str", + api_version="2025-06-01", + ) + + # please add some check logic here by yourself + # ... diff --git a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_policies_operations_async.py b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_policies_operations_async.py new file mode 100644 index 000000000000..5f6192bef892 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_policies_operations_async.py @@ -0,0 +1,169 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.cdn.aio import CdnManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestCdnManagementPoliciesOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(CdnManagementClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_policies_list(self, resource_group): + response = self.client.policies.list( + resource_group_name=resource_group.name, + api_version="2025-06-01", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_policies_get(self, resource_group): + response = await self.client.policies.get( + resource_group_name=resource_group.name, + policy_name="str", + api_version="2025-06-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_policies_begin_create_or_update(self, resource_group): + response = await ( + await self.client.policies.begin_create_or_update( + resource_group_name=resource_group.name, + policy_name="str", + cdn_web_application_firewall_policy={ + "location": "str", + "sku": {"name": "str"}, + "customRules": { + "rules": [ + { + "action": "str", + "matchConditions": [ + { + "matchValue": ["str"], + "matchVariable": "str", + "operator": "str", + "negateCondition": bool, + "selector": "str", + "transforms": ["str"], + } + ], + "name": "str", + "priority": 0, + "enabledState": "str", + } + ] + }, + "endpointLinks": [{"id": "str"}], + "etag": "str", + "extendedProperties": {"str": "str"}, + "id": "str", + "managedRules": { + "managedRuleSets": [ + { + "ruleSetType": "str", + "ruleSetVersion": "str", + "anomalyScore": 0, + "ruleGroupOverrides": [ + { + "ruleGroupName": "str", + "rules": [{"ruleId": "str", "action": "str", "enabledState": "str"}], + } + ], + } + ] + }, + "name": "str", + "policySettings": { + "defaultCustomBlockResponseBody": "str", + "defaultCustomBlockResponseStatusCode": 0, + "defaultRedirectUrl": "str", + "enabledState": "str", + "mode": "str", + }, + "provisioningState": "str", + "rateLimitRules": { + "rules": [ + { + "action": "str", + "matchConditions": [ + { + "matchValue": ["str"], + "matchVariable": "str", + "operator": "str", + "negateCondition": bool, + "selector": "str", + "transforms": ["str"], + } + ], + "name": "str", + "priority": 0, + "rateLimitDurationInMinutes": 0, + "rateLimitThreshold": 0, + "enabledState": "str", + } + ] + }, + "resourceState": "str", + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "tags": {"str": "str"}, + "type": "str", + }, + api_version="2025-06-01", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_policies_begin_update(self, resource_group): + response = await ( + await self.client.policies.begin_update( + resource_group_name=resource_group.name, + policy_name="str", + cdn_web_application_firewall_policy_patch_parameters={"tags": {"str": "str"}}, + api_version="2025-06-01", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_policies_delete(self, resource_group): + response = await self.client.policies.delete( + resource_group_name=resource_group.name, + policy_name="str", + api_version="2025-06-01", + ) + + # please add some check logic here by yourself + # ... diff --git a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_profiles_operations.py b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_profiles_operations.py new file mode 100644 index 000000000000..59ed0c520cd7 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_profiles_operations.py @@ -0,0 +1,257 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.cdn import CdnManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestCdnManagementProfilesOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(CdnManagementClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_profiles_list(self, resource_group): + response = self.client.profiles.list( + api_version="2025-06-01", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_profiles_list_by_resource_group(self, resource_group): + response = self.client.profiles.list_by_resource_group( + resource_group_name=resource_group.name, + api_version="2025-06-01", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_profiles_get(self, resource_group): + response = self.client.profiles.get( + resource_group_name=resource_group.name, + profile_name="str", + api_version="2025-06-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_profiles_begin_create(self, resource_group): + response = self.client.profiles.begin_create( + resource_group_name=resource_group.name, + profile_name="str", + profile={ + "location": "str", + "sku": {"name": "str"}, + "extendedProperties": {"str": "str"}, + "frontDoorId": "str", + "id": "str", + "identity": { + "type": "str", + "principalId": "str", + "tenantId": "str", + "userAssignedIdentities": {"str": {"clientId": "str", "principalId": "str"}}, + }, + "kind": "str", + "logScrubbing": { + "scrubbingRules": [ + {"matchVariable": "str", "selectorMatchOperator": "str", "selector": "str", "state": "str"} + ], + "state": "str", + }, + "name": "str", + "originResponseTimeoutSeconds": 0, + "provisioningState": "str", + "resourceState": "str", + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "tags": {"str": "str"}, + "type": "str", + }, + api_version="2025-06-01", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_profiles_begin_update(self, resource_group): + response = self.client.profiles.begin_update( + resource_group_name=resource_group.name, + profile_name="str", + profile_update_parameters={ + "identity": { + "type": "str", + "principalId": "str", + "tenantId": "str", + "userAssignedIdentities": {"str": {"clientId": "str", "principalId": "str"}}, + }, + "logScrubbing": { + "scrubbingRules": [ + {"matchVariable": "str", "selectorMatchOperator": "str", "selector": "str", "state": "str"} + ], + "state": "str", + }, + "originResponseTimeoutSeconds": 0, + "tags": {"str": "str"}, + }, + api_version="2025-06-01", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_profiles_begin_delete(self, resource_group): + response = self.client.profiles.begin_delete( + resource_group_name=resource_group.name, + profile_name="str", + api_version="2025-06-01", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_profiles_begin_can_migrate(self, resource_group): + response = self.client.profiles.begin_can_migrate( + resource_group_name=resource_group.name, + can_migrate_parameters={"classicResourceReference": {"id": "str"}}, + api_version="2025-06-01", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_profiles_begin_migrate(self, resource_group): + response = self.client.profiles.begin_migrate( + resource_group_name=resource_group.name, + migration_parameters={ + "classicResourceReference": {"id": "str"}, + "profileName": "str", + "sku": {"name": "str"}, + "migrationWebApplicationFirewallMappings": [ + {"migratedFrom": {"id": "str"}, "migratedTo": {"id": "str"}} + ], + }, + api_version="2025-06-01", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_profiles_begin_migration_commit(self, resource_group): + response = self.client.profiles.begin_migration_commit( + resource_group_name=resource_group.name, + profile_name="str", + api_version="2025-06-01", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_profiles_generate_sso_uri(self, resource_group): + response = self.client.profiles.generate_sso_uri( + resource_group_name=resource_group.name, + profile_name="str", + api_version="2025-06-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_profiles_list_supported_optimization_types(self, resource_group): + response = self.client.profiles.list_supported_optimization_types( + resource_group_name=resource_group.name, + profile_name="str", + api_version="2025-06-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_profiles_list_resource_usage(self, resource_group): + response = self.client.profiles.list_resource_usage( + resource_group_name=resource_group.name, + profile_name="str", + api_version="2025-06-01", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_profiles_begin_cdn_can_migrate_to_afd(self, resource_group): + response = self.client.profiles.begin_cdn_can_migrate_to_afd( + resource_group_name=resource_group.name, + profile_name="str", + api_version="2025-06-01", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_profiles_begin_cdn_migrate_to_afd(self, resource_group): + response = self.client.profiles.begin_cdn_migrate_to_afd( + resource_group_name=resource_group.name, + profile_name="str", + migration_parameters={ + "sku": {"name": "str"}, + "migrationEndpointMappings": [{"migratedFrom": "str", "migratedTo": "str"}], + }, + api_version="2025-06-01", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_profiles_begin_migration_abort(self, resource_group): + response = self.client.profiles.begin_migration_abort( + resource_group_name=resource_group.name, + profile_name="str", + api_version="2025-06-01", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... diff --git a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_profiles_operations_async.py b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_profiles_operations_async.py new file mode 100644 index 000000000000..adaa4d688d17 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_profiles_operations_async.py @@ -0,0 +1,276 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.cdn.aio import CdnManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestCdnManagementProfilesOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(CdnManagementClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_profiles_list(self, resource_group): + response = self.client.profiles.list( + api_version="2025-06-01", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_profiles_list_by_resource_group(self, resource_group): + response = self.client.profiles.list_by_resource_group( + resource_group_name=resource_group.name, + api_version="2025-06-01", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_profiles_get(self, resource_group): + response = await self.client.profiles.get( + resource_group_name=resource_group.name, + profile_name="str", + api_version="2025-06-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_profiles_begin_create(self, resource_group): + response = await ( + await self.client.profiles.begin_create( + resource_group_name=resource_group.name, + profile_name="str", + profile={ + "location": "str", + "sku": {"name": "str"}, + "extendedProperties": {"str": "str"}, + "frontDoorId": "str", + "id": "str", + "identity": { + "type": "str", + "principalId": "str", + "tenantId": "str", + "userAssignedIdentities": {"str": {"clientId": "str", "principalId": "str"}}, + }, + "kind": "str", + "logScrubbing": { + "scrubbingRules": [ + {"matchVariable": "str", "selectorMatchOperator": "str", "selector": "str", "state": "str"} + ], + "state": "str", + }, + "name": "str", + "originResponseTimeoutSeconds": 0, + "provisioningState": "str", + "resourceState": "str", + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "tags": {"str": "str"}, + "type": "str", + }, + api_version="2025-06-01", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_profiles_begin_update(self, resource_group): + response = await ( + await self.client.profiles.begin_update( + resource_group_name=resource_group.name, + profile_name="str", + profile_update_parameters={ + "identity": { + "type": "str", + "principalId": "str", + "tenantId": "str", + "userAssignedIdentities": {"str": {"clientId": "str", "principalId": "str"}}, + }, + "logScrubbing": { + "scrubbingRules": [ + {"matchVariable": "str", "selectorMatchOperator": "str", "selector": "str", "state": "str"} + ], + "state": "str", + }, + "originResponseTimeoutSeconds": 0, + "tags": {"str": "str"}, + }, + api_version="2025-06-01", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_profiles_begin_delete(self, resource_group): + response = await ( + await self.client.profiles.begin_delete( + resource_group_name=resource_group.name, + profile_name="str", + api_version="2025-06-01", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_profiles_begin_can_migrate(self, resource_group): + response = await ( + await self.client.profiles.begin_can_migrate( + resource_group_name=resource_group.name, + can_migrate_parameters={"classicResourceReference": {"id": "str"}}, + api_version="2025-06-01", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_profiles_begin_migrate(self, resource_group): + response = await ( + await self.client.profiles.begin_migrate( + resource_group_name=resource_group.name, + migration_parameters={ + "classicResourceReference": {"id": "str"}, + "profileName": "str", + "sku": {"name": "str"}, + "migrationWebApplicationFirewallMappings": [ + {"migratedFrom": {"id": "str"}, "migratedTo": {"id": "str"}} + ], + }, + api_version="2025-06-01", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_profiles_begin_migration_commit(self, resource_group): + response = await ( + await self.client.profiles.begin_migration_commit( + resource_group_name=resource_group.name, + profile_name="str", + api_version="2025-06-01", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_profiles_generate_sso_uri(self, resource_group): + response = await self.client.profiles.generate_sso_uri( + resource_group_name=resource_group.name, + profile_name="str", + api_version="2025-06-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_profiles_list_supported_optimization_types(self, resource_group): + response = await self.client.profiles.list_supported_optimization_types( + resource_group_name=resource_group.name, + profile_name="str", + api_version="2025-06-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_profiles_list_resource_usage(self, resource_group): + response = self.client.profiles.list_resource_usage( + resource_group_name=resource_group.name, + profile_name="str", + api_version="2025-06-01", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_profiles_begin_cdn_can_migrate_to_afd(self, resource_group): + response = await ( + await self.client.profiles.begin_cdn_can_migrate_to_afd( + resource_group_name=resource_group.name, + profile_name="str", + api_version="2025-06-01", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_profiles_begin_cdn_migrate_to_afd(self, resource_group): + response = await ( + await self.client.profiles.begin_cdn_migrate_to_afd( + resource_group_name=resource_group.name, + profile_name="str", + migration_parameters={ + "sku": {"name": "str"}, + "migrationEndpointMappings": [{"migratedFrom": "str", "migratedTo": "str"}], + }, + api_version="2025-06-01", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_profiles_begin_migration_abort(self, resource_group): + response = await ( + await self.client.profiles.begin_migration_abort( + resource_group_name=resource_group.name, + profile_name="str", + api_version="2025-06-01", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... diff --git a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_resource_usage_operations.py b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_resource_usage_operations.py new file mode 100644 index 000000000000..0b75189e5138 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_resource_usage_operations.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.cdn import CdnManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestCdnManagementResourceUsageOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(CdnManagementClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_resource_usage_list(self, resource_group): + response = self.client.resource_usage.list( + api_version="2025-06-01", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_resource_usage_operations_async.py b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_resource_usage_operations_async.py new file mode 100644 index 000000000000..694143a334f6 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_resource_usage_operations_async.py @@ -0,0 +1,30 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.cdn.aio import CdnManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestCdnManagementResourceUsageOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(CdnManagementClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_resource_usage_list(self, resource_group): + response = self.client.resource_usage.list( + api_version="2025-06-01", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_routes_operations.py b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_routes_operations.py new file mode 100644 index 000000000000..fa71dfbfc529 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_routes_operations.py @@ -0,0 +1,137 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.cdn import CdnManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestCdnManagementRoutesOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(CdnManagementClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_routes_list_by_endpoint(self, resource_group): + response = self.client.routes.list_by_endpoint( + resource_group_name=resource_group.name, + profile_name="str", + endpoint_name="str", + api_version="2025-06-01", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_routes_get(self, resource_group): + response = self.client.routes.get( + resource_group_name=resource_group.name, + profile_name="str", + endpoint_name="str", + route_name="str", + api_version="2025-06-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_routes_begin_create(self, resource_group): + response = self.client.routes.begin_create( + resource_group_name=resource_group.name, + profile_name="str", + endpoint_name="str", + route_name="str", + route={ + "cacheConfiguration": { + "compressionSettings": {"contentTypesToCompress": ["str"], "isCompressionEnabled": bool}, + "queryParameters": "str", + "queryStringCachingBehavior": "str", + }, + "customDomains": [{"id": "str", "isActive": bool}], + "deploymentStatus": "str", + "enabledState": "str", + "endpointName": "str", + "forwardingProtocol": "str", + "httpsRedirect": "Disabled", + "id": "str", + "linkToDefaultDomain": "Disabled", + "name": "str", + "originGroup": {"id": "str"}, + "originPath": "str", + "patternsToMatch": ["str"], + "provisioningState": "str", + "ruleSets": [{"id": "str"}], + "supportedProtocols": [["Http", "Https"]], + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + }, + api_version="2025-06-01", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_routes_begin_update(self, resource_group): + response = self.client.routes.begin_update( + resource_group_name=resource_group.name, + profile_name="str", + endpoint_name="str", + route_name="str", + route_update_properties={ + "cacheConfiguration": { + "compressionSettings": {"contentTypesToCompress": ["str"], "isCompressionEnabled": bool}, + "queryParameters": "str", + "queryStringCachingBehavior": "str", + }, + "customDomains": [{"id": "str", "isActive": bool}], + "enabledState": "str", + "endpointName": "str", + "forwardingProtocol": "str", + "httpsRedirect": "Disabled", + "linkToDefaultDomain": "Disabled", + "originGroup": {"id": "str"}, + "originPath": "str", + "patternsToMatch": ["str"], + "ruleSets": [{"id": "str"}], + "supportedProtocols": [["Http", "Https"]], + }, + api_version="2025-06-01", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_routes_begin_delete(self, resource_group): + response = self.client.routes.begin_delete( + resource_group_name=resource_group.name, + profile_name="str", + endpoint_name="str", + route_name="str", + api_version="2025-06-01", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... diff --git a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_routes_operations_async.py b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_routes_operations_async.py new file mode 100644 index 000000000000..d3f351d79914 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_routes_operations_async.py @@ -0,0 +1,144 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.cdn.aio import CdnManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestCdnManagementRoutesOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(CdnManagementClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_routes_list_by_endpoint(self, resource_group): + response = self.client.routes.list_by_endpoint( + resource_group_name=resource_group.name, + profile_name="str", + endpoint_name="str", + api_version="2025-06-01", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_routes_get(self, resource_group): + response = await self.client.routes.get( + resource_group_name=resource_group.name, + profile_name="str", + endpoint_name="str", + route_name="str", + api_version="2025-06-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_routes_begin_create(self, resource_group): + response = await ( + await self.client.routes.begin_create( + resource_group_name=resource_group.name, + profile_name="str", + endpoint_name="str", + route_name="str", + route={ + "cacheConfiguration": { + "compressionSettings": {"contentTypesToCompress": ["str"], "isCompressionEnabled": bool}, + "queryParameters": "str", + "queryStringCachingBehavior": "str", + }, + "customDomains": [{"id": "str", "isActive": bool}], + "deploymentStatus": "str", + "enabledState": "str", + "endpointName": "str", + "forwardingProtocol": "str", + "httpsRedirect": "Disabled", + "id": "str", + "linkToDefaultDomain": "Disabled", + "name": "str", + "originGroup": {"id": "str"}, + "originPath": "str", + "patternsToMatch": ["str"], + "provisioningState": "str", + "ruleSets": [{"id": "str"}], + "supportedProtocols": [["Http", "Https"]], + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + }, + api_version="2025-06-01", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_routes_begin_update(self, resource_group): + response = await ( + await self.client.routes.begin_update( + resource_group_name=resource_group.name, + profile_name="str", + endpoint_name="str", + route_name="str", + route_update_properties={ + "cacheConfiguration": { + "compressionSettings": {"contentTypesToCompress": ["str"], "isCompressionEnabled": bool}, + "queryParameters": "str", + "queryStringCachingBehavior": "str", + }, + "customDomains": [{"id": "str", "isActive": bool}], + "enabledState": "str", + "endpointName": "str", + "forwardingProtocol": "str", + "httpsRedirect": "Disabled", + "linkToDefaultDomain": "Disabled", + "originGroup": {"id": "str"}, + "originPath": "str", + "patternsToMatch": ["str"], + "ruleSets": [{"id": "str"}], + "supportedProtocols": [["Http", "Https"]], + }, + api_version="2025-06-01", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_routes_begin_delete(self, resource_group): + response = await ( + await self.client.routes.begin_delete( + resource_group_name=resource_group.name, + profile_name="str", + endpoint_name="str", + route_name="str", + api_version="2025-06-01", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... diff --git a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_rule_sets_operations.py b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_rule_sets_operations.py new file mode 100644 index 000000000000..b343f15529aa --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_rule_sets_operations.py @@ -0,0 +1,83 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.cdn import CdnManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestCdnManagementRuleSetsOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(CdnManagementClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_rule_sets_list_by_profile(self, resource_group): + response = self.client.rule_sets.list_by_profile( + resource_group_name=resource_group.name, + profile_name="str", + api_version="2025-06-01", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_rule_sets_get(self, resource_group): + response = self.client.rule_sets.get( + resource_group_name=resource_group.name, + profile_name="str", + rule_set_name="str", + api_version="2025-06-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_rule_sets_create(self, resource_group): + response = self.client.rule_sets.create( + resource_group_name=resource_group.name, + profile_name="str", + rule_set_name="str", + api_version="2025-06-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_rule_sets_begin_delete(self, resource_group): + response = self.client.rule_sets.begin_delete( + resource_group_name=resource_group.name, + profile_name="str", + rule_set_name="str", + api_version="2025-06-01", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_rule_sets_list_resource_usage(self, resource_group): + response = self.client.rule_sets.list_resource_usage( + resource_group_name=resource_group.name, + profile_name="str", + rule_set_name="str", + api_version="2025-06-01", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_rule_sets_operations_async.py b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_rule_sets_operations_async.py new file mode 100644 index 000000000000..368773723d54 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_rule_sets_operations_async.py @@ -0,0 +1,86 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.cdn.aio import CdnManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestCdnManagementRuleSetsOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(CdnManagementClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_rule_sets_list_by_profile(self, resource_group): + response = self.client.rule_sets.list_by_profile( + resource_group_name=resource_group.name, + profile_name="str", + api_version="2025-06-01", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_rule_sets_get(self, resource_group): + response = await self.client.rule_sets.get( + resource_group_name=resource_group.name, + profile_name="str", + rule_set_name="str", + api_version="2025-06-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_rule_sets_create(self, resource_group): + response = await self.client.rule_sets.create( + resource_group_name=resource_group.name, + profile_name="str", + rule_set_name="str", + api_version="2025-06-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_rule_sets_begin_delete(self, resource_group): + response = await ( + await self.client.rule_sets.begin_delete( + resource_group_name=resource_group.name, + profile_name="str", + rule_set_name="str", + api_version="2025-06-01", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_rule_sets_list_resource_usage(self, resource_group): + response = self.client.rule_sets.list_resource_usage( + resource_group_name=resource_group.name, + profile_name="str", + rule_set_name="str", + api_version="2025-06-01", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_rules_operations.py b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_rules_operations.py new file mode 100644 index 000000000000..1c2ebdae8415 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_rules_operations.py @@ -0,0 +1,115 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.cdn import CdnManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestCdnManagementRulesOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(CdnManagementClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_rules_list_by_rule_set(self, resource_group): + response = self.client.rules.list_by_rule_set( + resource_group_name=resource_group.name, + profile_name="str", + rule_set_name="str", + api_version="2025-06-01", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_rules_get(self, resource_group): + response = self.client.rules.get( + resource_group_name=resource_group.name, + profile_name="str", + rule_set_name="str", + rule_name="str", + api_version="2025-06-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_rules_begin_create(self, resource_group): + response = self.client.rules.begin_create( + resource_group_name=resource_group.name, + profile_name="str", + rule_set_name="str", + rule_name="str", + rule={ + "actions": ["delivery_rule_action"], + "conditions": ["delivery_rule_condition"], + "deploymentStatus": "str", + "id": "str", + "matchProcessingBehavior": "Continue", + "name": "str", + "order": 0, + "provisioningState": "str", + "ruleSetName": "str", + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + }, + api_version="2025-06-01", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_rules_begin_update(self, resource_group): + response = self.client.rules.begin_update( + resource_group_name=resource_group.name, + profile_name="str", + rule_set_name="str", + rule_name="str", + rule_update_properties={ + "actions": ["delivery_rule_action"], + "conditions": ["delivery_rule_condition"], + "matchProcessingBehavior": "Continue", + "order": 0, + "ruleSetName": "str", + }, + api_version="2025-06-01", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_rules_begin_delete(self, resource_group): + response = self.client.rules.begin_delete( + resource_group_name=resource_group.name, + profile_name="str", + rule_set_name="str", + rule_name="str", + api_version="2025-06-01", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... diff --git a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_rules_operations_async.py b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_rules_operations_async.py new file mode 100644 index 000000000000..ed1917a6e596 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_rules_operations_async.py @@ -0,0 +1,122 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.cdn.aio import CdnManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestCdnManagementRulesOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(CdnManagementClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_rules_list_by_rule_set(self, resource_group): + response = self.client.rules.list_by_rule_set( + resource_group_name=resource_group.name, + profile_name="str", + rule_set_name="str", + api_version="2025-06-01", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_rules_get(self, resource_group): + response = await self.client.rules.get( + resource_group_name=resource_group.name, + profile_name="str", + rule_set_name="str", + rule_name="str", + api_version="2025-06-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_rules_begin_create(self, resource_group): + response = await ( + await self.client.rules.begin_create( + resource_group_name=resource_group.name, + profile_name="str", + rule_set_name="str", + rule_name="str", + rule={ + "actions": ["delivery_rule_action"], + "conditions": ["delivery_rule_condition"], + "deploymentStatus": "str", + "id": "str", + "matchProcessingBehavior": "Continue", + "name": "str", + "order": 0, + "provisioningState": "str", + "ruleSetName": "str", + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + }, + api_version="2025-06-01", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_rules_begin_update(self, resource_group): + response = await ( + await self.client.rules.begin_update( + resource_group_name=resource_group.name, + profile_name="str", + rule_set_name="str", + rule_name="str", + rule_update_properties={ + "actions": ["delivery_rule_action"], + "conditions": ["delivery_rule_condition"], + "matchProcessingBehavior": "Continue", + "order": 0, + "ruleSetName": "str", + }, + api_version="2025-06-01", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_rules_begin_delete(self, resource_group): + response = await ( + await self.client.rules.begin_delete( + resource_group_name=resource_group.name, + profile_name="str", + rule_set_name="str", + rule_name="str", + api_version="2025-06-01", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... diff --git a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_secrets_operations.py b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_secrets_operations.py new file mode 100644 index 000000000000..5e01f843748b --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_secrets_operations.py @@ -0,0 +1,87 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.cdn import CdnManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestCdnManagementSecretsOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(CdnManagementClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_secrets_list_by_profile(self, resource_group): + response = self.client.secrets.list_by_profile( + resource_group_name=resource_group.name, + profile_name="str", + api_version="2025-06-01", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_secrets_get(self, resource_group): + response = self.client.secrets.get( + resource_group_name=resource_group.name, + profile_name="str", + secret_name="str", + api_version="2025-06-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_secrets_begin_create(self, resource_group): + response = self.client.secrets.begin_create( + resource_group_name=resource_group.name, + profile_name="str", + secret_name="str", + secret={ + "deploymentStatus": "str", + "id": "str", + "name": "str", + "parameters": "secret_parameters", + "profileName": "str", + "provisioningState": "str", + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + }, + api_version="2025-06-01", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_secrets_begin_delete(self, resource_group): + response = self.client.secrets.begin_delete( + resource_group_name=resource_group.name, + profile_name="str", + secret_name="str", + api_version="2025-06-01", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... diff --git a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_secrets_operations_async.py b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_secrets_operations_async.py new file mode 100644 index 000000000000..e2e7b45e418e --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_secrets_operations_async.py @@ -0,0 +1,92 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.cdn.aio import CdnManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestCdnManagementSecretsOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(CdnManagementClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_secrets_list_by_profile(self, resource_group): + response = self.client.secrets.list_by_profile( + resource_group_name=resource_group.name, + profile_name="str", + api_version="2025-06-01", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_secrets_get(self, resource_group): + response = await self.client.secrets.get( + resource_group_name=resource_group.name, + profile_name="str", + secret_name="str", + api_version="2025-06-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_secrets_begin_create(self, resource_group): + response = await ( + await self.client.secrets.begin_create( + resource_group_name=resource_group.name, + profile_name="str", + secret_name="str", + secret={ + "deploymentStatus": "str", + "id": "str", + "name": "str", + "parameters": "secret_parameters", + "profileName": "str", + "provisioningState": "str", + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + }, + api_version="2025-06-01", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_secrets_begin_delete(self, resource_group): + response = await ( + await self.client.secrets.begin_delete( + resource_group_name=resource_group.name, + profile_name="str", + secret_name="str", + api_version="2025-06-01", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... diff --git a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_security_policies_operations.py b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_security_policies_operations.py new file mode 100644 index 000000000000..b34dad21f126 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_security_policies_operations.py @@ -0,0 +1,101 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.cdn import CdnManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestCdnManagementSecurityPoliciesOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(CdnManagementClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_security_policies_list_by_profile(self, resource_group): + response = self.client.security_policies.list_by_profile( + resource_group_name=resource_group.name, + profile_name="str", + api_version="2025-06-01", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_security_policies_get(self, resource_group): + response = self.client.security_policies.get( + resource_group_name=resource_group.name, + profile_name="str", + security_policy_name="str", + api_version="2025-06-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_security_policies_begin_create(self, resource_group): + response = self.client.security_policies.begin_create( + resource_group_name=resource_group.name, + profile_name="str", + security_policy_name="str", + security_policy={ + "deploymentStatus": "str", + "id": "str", + "name": "str", + "parameters": "security_policy_properties_parameters", + "profileName": "str", + "provisioningState": "str", + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + }, + api_version="2025-06-01", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_security_policies_begin_patch(self, resource_group): + response = self.client.security_policies.begin_patch( + resource_group_name=resource_group.name, + profile_name="str", + security_policy_name="str", + security_policy_update_properties={"parameters": "security_policy_properties_parameters"}, + api_version="2025-06-01", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_security_policies_begin_delete(self, resource_group): + response = self.client.security_policies.begin_delete( + resource_group_name=resource_group.name, + profile_name="str", + security_policy_name="str", + api_version="2025-06-01", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... diff --git a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_security_policies_operations_async.py b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_security_policies_operations_async.py new file mode 100644 index 000000000000..a56bf2f30e9b --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_security_policies_operations_async.py @@ -0,0 +1,108 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.cdn.aio import CdnManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestCdnManagementSecurityPoliciesOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(CdnManagementClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_security_policies_list_by_profile(self, resource_group): + response = self.client.security_policies.list_by_profile( + resource_group_name=resource_group.name, + profile_name="str", + api_version="2025-06-01", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_security_policies_get(self, resource_group): + response = await self.client.security_policies.get( + resource_group_name=resource_group.name, + profile_name="str", + security_policy_name="str", + api_version="2025-06-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_security_policies_begin_create(self, resource_group): + response = await ( + await self.client.security_policies.begin_create( + resource_group_name=resource_group.name, + profile_name="str", + security_policy_name="str", + security_policy={ + "deploymentStatus": "str", + "id": "str", + "name": "str", + "parameters": "security_policy_properties_parameters", + "profileName": "str", + "provisioningState": "str", + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + }, + api_version="2025-06-01", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_security_policies_begin_patch(self, resource_group): + response = await ( + await self.client.security_policies.begin_patch( + resource_group_name=resource_group.name, + profile_name="str", + security_policy_name="str", + security_policy_update_properties={"parameters": "security_policy_properties_parameters"}, + api_version="2025-06-01", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_security_policies_begin_delete(self, resource_group): + response = await ( + await self.client.security_policies.begin_delete( + resource_group_name=resource_group.name, + profile_name="str", + security_policy_name="str", + api_version="2025-06-01", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... diff --git a/sdk/cdn/azure-mgmt-cdn/pyproject.toml b/sdk/cdn/azure-mgmt-cdn/pyproject.toml index 540da07d41af..f9e843d801e4 100644 --- a/sdk/cdn/azure-mgmt-cdn/pyproject.toml +++ b/sdk/cdn/azure-mgmt-cdn/pyproject.toml @@ -1,6 +1,88 @@ +[build-system] +requires = [ + "setuptools>=77.0.3", + "wheel", +] +build-backend = "setuptools.build_meta" + +[project] +name = "azure-mgmt-cdn" +authors = [ + { name = "Microsoft Corporation", email = "azpysdkhelp@microsoft.com" }, +] +description = "Microsoft Azure Cdn Management Client Library for Python" +license = "MIT" +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", +] +requires-python = ">=3.9" +keywords = [ + "azure", + "azure sdk", +] +dependencies = [ + "isodate>=0.6.1", + "azure-mgmt-core>=1.6.0", + "typing-extensions>=4.6.0", +] +dynamic = [ + "version", + "readme", +] + +[project.urls] +repository = "https://github.com/Azure/azure-sdk-for-python" + +[tool.setuptools.dynamic.version] +attr = "azure.mgmt.cdn._version.VERSION" + +[tool.setuptools.dynamic.readme] +file = [ + "README.md", + "CHANGELOG.md", +] +content-type = "text/markdown" + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "generated_tests*", + "samples*", + "generated_samples*", + "doc*", + "azure", + "azure.mgmt", +] + +[tool.setuptools.package-data] +pytyped = [ + "py.typed", +] + [tool.azure-sdk-build] breaking = false mypy = false pyright = false type_check_samples = false verifytypes = false + +[packaging] +package_name = "azure-mgmt-cdn" +package_pprint_name = "CDN Management" +package_doc_id = "cdn" +is_stable = true +sample_link = "" +title = "CdnManagementClient" +package_nspkg = "azure-mgmt-nspkg" +is_arm = true +need_msrestazure = false +need_azuremgmtcore = true +exclude_folders = "" diff --git a/sdk/cdn/azure-mgmt-cdn/sdk_packaging.toml b/sdk/cdn/azure-mgmt-cdn/sdk_packaging.toml deleted file mode 100644 index 115bc64b3abd..000000000000 --- a/sdk/cdn/azure-mgmt-cdn/sdk_packaging.toml +++ /dev/null @@ -1,7 +0,0 @@ -[packaging] -package_name = "azure-mgmt-cdn" -package_pprint_name = "CDN Management" -package_doc_id = "cdn" -is_stable = true -sample_link = "" -title = "CdnManagementClient" diff --git a/sdk/cdn/azure-mgmt-cdn/setup.py b/sdk/cdn/azure-mgmt-cdn/setup.py deleted file mode 100644 index c0f0a3ca2878..000000000000 --- a/sdk/cdn/azure-mgmt-cdn/setup.py +++ /dev/null @@ -1,82 +0,0 @@ -#!/usr/bin/env python - -# ------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -------------------------------------------------------------------------- - -import re -import os.path -from io import open -from setuptools import find_packages, setup - -# Change the PACKAGE_NAME only to change folder and different name -PACKAGE_NAME = "azure-mgmt-cdn" -PACKAGE_PPRINT_NAME = "CDN Management" - -# a-b-c => a/b/c -package_folder_path = PACKAGE_NAME.replace("-", "/") -# a-b-c => a.b.c -namespace_name = PACKAGE_NAME.replace("-", ".") - -# Version extraction inspired from 'requests' -with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), - "r", -) as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - -with open("README.md", encoding="utf-8") as f: - readme = f.read() -with open("CHANGELOG.md", encoding="utf-8") as f: - changelog = f.read() - -setup( - name=PACKAGE_NAME, - version=version, - description="Microsoft Azure {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=readme + "\n\n" + changelog, - long_description_content_type="text/markdown", - license="MIT License", - author="Microsoft Corporation", - author_email="azpysdkhelp@microsoft.com", - url="https://github.com/Azure/azure-sdk-for-python", - keywords="azure, azure sdk", # update with search keywords relevant to the azure service / product - classifiers=[ - "Development Status :: 5 - Production/Stable", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "azure", - "azure.mgmt", - ] - ), - include_package_data=True, - package_data={ - "pytyped": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "azure-common>=1.1", - "azure-mgmt-core>=1.3.2", - ], - python_requires=">=3.8", -) From 7ab9257c7af8178da2fa32620ff7a34b7fe1e7ec Mon Sep 17 00:00:00 2001 From: Yuchao Yan Date: Tue, 19 May 2026 14:35:45 +0800 Subject: [PATCH 2/3] generated from typespec:eb08171fefa9dc5953ec462776a45f9a944853ad --- sdk/cdn/azure-mgmt-cdn/_metadata.json | 15 +- .../azure-mgmt-cdn/apiview-properties.json | 1220 +- .../azure-mgmt-cdn/azure/mgmt/cdn/__init__.py | 6 +- .../{_cdn_management_client.py => _client.py} | 89 +- .../azure/mgmt/cdn/_configuration.py | 17 +- .../azure-mgmt-cdn/azure/mgmt/cdn/_patch.py | 36 +- .../azure/mgmt/cdn/_utils/__init__.py | 2 +- .../azure/mgmt/cdn/_utils/model_base.py | 1453 + .../azure/mgmt/cdn/_utils/serialization.py | 8 +- .../azure/mgmt/cdn/_utils/utils.py | 2 +- .../azure-mgmt-cdn/azure/mgmt/cdn/_version.py | 3 +- .../azure/mgmt/cdn/aio/__init__.py | 6 +- .../{_cdn_management_client.py => _client.py} | 89 +- .../azure/mgmt/cdn/aio/_configuration.py | 17 +- .../azure/mgmt/cdn/aio/_patch.py | 36 +- .../azure/mgmt/cdn/aio/operations/__init__.py | 57 +- .../_afd_custom_domains_operations.py | 911 - .../operations/_afd_endpoints_operations.py | 1271 - .../_afd_origin_groups_operations.py | 879 - .../aio/operations/_afd_origins_operations.py | 819 - .../operations/_afd_profiles_operations.py | 780 - .../_cdn_management_client_operations.py | 498 - .../operations/_custom_domains_operations.py | 961 - .../aio/operations/_edge_nodes_operations.py | 133 - .../aio/operations/_endpoints_operations.py | 1717 - .../operations/_log_analytics_operations.py | 561 - .../_managed_rule_sets_operations.py | 135 - .../mgmt/cdn/aio/operations/_operations.py | 18265 ++- .../operations/_origin_groups_operations.py | 820 - .../cdn/aio/operations/_origins_operations.py | 810 - .../azure/mgmt/cdn/aio/operations/_patch.py | 13 +- .../aio/operations/_policies_operations.py | 692 - .../aio/operations/_profiles_operations.py | 1981 - .../operations/_resource_usage_operations.py | 133 - .../cdn/aio/operations/_routes_operations.py | 821 - .../aio/operations/_rule_sets_operations.py | 502 - .../cdn/aio/operations/_rules_operations.py | 804 - .../cdn/aio/operations/_secrets_operations.py | 555 - .../_security_policies_operations.py | 778 - .../azure/mgmt/cdn/models/__init__.py | 88 +- ...n_management_client_enums.py => _enums.py} | 627 +- .../azure/mgmt/cdn/models/_models.py | 12291 ++ .../azure/mgmt/cdn/models/_models_py3.py | 14138 -- .../azure/mgmt/cdn/models/_patch.py | 13 +- .../azure/mgmt/cdn/operations/__init__.py | 57 +- .../_afd_custom_domains_operations.py | 1117 - .../operations/_afd_endpoints_operations.py | 1558 - .../_afd_origin_groups_operations.py | 1092 - .../cdn/operations/_afd_origins_operations.py | 1016 - .../operations/_afd_profiles_operations.py | 960 - .../_cdn_management_client_operations.py | 609 - .../operations/_custom_domains_operations.py | 1196 - .../cdn/operations/_edge_nodes_operations.py | 154 - .../cdn/operations/_endpoints_operations.py | 2084 - .../operations/_log_analytics_operations.py | 844 - .../_managed_rule_sets_operations.py | 163 - .../azure/mgmt/cdn/operations/_operations.py | 21569 ++- .../operations/_origin_groups_operations.py | 1016 - .../cdn/operations/_origins_operations.py | 1000 - .../azure/mgmt/cdn/operations/_patch.py | 13 +- .../cdn/operations/_policies_operations.py | 844 - .../cdn/operations/_profiles_operations.py | 2447 - .../operations/_resource_usage_operations.py | 159 - .../mgmt/cdn/operations/_routes_operations.py | 1024 - .../cdn/operations/_rule_sets_operations.py | 672 - .../mgmt/cdn/operations/_rules_operations.py | 987 - .../cdn/operations/_secrets_operations.py | 693 - .../_security_policies_operations.py | 956 - .../azure-mgmt-cdn/code_report_typespec.json | 107752 +++++++++++++++ .../afd_custom_domains_create.py | 11 +- .../afd_custom_domains_delete.py | 11 +- .../afd_custom_domains_get.py | 11 +- .../afd_custom_domains_list_by_profile.py | 11 +- ...custom_domains_refresh_validation_token.py | 11 +- .../afd_custom_domains_update.py | 11 +- .../generated_samples/afd_endpoints_create.py | 11 +- .../generated_samples/afd_endpoints_delete.py | 11 +- .../generated_samples/afd_endpoints_get.py | 10 +- .../afd_endpoints_list_by_profile.py | 11 +- .../afd_endpoints_list_resource_usage.py | 11 +- .../afd_endpoints_purge_content.py | 11 +- .../generated_samples/afd_endpoints_update.py | 11 +- .../afd_endpoints_validate_custom_domain.py | 11 +- .../afd_origin_groups_create.py | 10 +- .../afd_origin_groups_delete.py | 11 +- .../afd_origin_groups_get.py | 11 +- .../afd_origin_groups_list_by_profile.py | 11 +- .../afd_origin_groups_list_resource_usage.py | 11 +- .../afd_origin_groups_update.py | 10 +- .../generated_samples/afd_origins_create.py | 10 +- .../generated_samples/afd_origins_delete.py | 10 +- .../generated_samples/afd_origins_get.py | 10 +- .../afd_origins_list_by_origin_group.py | 11 +- .../generated_samples/afd_origins_update.py | 10 +- ...ofiles_check_endpoint_name_availability.py | 11 +- ...d_profiles_check_host_name_availability.py | 11 +- .../afd_profiles_list_resource_usage.py | 11 +- .../generated_samples/afd_profiles_upgrade.py | 10 +- .../afd_profiles_validate_secret.py | 10 +- .../cdn_profiles_can_migrate.py | 11 +- .../generated_samples/cdn_profiles_migrate.py | 11 +- .../check_endpoint_name_availability.py | 11 +- .../check_name_availability.py | 9 +- ...eck_name_availability_with_subscription.py | 11 +- .../custom_domains_create.py | 11 +- .../custom_domains_delete.py | 11 +- .../custom_domains_disable_custom_https.py | 11 +- ..._domains_enable_custom_https_using_byoc.py | 11 +- ...tom_https_using_cdn_managed_certificate.py | 11 +- .../generated_samples/custom_domains_get.py | 10 +- .../custom_domains_list_by_endpoint.py | 11 +- .../generated_samples/edge_nodes_list.py | 8 +- .../generated_samples/endpoints_create.py | 10 +- .../generated_samples/endpoints_delete.py | 10 +- .../generated_samples/endpoints_get.py | 10 +- .../endpoints_list_by_profile.py | 11 +- .../endpoints_list_resource_usage.py | 11 +- .../endpoints_load_content.py | 11 +- .../endpoints_purge_content.py | 11 +- .../generated_samples/endpoints_start.py | 10 +- .../generated_samples/endpoints_stop.py | 10 +- .../generated_samples/endpoints_update.py | 10 +- .../endpoints_validate_custom_domain.py | 11 +- ...g_analytics_get_log_analytics_locations.py | 11 +- ...log_analytics_get_log_analytics_metrics.py | 11 +- ...og_analytics_get_log_analytics_rankings.py | 11 +- ...g_analytics_get_log_analytics_resources.py | 11 +- ...analytics_get_waf_log_analytics_metrics.py | 11 +- ...nalytics_get_waf_log_analytics_rankings.py | 11 +- .../generated_samples/operations_list.py | 8 +- .../generated_samples/origin_groups_create.py | 10 +- .../generated_samples/origin_groups_delete.py | 11 +- .../generated_samples/origin_groups_get.py | 10 +- .../origin_groups_list_by_endpoint.py | 11 +- .../generated_samples/origin_groups_update.py | 10 +- .../generated_samples/origins_create.py | 10 +- .../generated_samples/origins_delete.py | 10 +- .../generated_samples/origins_get.py | 10 +- .../origins_list_by_endpoint.py | 11 +- .../generated_samples/origins_update.py | 10 +- .../generated_samples/profiles_can_migrate.py | 11 +- .../generated_samples/profiles_create.py | 10 +- .../generated_samples/profiles_delete.py | 10 +- .../profiles_generate_sso_uri.py | 11 +- .../generated_samples/profiles_get.py | 10 +- .../generated_samples/profiles_list.py | 10 +- .../profiles_list_by_resource_group.py | 11 +- .../profiles_list_resource_usage.py | 11 +- ...files_list_supported_optimization_types.py | 11 +- .../generated_samples/profiles_migrate.py | 10 +- .../profiles_migration_abort.py | 11 +- .../profiles_migration_commit.py | 11 +- .../generated_samples/profiles_update.py | 10 +- .../generated_samples/resource_usage_list.py | 11 +- .../generated_samples/routes_create.py | 10 +- .../generated_samples/routes_delete.py | 10 +- .../generated_samples/routes_get.py | 10 +- .../routes_list_by_endpoint.py | 11 +- .../generated_samples/routes_update.py | 10 +- .../generated_samples/rule_sets_create.py | 10 +- .../generated_samples/rule_sets_delete.py | 10 +- .../generated_samples/rule_sets_get.py | 10 +- .../rule_sets_list_by_profile.py | 11 +- .../rule_sets_list_resource_usage.py | 11 +- .../generated_samples/rules_create.py | 10 +- .../generated_samples/rules_delete.py | 10 +- .../generated_samples/rules_get.py | 10 +- .../rules_list_by_rule_set.py | 11 +- .../generated_samples/rules_update.py | 10 +- .../generated_samples/secrets_create.py | 10 +- .../generated_samples/secrets_delete.py | 10 +- .../generated_samples/secrets_get.py | 10 +- .../secrets_list_by_profile.py | 11 +- .../security_policies_create.py | 10 +- .../security_policies_delete.py | 11 +- .../security_policies_get.py | 11 +- .../security_policies_list_by_profile.py | 11 +- .../security_policies_patch.py | 10 +- .../generated_samples/validate_probe.py | 10 +- .../waf_list_managed_rule_sets.py | 11 +- .../generated_samples/waf_list_policies.py | 10 +- .../generated_samples/waf_patch_policy.py | 10 +- .../waf_policy_create_or_update.py | 10 +- .../generated_samples/waf_policy_delete.py | 10 +- .../generated_samples/waf_policy_get.py | 10 +- .../generated_tests/conftest.py | 18 +- .../{test_cdn_management.py => test_cdn.py} | 12 +- ...test_cdn_afd_custom_domains_operations.py} | 98 +- ...dn_afd_custom_domains_operations_async.py} | 102 +- ...y => test_cdn_afd_endpoints_operations.py} | 57 +- ...est_cdn_afd_endpoints_operations_async.py} | 57 +- ... test_cdn_afd_origin_groups_operations.py} | 104 +- ...cdn_afd_origin_groups_operations_async.py} | 104 +- ....py => test_cdn_afd_origins_operations.py} | 111 +- ... test_cdn_afd_origins_operations_async.py} | 111 +- ...py => test_cdn_afd_profiles_operations.py} | 13 +- ...test_cdn_afd_profiles_operations_async.py} | 13 +- ..._management_async.py => test_cdn_async.py} | 12 +- ... => test_cdn_custom_domains_operations.py} | 40 +- ...st_cdn_custom_domains_operations_async.py} | 40 +- ...s.py => test_cdn_edge_nodes_operations.py} | 12 +- ...> test_cdn_edge_nodes_operations_async.py} | 12 +- ...ns.py => test_cdn_endpoints_operations.py} | 257 +- ...=> test_cdn_endpoints_operations_async.py} | 257 +- ...y => test_cdn_log_analytics_operations.py} | 14 +- ...est_cdn_log_analytics_operations_async.py} | 14 +- ... test_cdn_managed_rule_sets_operations.py} | 12 +- ...cdn_managed_rule_sets_operations_async.py} | 12 +- ...test_cdn_management_policies_operations.py | 164 - ...t_operations.py => test_cdn_operations.py} | 12 +- ..._async.py => test_cdn_operations_async.py} | 12 +- ...y => test_cdn_origin_groups_operations.py} | 95 +- ...est_cdn_origin_groups_operations_async.py} | 95 +- ...ions.py => test_cdn_origins_operations.py} | 91 +- ...y => test_cdn_origins_operations_async.py} | 91 +- ...ync.py => test_cdn_policies_operations.py} | 108 +- .../test_cdn_policies_operations_async.py | 166 + ...ons.py => test_cdn_profiles_operations.py} | 134 +- ... => test_cdn_profiles_operations_async.py} | 154 +- ... => test_cdn_resource_usage_operations.py} | 12 +- ...st_cdn_resource_usage_operations_async.py} | 12 +- ...tions.py => test_cdn_routes_operations.py} | 109 +- ...py => test_cdn_routes_operations_async.py} | 109 +- ...ns.py => test_cdn_rule_sets_operations.py} | 35 +- ...=> test_cdn_rule_sets_operations_async.py} | 35 +- ...ations.py => test_cdn_rules_operations.py} | 65 +- ....py => test_cdn_rules_operations_async.py} | 65 +- ...ions.py => test_cdn_secrets_operations.py} | 44 +- ...y => test_cdn_secrets_operations_async.py} | 44 +- ... test_cdn_security_policies_operations.py} | 47 +- ...cdn_security_policies_operations_async.py} | 49 +- sdk/cdn/azure-mgmt-cdn/pyproject.toml | 3 +- sdk/cdn/azure-mgmt-cdn/tests/conftest.py | 3 +- .../tests/disable_test_cli_mgmt_cdn.py | 228 +- sdk/cdn/azure-mgmt-cdn/tsp-location.yaml | 4 + 235 files changed, 164981 insertions(+), 54738 deletions(-) rename sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/{_cdn_management_client.py => _client.py} (86%) create mode 100644 sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/_utils/model_base.py rename sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/{_cdn_management_client.py => _client.py} (87%) delete mode 100644 sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_afd_custom_domains_operations.py delete mode 100644 sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_afd_endpoints_operations.py delete mode 100644 sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_afd_origin_groups_operations.py delete mode 100644 sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_afd_origins_operations.py delete mode 100644 sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_afd_profiles_operations.py delete mode 100644 sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_cdn_management_client_operations.py delete mode 100644 sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_custom_domains_operations.py delete mode 100644 sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_edge_nodes_operations.py delete mode 100644 sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_endpoints_operations.py delete mode 100644 sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_log_analytics_operations.py delete mode 100644 sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_managed_rule_sets_operations.py delete mode 100644 sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_origin_groups_operations.py delete mode 100644 sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_origins_operations.py delete mode 100644 sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_policies_operations.py delete mode 100644 sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_profiles_operations.py delete mode 100644 sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_resource_usage_operations.py delete mode 100644 sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_routes_operations.py delete mode 100644 sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_rule_sets_operations.py delete mode 100644 sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_rules_operations.py delete mode 100644 sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_secrets_operations.py delete mode 100644 sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_security_policies_operations.py rename sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/{_cdn_management_client_enums.py => _enums.py} (70%) create mode 100644 sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/_models.py delete mode 100644 sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/_models_py3.py delete mode 100644 sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_afd_custom_domains_operations.py delete mode 100644 sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_afd_endpoints_operations.py delete mode 100644 sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_afd_origin_groups_operations.py delete mode 100644 sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_afd_origins_operations.py delete mode 100644 sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_afd_profiles_operations.py delete mode 100644 sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_cdn_management_client_operations.py delete mode 100644 sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_custom_domains_operations.py delete mode 100644 sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_edge_nodes_operations.py delete mode 100644 sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_endpoints_operations.py delete mode 100644 sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_log_analytics_operations.py delete mode 100644 sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_managed_rule_sets_operations.py delete mode 100644 sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_origin_groups_operations.py delete mode 100644 sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_origins_operations.py delete mode 100644 sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_policies_operations.py delete mode 100644 sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_profiles_operations.py delete mode 100644 sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_resource_usage_operations.py delete mode 100644 sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_routes_operations.py delete mode 100644 sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_rule_sets_operations.py delete mode 100644 sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_rules_operations.py delete mode 100644 sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_secrets_operations.py delete mode 100644 sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_security_policies_operations.py create mode 100644 sdk/cdn/azure-mgmt-cdn/code_report_typespec.json rename sdk/cdn/azure-mgmt-cdn/generated_tests/{test_cdn_management.py => test_cdn.py} (85%) rename sdk/cdn/azure-mgmt-cdn/generated_tests/{test_cdn_management_afd_custom_domains_operations.py => test_cdn_afd_custom_domains_operations.py} (68%) rename sdk/cdn/azure-mgmt-cdn/generated_tests/{test_cdn_management_afd_custom_domains_operations_async.py => test_cdn_afd_custom_domains_operations_async.py} (68%) rename sdk/cdn/azure-mgmt-cdn/generated_tests/{test_cdn_management_afd_endpoints_operations.py => test_cdn_afd_endpoints_operations.py} (84%) rename sdk/cdn/azure-mgmt-cdn/generated_tests/{test_cdn_management_afd_endpoints_operations_async.py => test_cdn_afd_endpoints_operations_async.py} (84%) rename sdk/cdn/azure-mgmt-cdn/generated_tests/{test_cdn_management_afd_origin_groups_operations.py => test_cdn_afd_origin_groups_operations.py} (66%) rename sdk/cdn/azure-mgmt-cdn/generated_tests/{test_cdn_management_afd_origin_groups_operations_async.py => test_cdn_afd_origin_groups_operations_async.py} (67%) rename sdk/cdn/azure-mgmt-cdn/generated_tests/{test_cdn_management_afd_origins_operations.py => test_cdn_afd_origins_operations.py} (66%) rename sdk/cdn/azure-mgmt-cdn/generated_tests/{test_cdn_management_afd_origins_operations_async.py => test_cdn_afd_origins_operations_async.py} (66%) rename sdk/cdn/azure-mgmt-cdn/generated_tests/{test_cdn_management_afd_profiles_operations.py => test_cdn_afd_profiles_operations.py} (88%) rename sdk/cdn/azure-mgmt-cdn/generated_tests/{test_cdn_management_afd_profiles_operations_async.py => test_cdn_afd_profiles_operations_async.py} (88%) rename sdk/cdn/azure-mgmt-cdn/generated_tests/{test_cdn_management_async.py => test_cdn_async.py} (85%) rename sdk/cdn/azure-mgmt-cdn/generated_tests/{test_cdn_management_custom_domains_operations.py => test_cdn_custom_domains_operations.py} (87%) rename sdk/cdn/azure-mgmt-cdn/generated_tests/{test_cdn_management_custom_domains_operations_async.py => test_cdn_custom_domains_operations_async.py} (87%) rename sdk/cdn/azure-mgmt-cdn/generated_tests/{test_cdn_management_edge_nodes_operations.py => test_cdn_edge_nodes_operations.py} (73%) rename sdk/cdn/azure-mgmt-cdn/generated_tests/{test_cdn_management_edge_nodes_operations_async.py => test_cdn_edge_nodes_operations_async.py} (73%) rename sdk/cdn/azure-mgmt-cdn/generated_tests/{test_cdn_management_endpoints_operations.py => test_cdn_endpoints_operations.py} (54%) rename sdk/cdn/azure-mgmt-cdn/generated_tests/{test_cdn_management_endpoints_operations_async.py => test_cdn_endpoints_operations_async.py} (54%) rename sdk/cdn/azure-mgmt-cdn/generated_tests/{test_cdn_management_log_analytics_operations.py => test_cdn_log_analytics_operations.py} (89%) rename sdk/cdn/azure-mgmt-cdn/generated_tests/{test_cdn_management_log_analytics_operations_async.py => test_cdn_log_analytics_operations_async.py} (88%) rename sdk/cdn/azure-mgmt-cdn/generated_tests/{test_cdn_management_managed_rule_sets_operations.py => test_cdn_managed_rule_sets_operations.py} (72%) rename sdk/cdn/azure-mgmt-cdn/generated_tests/{test_cdn_management_managed_rule_sets_operations_async.py => test_cdn_managed_rule_sets_operations_async.py} (72%) delete mode 100644 sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_policies_operations.py rename sdk/cdn/azure-mgmt-cdn/generated_tests/{test_cdn_management_operations.py => test_cdn_operations.py} (73%) rename sdk/cdn/azure-mgmt-cdn/generated_tests/{test_cdn_management_operations_async.py => test_cdn_operations_async.py} (73%) rename sdk/cdn/azure-mgmt-cdn/generated_tests/{test_cdn_management_origin_groups_operations.py => test_cdn_origin_groups_operations.py} (67%) rename sdk/cdn/azure-mgmt-cdn/generated_tests/{test_cdn_management_origin_groups_operations_async.py => test_cdn_origin_groups_operations_async.py} (67%) rename sdk/cdn/azure-mgmt-cdn/generated_tests/{test_cdn_management_origins_operations.py => test_cdn_origins_operations.py} (71%) rename sdk/cdn/azure-mgmt-cdn/generated_tests/{test_cdn_management_origins_operations_async.py => test_cdn_origins_operations_async.py} (71%) rename sdk/cdn/azure-mgmt-cdn/generated_tests/{test_cdn_management_policies_operations_async.py => test_cdn_policies_operations.py} (68%) create mode 100644 sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_policies_operations_async.py rename sdk/cdn/azure-mgmt-cdn/generated_tests/{test_cdn_management_profiles_operations.py => test_cdn_profiles_operations.py} (84%) rename sdk/cdn/azure-mgmt-cdn/generated_tests/{test_cdn_management_profiles_operations_async.py => test_cdn_profiles_operations_async.py} (84%) rename sdk/cdn/azure-mgmt-cdn/generated_tests/{test_cdn_management_resource_usage_operations.py => test_cdn_resource_usage_operations.py} (72%) rename sdk/cdn/azure-mgmt-cdn/generated_tests/{test_cdn_management_resource_usage_operations_async.py => test_cdn_resource_usage_operations_async.py} (72%) rename sdk/cdn/azure-mgmt-cdn/generated_tests/{test_cdn_management_routes_operations.py => test_cdn_routes_operations.py} (63%) rename sdk/cdn/azure-mgmt-cdn/generated_tests/{test_cdn_management_routes_operations_async.py => test_cdn_routes_operations_async.py} (63%) rename sdk/cdn/azure-mgmt-cdn/generated_tests/{test_cdn_management_rule_sets_operations.py => test_cdn_rule_sets_operations.py} (86%) rename sdk/cdn/azure-mgmt-cdn/generated_tests/{test_cdn_management_rule_sets_operations_async.py => test_cdn_rule_sets_operations_async.py} (86%) rename sdk/cdn/azure-mgmt-cdn/generated_tests/{test_cdn_management_rules_operations.py => test_cdn_rules_operations.py} (78%) rename sdk/cdn/azure-mgmt-cdn/generated_tests/{test_cdn_management_rules_operations_async.py => test_cdn_rules_operations_async.py} (78%) rename sdk/cdn/azure-mgmt-cdn/generated_tests/{test_cdn_management_secrets_operations.py => test_cdn_secrets_operations.py} (83%) rename sdk/cdn/azure-mgmt-cdn/generated_tests/{test_cdn_management_secrets_operations_async.py => test_cdn_secrets_operations_async.py} (83%) rename sdk/cdn/azure-mgmt-cdn/generated_tests/{test_cdn_management_security_policies_operations.py => test_cdn_security_policies_operations.py} (82%) rename sdk/cdn/azure-mgmt-cdn/generated_tests/{test_cdn_management_security_policies_operations_async.py => test_cdn_security_policies_operations_async.py} (82%) create mode 100644 sdk/cdn/azure-mgmt-cdn/tsp-location.yaml diff --git a/sdk/cdn/azure-mgmt-cdn/_metadata.json b/sdk/cdn/azure-mgmt-cdn/_metadata.json index ef9739b12669..e1e3f13a18f5 100644 --- a/sdk/cdn/azure-mgmt-cdn/_metadata.json +++ b/sdk/cdn/azure-mgmt-cdn/_metadata.json @@ -1,11 +1,10 @@ { - "commit": "9dcf0e13ae13d5b5abbdcd7429272412975300a3", + "apiVersion": "2025-06-01", + "apiVersions": { + "Microsoft.Cdn": "2025-06-01" + }, + "commit": "eb08171fefa9dc5953ec462776a45f9a944853ad", "repository_url": "https://github.com/Azure/azure-rest-api-specs", - "autorest": "3.10.2", - "use": [ - "@autorest/python@6.50.0", - "@autorest/modelerfour@4.27.0" - ], - "autorest_command": "autorest specification/cdn/resource-manager/readme.md --generate-sample=True --generate-test=True --include-x-ms-examples-original-file=True --package-mode=azure-mgmt --python --python-sdks-folder=C:\\dev\\worktrees\\sdk-azure-mgmt-cdn\\sdk --use=@autorest/python@6.50.0 --use=@autorest/modelerfour@4.27.0 --version=3.10.2 --version-tolerant=False", - "readme": "specification/cdn/resource-manager/readme.md" + "typespec_src": "specification/cdn/resource-manager/Microsoft.Cdn/Cdn", + "emitterVersion": "0.62.1" } \ No newline at end of file diff --git a/sdk/cdn/azure-mgmt-cdn/apiview-properties.json b/sdk/cdn/azure-mgmt-cdn/apiview-properties.json index daf6c078f394..4eb9e48dd021 100644 --- a/sdk/cdn/azure-mgmt-cdn/apiview-properties.json +++ b/sdk/cdn/azure-mgmt-cdn/apiview-properties.json @@ -1,618 +1,608 @@ { - "CrossLanguagePackageId": null, + "CrossLanguagePackageId": "Microsoft.Cdn", "CrossLanguageDefinitionId": { - "azure.mgmt.cdn.models.ActivatedResourceReference": null, - "azure.mgmt.cdn.models.Resource": null, - "azure.mgmt.cdn.models.ProxyResource": null, - "azure.mgmt.cdn.models.AFDDomain": null, - "azure.mgmt.cdn.models.AFDDomainHttpsCustomizedCipherSuiteSet": null, - "azure.mgmt.cdn.models.AFDDomainHttpsParameters": null, - "azure.mgmt.cdn.models.AFDDomainListResult": null, - "azure.mgmt.cdn.models.AFDStateProperties": null, - "azure.mgmt.cdn.models.AFDDomainUpdatePropertiesParameters": null, - "azure.mgmt.cdn.models.AFDDomainProperties": null, - "azure.mgmt.cdn.models.AFDDomainUpdateParameters": null, - "azure.mgmt.cdn.models.TrackedResource": null, - "azure.mgmt.cdn.models.AFDEndpoint": null, - "azure.mgmt.cdn.models.AFDEndpointListResult": null, - "azure.mgmt.cdn.models.AFDEndpointPropertiesUpdateParameters": null, - "azure.mgmt.cdn.models.AFDEndpointProperties": null, - "azure.mgmt.cdn.models.AFDEndpointUpdateParameters": null, - "azure.mgmt.cdn.models.AFDOrigin": null, - "azure.mgmt.cdn.models.AFDOriginGroup": null, - "azure.mgmt.cdn.models.AFDOriginGroupListResult": null, - "azure.mgmt.cdn.models.AFDOriginGroupUpdatePropertiesParameters": null, - "azure.mgmt.cdn.models.AFDOriginGroupProperties": null, - "azure.mgmt.cdn.models.AFDOriginGroupUpdateParameters": null, - "azure.mgmt.cdn.models.AFDOriginListResult": null, - "azure.mgmt.cdn.models.AFDOriginUpdatePropertiesParameters": null, - "azure.mgmt.cdn.models.AFDOriginProperties": null, - "azure.mgmt.cdn.models.AFDOriginUpdateParameters": null, - "azure.mgmt.cdn.models.AfdPurgeParameters": null, - "azure.mgmt.cdn.models.AfdRouteCacheConfiguration": null, - "azure.mgmt.cdn.models.Certificate": null, - "azure.mgmt.cdn.models.AzureFirstPartyManagedCertificate": null, - "azure.mgmt.cdn.models.SecretParameters": null, - "azure.mgmt.cdn.models.AzureFirstPartyManagedCertificateParameters": null, - "azure.mgmt.cdn.models.CacheConfiguration": null, - "azure.mgmt.cdn.models.DeliveryRuleActionParameters": null, - "azure.mgmt.cdn.models.CacheExpirationActionParameters": null, - "azure.mgmt.cdn.models.CacheKeyQueryStringActionParameters": null, - "azure.mgmt.cdn.models.CanMigrateParameters": null, - "azure.mgmt.cdn.models.CanMigrateResult": null, - "azure.mgmt.cdn.models.CertificateSourceParameters": null, - "azure.mgmt.cdn.models.CdnCertificateSourceParameters": null, - "azure.mgmt.cdn.models.CdnEndpoint": null, - "azure.mgmt.cdn.models.CustomDomainHttpsParameters": null, - "azure.mgmt.cdn.models.CdnManagedHttpsParameters": null, - "azure.mgmt.cdn.models.CdnMigrationToAfdParameters": null, - "azure.mgmt.cdn.models.CdnWebApplicationFirewallPolicy": null, - "azure.mgmt.cdn.models.CdnWebApplicationFirewallPolicyList": null, - "azure.mgmt.cdn.models.CdnWebApplicationFirewallPolicyPatchParameters": null, - "azure.mgmt.cdn.models.CheckEndpointNameAvailabilityInput": null, - "azure.mgmt.cdn.models.CheckEndpointNameAvailabilityOutput": null, - "azure.mgmt.cdn.models.CheckHostNameAvailabilityInput": null, - "azure.mgmt.cdn.models.CheckNameAvailabilityInput": null, - "azure.mgmt.cdn.models.CheckNameAvailabilityOutput": null, - "azure.mgmt.cdn.models.CidrIpAddress": null, - "azure.mgmt.cdn.models.DeliveryRuleConditionParameters": null, - "azure.mgmt.cdn.models.ClientPortMatchConditionParameters": null, - "azure.mgmt.cdn.models.Components18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsPropertiesDataItems": null, - "azure.mgmt.cdn.models.Components1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsPropertiesDataItems": null, - "azure.mgmt.cdn.models.ComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItems": null, - "azure.mgmt.cdn.models.CompressionSettings": null, - "azure.mgmt.cdn.models.ContinentsResponse": null, - "azure.mgmt.cdn.models.ContinentsResponseContinentsItem": null, - "azure.mgmt.cdn.models.ContinentsResponseCountryOrRegionsItem": null, - "azure.mgmt.cdn.models.CookiesMatchConditionParameters": null, - "azure.mgmt.cdn.models.CustomDomain": null, - "azure.mgmt.cdn.models.CustomDomainListResult": null, - "azure.mgmt.cdn.models.CustomDomainParameters": null, - "azure.mgmt.cdn.models.CustomerCertificate": null, - "azure.mgmt.cdn.models.CustomerCertificateParameters": null, - "azure.mgmt.cdn.models.CustomRule": null, - "azure.mgmt.cdn.models.CustomRuleList": null, - "azure.mgmt.cdn.models.DeepCreatedCustomDomain": null, - "azure.mgmt.cdn.models.DeepCreatedOrigin": null, - "azure.mgmt.cdn.models.DeepCreatedOriginGroup": null, - "azure.mgmt.cdn.models.DeliveryRule": null, - "azure.mgmt.cdn.models.DeliveryRuleAction": null, - "azure.mgmt.cdn.models.DeliveryRuleCacheExpirationAction": null, - "azure.mgmt.cdn.models.DeliveryRuleCacheKeyQueryStringAction": null, - "azure.mgmt.cdn.models.DeliveryRuleCondition": null, - "azure.mgmt.cdn.models.DeliveryRuleClientPortCondition": null, - "azure.mgmt.cdn.models.DeliveryRuleCookiesCondition": null, - "azure.mgmt.cdn.models.DeliveryRuleHostNameCondition": null, - "azure.mgmt.cdn.models.DeliveryRuleHttpVersionCondition": null, - "azure.mgmt.cdn.models.DeliveryRuleIsDeviceCondition": null, - "azure.mgmt.cdn.models.DeliveryRulePostArgsCondition": null, - "azure.mgmt.cdn.models.DeliveryRuleQueryStringCondition": null, - "azure.mgmt.cdn.models.DeliveryRuleRemoteAddressCondition": null, - "azure.mgmt.cdn.models.DeliveryRuleRequestBodyCondition": null, - "azure.mgmt.cdn.models.DeliveryRuleRequestHeaderAction": null, - "azure.mgmt.cdn.models.DeliveryRuleRequestHeaderCondition": null, - "azure.mgmt.cdn.models.DeliveryRuleRequestMethodCondition": null, - "azure.mgmt.cdn.models.DeliveryRuleRequestSchemeCondition": null, - "azure.mgmt.cdn.models.DeliveryRuleRequestUriCondition": null, - "azure.mgmt.cdn.models.DeliveryRuleResponseHeaderAction": null, - "azure.mgmt.cdn.models.DeliveryRuleRouteConfigurationOverrideAction": null, - "azure.mgmt.cdn.models.DeliveryRuleServerPortCondition": null, - "azure.mgmt.cdn.models.DeliveryRuleSocketAddrCondition": null, - "azure.mgmt.cdn.models.DeliveryRuleSslProtocolCondition": null, - "azure.mgmt.cdn.models.DeliveryRuleUrlFileExtensionCondition": null, - "azure.mgmt.cdn.models.DeliveryRuleUrlFileNameCondition": null, - "azure.mgmt.cdn.models.DeliveryRuleUrlPathCondition": null, - "azure.mgmt.cdn.models.DimensionProperties": null, - "azure.mgmt.cdn.models.DomainValidationProperties": null, - "azure.mgmt.cdn.models.EdgeNode": null, - "azure.mgmt.cdn.models.EdgenodeResult": null, - "azure.mgmt.cdn.models.Endpoint": null, - "azure.mgmt.cdn.models.EndpointListResult": null, - "azure.mgmt.cdn.models.EndpointPropertiesUpdateParameters": null, - "azure.mgmt.cdn.models.EndpointProperties": null, - "azure.mgmt.cdn.models.EndpointPropertiesUpdateParametersDeliveryPolicy": null, - "azure.mgmt.cdn.models.EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink": null, - "azure.mgmt.cdn.models.EndpointUpdateParameters": null, - "azure.mgmt.cdn.models.ErrorAdditionalInfo": null, - "azure.mgmt.cdn.models.ErrorDetail": null, - "azure.mgmt.cdn.models.ErrorResponse": null, - "azure.mgmt.cdn.models.GeoFilter": null, - "azure.mgmt.cdn.models.HeaderActionParameters": null, - "azure.mgmt.cdn.models.HealthProbeParameters": null, - "azure.mgmt.cdn.models.HostNameMatchConditionParameters": null, - "azure.mgmt.cdn.models.HttpErrorRangeParameters": null, - "azure.mgmt.cdn.models.HttpVersionMatchConditionParameters": null, - "azure.mgmt.cdn.models.IpAddressGroup": null, - "azure.mgmt.cdn.models.IsDeviceMatchConditionParameters": null, - "azure.mgmt.cdn.models.KeyVaultCertificateSourceParameters": null, - "azure.mgmt.cdn.models.KeyVaultSigningKeyParameters": null, - "azure.mgmt.cdn.models.LoadBalancingSettingsParameters": null, - "azure.mgmt.cdn.models.LoadParameters": null, - "azure.mgmt.cdn.models.LogSpecification": null, - "azure.mgmt.cdn.models.ManagedCertificate": null, - "azure.mgmt.cdn.models.ManagedCertificateParameters": null, - "azure.mgmt.cdn.models.ManagedRuleDefinition": null, - "azure.mgmt.cdn.models.ManagedRuleGroupDefinition": null, - "azure.mgmt.cdn.models.ManagedRuleGroupOverride": null, - "azure.mgmt.cdn.models.ManagedRuleOverride": null, - "azure.mgmt.cdn.models.ManagedRuleSet": null, - "azure.mgmt.cdn.models.ManagedRuleSetDefinition": null, - "azure.mgmt.cdn.models.ManagedRuleSetDefinitionList": null, - "azure.mgmt.cdn.models.ManagedRuleSetList": null, - "azure.mgmt.cdn.models.ManagedServiceIdentity": null, - "azure.mgmt.cdn.models.MatchCondition": null, - "azure.mgmt.cdn.models.MetricAvailability": null, - "azure.mgmt.cdn.models.MetricSpecification": null, - "azure.mgmt.cdn.models.MetricsResponse": null, - "azure.mgmt.cdn.models.MetricsResponseSeriesItem": null, - "azure.mgmt.cdn.models.MetricsResponseSeriesPropertiesItemsItem": null, - "azure.mgmt.cdn.models.MigrateResult": null, - "azure.mgmt.cdn.models.MigrationEndpointMapping": null, - "azure.mgmt.cdn.models.MigrationErrorType": null, - "azure.mgmt.cdn.models.MigrationParameters": null, - "azure.mgmt.cdn.models.MigrationWebApplicationFirewallMapping": null, - "azure.mgmt.cdn.models.Operation": null, - "azure.mgmt.cdn.models.OperationDisplay": null, - "azure.mgmt.cdn.models.OperationsListResult": null, - "azure.mgmt.cdn.models.Origin": null, - "azure.mgmt.cdn.models.OriginAuthenticationProperties": null, - "azure.mgmt.cdn.models.OriginGroup": null, - "azure.mgmt.cdn.models.OriginGroupListResult": null, - "azure.mgmt.cdn.models.OriginGroupOverride": null, - "azure.mgmt.cdn.models.OriginGroupOverrideAction": null, - "azure.mgmt.cdn.models.OriginGroupOverrideActionParameters": null, - "azure.mgmt.cdn.models.OriginGroupUpdatePropertiesParameters": null, - "azure.mgmt.cdn.models.OriginGroupProperties": null, - "azure.mgmt.cdn.models.OriginGroupUpdateParameters": null, - "azure.mgmt.cdn.models.OriginListResult": null, - "azure.mgmt.cdn.models.OriginUpdatePropertiesParameters": null, - "azure.mgmt.cdn.models.OriginProperties": null, - "azure.mgmt.cdn.models.OriginUpdateParameters": null, - "azure.mgmt.cdn.models.PolicySettings": null, - "azure.mgmt.cdn.models.PostArgsMatchConditionParameters": null, - "azure.mgmt.cdn.models.Profile": null, - "azure.mgmt.cdn.models.ProfileChangeSkuWafMapping": null, - "azure.mgmt.cdn.models.ProfileListResult": null, - "azure.mgmt.cdn.models.ProfileLogScrubbing": null, - "azure.mgmt.cdn.models.ProfileScrubbingRules": null, - "azure.mgmt.cdn.models.ProfileUpdateParameters": null, - "azure.mgmt.cdn.models.ProfileUpgradeParameters": null, - "azure.mgmt.cdn.models.PurgeParameters": null, - "azure.mgmt.cdn.models.QueryStringMatchConditionParameters": null, - "azure.mgmt.cdn.models.RankingsResponse": null, - "azure.mgmt.cdn.models.RankingsResponseTablesItem": null, - "azure.mgmt.cdn.models.RankingsResponseTablesPropertiesItemsItem": null, - "azure.mgmt.cdn.models.RankingsResponseTablesPropertiesItemsMetricsItem": null, - "azure.mgmt.cdn.models.RateLimitRule": null, - "azure.mgmt.cdn.models.RateLimitRuleList": null, - "azure.mgmt.cdn.models.RemoteAddressMatchConditionParameters": null, - "azure.mgmt.cdn.models.RequestBodyMatchConditionParameters": null, - "azure.mgmt.cdn.models.RequestHeaderMatchConditionParameters": null, - "azure.mgmt.cdn.models.RequestMethodMatchConditionParameters": null, - "azure.mgmt.cdn.models.RequestSchemeMatchConditionParameters": null, - "azure.mgmt.cdn.models.RequestUriMatchConditionParameters": null, - "azure.mgmt.cdn.models.ResourceReference": null, - "azure.mgmt.cdn.models.ResourcesResponse": null, - "azure.mgmt.cdn.models.ResourcesResponseCustomDomainsItem": null, - "azure.mgmt.cdn.models.ResourcesResponseEndpointsItem": null, - "azure.mgmt.cdn.models.ResourcesResponseEndpointsPropertiesItemsItem": null, - "azure.mgmt.cdn.models.ResourceUsage": null, - "azure.mgmt.cdn.models.ResourceUsageListResult": null, - "azure.mgmt.cdn.models.ResponseBasedOriginErrorDetectionParameters": null, - "azure.mgmt.cdn.models.Route": null, - "azure.mgmt.cdn.models.RouteConfigurationOverrideActionParameters": null, - "azure.mgmt.cdn.models.RouteListResult": null, - "azure.mgmt.cdn.models.RouteUpdatePropertiesParameters": null, - "azure.mgmt.cdn.models.RouteProperties": null, - "azure.mgmt.cdn.models.RouteUpdateParameters": null, - "azure.mgmt.cdn.models.Rule": null, - "azure.mgmt.cdn.models.RuleListResult": null, - "azure.mgmt.cdn.models.RuleUpdatePropertiesParameters": null, - "azure.mgmt.cdn.models.RuleProperties": null, - "azure.mgmt.cdn.models.RuleSet": null, - "azure.mgmt.cdn.models.RuleSetListResult": null, - "azure.mgmt.cdn.models.RuleSetProperties": null, - "azure.mgmt.cdn.models.RuleUpdateParameters": null, - "azure.mgmt.cdn.models.Secret": null, - "azure.mgmt.cdn.models.SecretListResult": null, - "azure.mgmt.cdn.models.SecretProperties": null, - "azure.mgmt.cdn.models.SecurityPolicy": null, - "azure.mgmt.cdn.models.SecurityPolicyListResult": null, - "azure.mgmt.cdn.models.SecurityPolicyProperties": null, - "azure.mgmt.cdn.models.SecurityPolicyPropertiesParameters": null, - "azure.mgmt.cdn.models.SecurityPolicyUpdateParameters": null, - "azure.mgmt.cdn.models.SecurityPolicyWebApplicationFirewallAssociation": null, - "azure.mgmt.cdn.models.SecurityPolicyWebApplicationFirewallParameters": null, - "azure.mgmt.cdn.models.ServerPortMatchConditionParameters": null, - "azure.mgmt.cdn.models.ServiceSpecification": null, - "azure.mgmt.cdn.models.SharedPrivateLinkResourceProperties": null, - "azure.mgmt.cdn.models.Sku": null, - "azure.mgmt.cdn.models.SocketAddrMatchConditionParameters": null, - "azure.mgmt.cdn.models.SslProtocolMatchConditionParameters": null, - "azure.mgmt.cdn.models.SsoUri": null, - "azure.mgmt.cdn.models.SupportedOptimizationTypesListResult": null, - "azure.mgmt.cdn.models.SystemData": null, - "azure.mgmt.cdn.models.UrlFileExtensionMatchConditionParameters": null, - "azure.mgmt.cdn.models.UrlFileNameMatchConditionParameters": null, - "azure.mgmt.cdn.models.UrlPathMatchConditionParameters": null, - "azure.mgmt.cdn.models.UrlRedirectAction": null, - "azure.mgmt.cdn.models.UrlRedirectActionParameters": null, - "azure.mgmt.cdn.models.UrlRewriteAction": null, - "azure.mgmt.cdn.models.UrlRewriteActionParameters": null, - "azure.mgmt.cdn.models.UrlSigningAction": null, - "azure.mgmt.cdn.models.UrlSigningActionParameters": null, - "azure.mgmt.cdn.models.UrlSigningKey": null, - "azure.mgmt.cdn.models.UrlSigningKeyParameters": null, - "azure.mgmt.cdn.models.UrlSigningParamIdentifier": null, - "azure.mgmt.cdn.models.Usage": null, - "azure.mgmt.cdn.models.UsageName": null, - "azure.mgmt.cdn.models.UsagesListResult": null, - "azure.mgmt.cdn.models.UserAssignedIdentity": null, - "azure.mgmt.cdn.models.UserManagedHttpsParameters": null, - "azure.mgmt.cdn.models.ValidateCustomDomainInput": null, - "azure.mgmt.cdn.models.ValidateCustomDomainOutput": null, - "azure.mgmt.cdn.models.ValidateProbeInput": null, - "azure.mgmt.cdn.models.ValidateProbeOutput": null, - "azure.mgmt.cdn.models.ValidateSecretInput": null, - "azure.mgmt.cdn.models.ValidateSecretOutput": null, - "azure.mgmt.cdn.models.ValidationToken": null, - "azure.mgmt.cdn.models.WafMetricsResponse": null, - "azure.mgmt.cdn.models.WafMetricsResponseSeriesItem": null, - "azure.mgmt.cdn.models.WafMetricsResponseSeriesPropertiesItemsItem": null, - "azure.mgmt.cdn.models.WafRankingsResponse": null, - "azure.mgmt.cdn.models.WafRankingsResponseDataItem": null, - "azure.mgmt.cdn.models.UsageUnit": null, - "azure.mgmt.cdn.models.ScrubbingRuleEntryMatchVariable": null, - "azure.mgmt.cdn.models.ScrubbingRuleEntryMatchOperator": null, - "azure.mgmt.cdn.models.ScrubbingRuleEntryState": null, - "azure.mgmt.cdn.models.AfdCustomizedCipherSuiteForTls12": null, - "azure.mgmt.cdn.models.AfdCustomizedCipherSuiteForTls13": null, - "azure.mgmt.cdn.models.CreatedByType": null, - "azure.mgmt.cdn.models.AfdCertificateType": null, - "azure.mgmt.cdn.models.AfdCipherSuiteSetType": null, - "azure.mgmt.cdn.models.AfdMinimumTlsVersion": null, - "azure.mgmt.cdn.models.AfdProvisioningState": null, - "azure.mgmt.cdn.models.DeploymentStatus": null, - "azure.mgmt.cdn.models.DomainValidationState": null, - "azure.mgmt.cdn.models.EnabledState": null, - "azure.mgmt.cdn.models.AutoGeneratedDomainNameLabelScope": null, - "azure.mgmt.cdn.models.HealthProbeRequestType": null, - "azure.mgmt.cdn.models.ProbeProtocol": null, - "azure.mgmt.cdn.models.OriginAuthenticationType": null, - "azure.mgmt.cdn.models.SharedPrivateLinkResourceStatus": null, - "azure.mgmt.cdn.models.AFDEndpointProtocols": null, - "azure.mgmt.cdn.models.AfdQueryStringCachingBehavior": null, - "azure.mgmt.cdn.models.ForwardingProtocol": null, - "azure.mgmt.cdn.models.LinkToDefaultDomain": null, - "azure.mgmt.cdn.models.HttpsRedirect": null, - "azure.mgmt.cdn.models.MatchVariable": null, - "azure.mgmt.cdn.models.DeliveryRuleConditionParametersType": null, - "azure.mgmt.cdn.models.CookiesOperator": null, - "azure.mgmt.cdn.models.Transform": null, - "azure.mgmt.cdn.models.HostNameOperator": null, - "azure.mgmt.cdn.models.HttpVersionOperator": null, - "azure.mgmt.cdn.models.IsDeviceOperator": null, - "azure.mgmt.cdn.models.IsDeviceMatchValue": null, - "azure.mgmt.cdn.models.PostArgsOperator": null, - "azure.mgmt.cdn.models.QueryStringOperator": null, - "azure.mgmt.cdn.models.RemoteAddressOperator": null, - "azure.mgmt.cdn.models.RequestBodyOperator": null, - "azure.mgmt.cdn.models.RequestHeaderOperator": null, - "azure.mgmt.cdn.models.RequestMethodOperator": null, - "azure.mgmt.cdn.models.RequestMethodMatchValue": null, - "azure.mgmt.cdn.models.RequestSchemeMatchConditionParametersOperator": null, - "azure.mgmt.cdn.models.RequestSchemeMatchValue": null, - "azure.mgmt.cdn.models.RequestUriOperator": null, - "azure.mgmt.cdn.models.ServerPortOperator": null, - "azure.mgmt.cdn.models.SocketAddrOperator": null, - "azure.mgmt.cdn.models.SslProtocolOperator": null, - "azure.mgmt.cdn.models.SslProtocol": null, - "azure.mgmt.cdn.models.UrlFileExtensionOperator": null, - "azure.mgmt.cdn.models.UrlFileNameOperator": null, - "azure.mgmt.cdn.models.UrlPathOperator": null, - "azure.mgmt.cdn.models.ClientPortOperator": null, - "azure.mgmt.cdn.models.DeliveryRuleActionEnum": null, - "azure.mgmt.cdn.models.DeliveryRuleActionParametersType": null, - "azure.mgmt.cdn.models.QueryStringBehavior": null, - "azure.mgmt.cdn.models.HeaderAction": null, - "azure.mgmt.cdn.models.RuleQueryStringCachingBehavior": null, - "azure.mgmt.cdn.models.RuleIsCompressionEnabled": null, - "azure.mgmt.cdn.models.RuleCacheBehavior": null, - "azure.mgmt.cdn.models.RedirectType": null, - "azure.mgmt.cdn.models.DestinationProtocol": null, - "azure.mgmt.cdn.models.Algorithm": null, - "azure.mgmt.cdn.models.ParamIndicator": null, - "azure.mgmt.cdn.models.CacheBehavior": null, - "azure.mgmt.cdn.models.CacheType": null, - "azure.mgmt.cdn.models.MatchProcessingBehavior": null, - "azure.mgmt.cdn.models.SecurityPolicyType": null, - "azure.mgmt.cdn.models.SecretType": null, - "azure.mgmt.cdn.models.LogMetric": null, - "azure.mgmt.cdn.models.LogMetricsGroupBy": null, - "azure.mgmt.cdn.models.MetricsSeriesUnit": null, - "azure.mgmt.cdn.models.LogRanking": null, - "azure.mgmt.cdn.models.LogRankingMetric": null, - "azure.mgmt.cdn.models.WafMetric": null, - "azure.mgmt.cdn.models.WafAction": null, - "azure.mgmt.cdn.models.WafRankingGroupBy": null, - "azure.mgmt.cdn.models.WafRuleType": null, - "azure.mgmt.cdn.models.WafMetricsSeriesUnit": null, - "azure.mgmt.cdn.models.WafRankingType": null, - "azure.mgmt.cdn.models.SkuName": null, - "azure.mgmt.cdn.models.ManagedServiceIdentityType": null, - "azure.mgmt.cdn.models.ProfileResourceState": null, - "azure.mgmt.cdn.models.ProfileProvisioningState": null, - "azure.mgmt.cdn.models.ProfileScrubbingState": null, - "azure.mgmt.cdn.models.OptimizationType": null, - "azure.mgmt.cdn.models.ResourceUsageUnit": null, - "azure.mgmt.cdn.models.PrivateEndpointStatus": null, - "azure.mgmt.cdn.models.ResponseBasedDetectedErrorTypes": null, - "azure.mgmt.cdn.models.GeoFilterActions": null, - "azure.mgmt.cdn.models.KeyVaultSigningKeyParametersType": null, - "azure.mgmt.cdn.models.QueryStringCachingBehavior": null, - "azure.mgmt.cdn.models.EndpointResourceState": null, - "azure.mgmt.cdn.models.EndpointProvisioningState": null, - "azure.mgmt.cdn.models.OriginResourceState": null, - "azure.mgmt.cdn.models.OriginProvisioningState": null, - "azure.mgmt.cdn.models.OriginGroupResourceState": null, - "azure.mgmt.cdn.models.OriginGroupProvisioningState": null, - "azure.mgmt.cdn.models.CustomDomainResourceState": null, - "azure.mgmt.cdn.models.CustomHttpsProvisioningState": null, - "azure.mgmt.cdn.models.CustomHttpsProvisioningSubstate": null, - "azure.mgmt.cdn.models.CertificateSource": null, - "azure.mgmt.cdn.models.ProtocolType": null, - "azure.mgmt.cdn.models.MinimumTlsVersion": null, - "azure.mgmt.cdn.models.CertificateSourceParametersType": null, - "azure.mgmt.cdn.models.CertificateType": null, - "azure.mgmt.cdn.models.UpdateRule": null, - "azure.mgmt.cdn.models.DeleteRule": null, - "azure.mgmt.cdn.models.TransformType": null, - "azure.mgmt.cdn.models.WafMatchVariable": null, - "azure.mgmt.cdn.models.Operator": null, - "azure.mgmt.cdn.models.CustomRuleEnabledState": null, - "azure.mgmt.cdn.models.ActionType": null, - "azure.mgmt.cdn.models.ManagedRuleEnabledState": null, - "azure.mgmt.cdn.models.PolicyEnabledState": null, - "azure.mgmt.cdn.models.PolicyMode": null, - "azure.mgmt.cdn.models.PolicySettingsDefaultCustomBlockResponseStatusCode": null, - "azure.mgmt.cdn.models.ProvisioningState": null, - "azure.mgmt.cdn.models.PolicyResourceState": null, - "azure.mgmt.cdn.models.ResourceType": null, - "azure.mgmt.cdn.models.Status": null, - "azure.mgmt.cdn.models.LogMetricsGranularity": null, - "azure.mgmt.cdn.models.MetricsGranularity": null, - "azure.mgmt.cdn.models.WafGranularity": null, - "azure.mgmt.cdn.models.WafMetricsGranularity": null, - "azure.mgmt.cdn.models.CanMigrateDefaultSku": null, - "azure.mgmt.cdn.CdnManagementClient.check_endpoint_name_availability": null, - "azure.mgmt.cdn.aio.CdnManagementClient.check_endpoint_name_availability": null, - "azure.mgmt.cdn.CdnManagementClient.check_name_availability": null, - "azure.mgmt.cdn.aio.CdnManagementClient.check_name_availability": null, - "azure.mgmt.cdn.CdnManagementClient.check_name_availability_with_subscription": null, - "azure.mgmt.cdn.aio.CdnManagementClient.check_name_availability_with_subscription": null, - "azure.mgmt.cdn.CdnManagementClient.validate_probe": null, - "azure.mgmt.cdn.aio.CdnManagementClient.validate_probe": null, - "azure.mgmt.cdn.operations.AFDProfilesOperations.check_endpoint_name_availability": null, - "azure.mgmt.cdn.aio.operations.AFDProfilesOperations.check_endpoint_name_availability": null, - "azure.mgmt.cdn.operations.AFDProfilesOperations.list_resource_usage": null, - "azure.mgmt.cdn.aio.operations.AFDProfilesOperations.list_resource_usage": null, - "azure.mgmt.cdn.operations.AFDProfilesOperations.check_host_name_availability": null, - "azure.mgmt.cdn.aio.operations.AFDProfilesOperations.check_host_name_availability": null, - "azure.mgmt.cdn.operations.AFDProfilesOperations.validate_secret": null, - "azure.mgmt.cdn.aio.operations.AFDProfilesOperations.validate_secret": null, - "azure.mgmt.cdn.operations.AFDProfilesOperations.begin_upgrade": null, - "azure.mgmt.cdn.aio.operations.AFDProfilesOperations.begin_upgrade": null, - "azure.mgmt.cdn.operations.AFDCustomDomainsOperations.list_by_profile": null, - "azure.mgmt.cdn.aio.operations.AFDCustomDomainsOperations.list_by_profile": null, - "azure.mgmt.cdn.operations.AFDCustomDomainsOperations.get": null, - "azure.mgmt.cdn.aio.operations.AFDCustomDomainsOperations.get": null, - "azure.mgmt.cdn.operations.AFDCustomDomainsOperations.begin_create": null, - "azure.mgmt.cdn.aio.operations.AFDCustomDomainsOperations.begin_create": null, - "azure.mgmt.cdn.operations.AFDCustomDomainsOperations.begin_update": null, - "azure.mgmt.cdn.aio.operations.AFDCustomDomainsOperations.begin_update": null, - "azure.mgmt.cdn.operations.AFDCustomDomainsOperations.begin_delete": null, - "azure.mgmt.cdn.aio.operations.AFDCustomDomainsOperations.begin_delete": null, - "azure.mgmt.cdn.operations.AFDCustomDomainsOperations.begin_refresh_validation_token": null, - "azure.mgmt.cdn.aio.operations.AFDCustomDomainsOperations.begin_refresh_validation_token": null, - "azure.mgmt.cdn.operations.AFDEndpointsOperations.list_by_profile": null, - "azure.mgmt.cdn.aio.operations.AFDEndpointsOperations.list_by_profile": null, - "azure.mgmt.cdn.operations.AFDEndpointsOperations.get": null, - "azure.mgmt.cdn.aio.operations.AFDEndpointsOperations.get": null, - "azure.mgmt.cdn.operations.AFDEndpointsOperations.begin_create": null, - "azure.mgmt.cdn.aio.operations.AFDEndpointsOperations.begin_create": null, - "azure.mgmt.cdn.operations.AFDEndpointsOperations.begin_update": null, - "azure.mgmt.cdn.aio.operations.AFDEndpointsOperations.begin_update": null, - "azure.mgmt.cdn.operations.AFDEndpointsOperations.begin_delete": null, - "azure.mgmt.cdn.aio.operations.AFDEndpointsOperations.begin_delete": null, - "azure.mgmt.cdn.operations.AFDEndpointsOperations.begin_purge_content": null, - "azure.mgmt.cdn.aio.operations.AFDEndpointsOperations.begin_purge_content": null, - "azure.mgmt.cdn.operations.AFDEndpointsOperations.list_resource_usage": null, - "azure.mgmt.cdn.aio.operations.AFDEndpointsOperations.list_resource_usage": null, - "azure.mgmt.cdn.operations.AFDEndpointsOperations.validate_custom_domain": null, - "azure.mgmt.cdn.aio.operations.AFDEndpointsOperations.validate_custom_domain": null, - "azure.mgmt.cdn.operations.AFDOriginGroupsOperations.list_by_profile": null, - "azure.mgmt.cdn.aio.operations.AFDOriginGroupsOperations.list_by_profile": null, - "azure.mgmt.cdn.operations.AFDOriginGroupsOperations.get": null, - "azure.mgmt.cdn.aio.operations.AFDOriginGroupsOperations.get": null, - "azure.mgmt.cdn.operations.AFDOriginGroupsOperations.begin_create": null, - "azure.mgmt.cdn.aio.operations.AFDOriginGroupsOperations.begin_create": null, - "azure.mgmt.cdn.operations.AFDOriginGroupsOperations.begin_update": null, - "azure.mgmt.cdn.aio.operations.AFDOriginGroupsOperations.begin_update": null, - "azure.mgmt.cdn.operations.AFDOriginGroupsOperations.begin_delete": null, - "azure.mgmt.cdn.aio.operations.AFDOriginGroupsOperations.begin_delete": null, - "azure.mgmt.cdn.operations.AFDOriginGroupsOperations.list_resource_usage": null, - "azure.mgmt.cdn.aio.operations.AFDOriginGroupsOperations.list_resource_usage": null, - "azure.mgmt.cdn.operations.AFDOriginsOperations.list_by_origin_group": null, - "azure.mgmt.cdn.aio.operations.AFDOriginsOperations.list_by_origin_group": null, - "azure.mgmt.cdn.operations.AFDOriginsOperations.get": null, - "azure.mgmt.cdn.aio.operations.AFDOriginsOperations.get": null, - "azure.mgmt.cdn.operations.AFDOriginsOperations.begin_create": null, - "azure.mgmt.cdn.aio.operations.AFDOriginsOperations.begin_create": null, - "azure.mgmt.cdn.operations.AFDOriginsOperations.begin_update": null, - "azure.mgmt.cdn.aio.operations.AFDOriginsOperations.begin_update": null, - "azure.mgmt.cdn.operations.AFDOriginsOperations.begin_delete": null, - "azure.mgmt.cdn.aio.operations.AFDOriginsOperations.begin_delete": null, - "azure.mgmt.cdn.operations.RoutesOperations.list_by_endpoint": null, - "azure.mgmt.cdn.aio.operations.RoutesOperations.list_by_endpoint": null, - "azure.mgmt.cdn.operations.RoutesOperations.get": null, - "azure.mgmt.cdn.aio.operations.RoutesOperations.get": null, - "azure.mgmt.cdn.operations.RoutesOperations.begin_create": null, - "azure.mgmt.cdn.aio.operations.RoutesOperations.begin_create": null, - "azure.mgmt.cdn.operations.RoutesOperations.begin_update": null, - "azure.mgmt.cdn.aio.operations.RoutesOperations.begin_update": null, - "azure.mgmt.cdn.operations.RoutesOperations.begin_delete": null, - "azure.mgmt.cdn.aio.operations.RoutesOperations.begin_delete": null, - "azure.mgmt.cdn.operations.RuleSetsOperations.list_by_profile": null, - "azure.mgmt.cdn.aio.operations.RuleSetsOperations.list_by_profile": null, - "azure.mgmt.cdn.operations.RuleSetsOperations.get": null, - "azure.mgmt.cdn.aio.operations.RuleSetsOperations.get": null, - "azure.mgmt.cdn.operations.RuleSetsOperations.create": null, - "azure.mgmt.cdn.aio.operations.RuleSetsOperations.create": null, - "azure.mgmt.cdn.operations.RuleSetsOperations.begin_delete": null, - "azure.mgmt.cdn.aio.operations.RuleSetsOperations.begin_delete": null, - "azure.mgmt.cdn.operations.RuleSetsOperations.list_resource_usage": null, - "azure.mgmt.cdn.aio.operations.RuleSetsOperations.list_resource_usage": null, - "azure.mgmt.cdn.operations.RulesOperations.list_by_rule_set": null, - "azure.mgmt.cdn.aio.operations.RulesOperations.list_by_rule_set": null, - "azure.mgmt.cdn.operations.RulesOperations.get": null, - "azure.mgmt.cdn.aio.operations.RulesOperations.get": null, - "azure.mgmt.cdn.operations.RulesOperations.begin_create": null, - "azure.mgmt.cdn.aio.operations.RulesOperations.begin_create": null, - "azure.mgmt.cdn.operations.RulesOperations.begin_update": null, - "azure.mgmt.cdn.aio.operations.RulesOperations.begin_update": null, - "azure.mgmt.cdn.operations.RulesOperations.begin_delete": null, - "azure.mgmt.cdn.aio.operations.RulesOperations.begin_delete": null, - "azure.mgmt.cdn.operations.SecurityPoliciesOperations.list_by_profile": null, - "azure.mgmt.cdn.aio.operations.SecurityPoliciesOperations.list_by_profile": null, - "azure.mgmt.cdn.operations.SecurityPoliciesOperations.get": null, - "azure.mgmt.cdn.aio.operations.SecurityPoliciesOperations.get": null, - "azure.mgmt.cdn.operations.SecurityPoliciesOperations.begin_create": null, - "azure.mgmt.cdn.aio.operations.SecurityPoliciesOperations.begin_create": null, - "azure.mgmt.cdn.operations.SecurityPoliciesOperations.begin_patch": null, - "azure.mgmt.cdn.aio.operations.SecurityPoliciesOperations.begin_patch": null, - "azure.mgmt.cdn.operations.SecurityPoliciesOperations.begin_delete": null, - "azure.mgmt.cdn.aio.operations.SecurityPoliciesOperations.begin_delete": null, - "azure.mgmt.cdn.operations.SecretsOperations.list_by_profile": null, - "azure.mgmt.cdn.aio.operations.SecretsOperations.list_by_profile": null, - "azure.mgmt.cdn.operations.SecretsOperations.get": null, - "azure.mgmt.cdn.aio.operations.SecretsOperations.get": null, - "azure.mgmt.cdn.operations.SecretsOperations.begin_create": null, - "azure.mgmt.cdn.aio.operations.SecretsOperations.begin_create": null, - "azure.mgmt.cdn.operations.SecretsOperations.begin_delete": null, - "azure.mgmt.cdn.aio.operations.SecretsOperations.begin_delete": null, - "azure.mgmt.cdn.operations.LogAnalyticsOperations.get_log_analytics_metrics": null, - "azure.mgmt.cdn.aio.operations.LogAnalyticsOperations.get_log_analytics_metrics": null, - "azure.mgmt.cdn.operations.LogAnalyticsOperations.get_log_analytics_rankings": null, - "azure.mgmt.cdn.aio.operations.LogAnalyticsOperations.get_log_analytics_rankings": null, - "azure.mgmt.cdn.operations.LogAnalyticsOperations.get_log_analytics_locations": null, - "azure.mgmt.cdn.aio.operations.LogAnalyticsOperations.get_log_analytics_locations": null, - "azure.mgmt.cdn.operations.LogAnalyticsOperations.get_log_analytics_resources": null, - "azure.mgmt.cdn.aio.operations.LogAnalyticsOperations.get_log_analytics_resources": null, - "azure.mgmt.cdn.operations.LogAnalyticsOperations.get_waf_log_analytics_metrics": null, - "azure.mgmt.cdn.aio.operations.LogAnalyticsOperations.get_waf_log_analytics_metrics": null, - "azure.mgmt.cdn.operations.LogAnalyticsOperations.get_waf_log_analytics_rankings": null, - "azure.mgmt.cdn.aio.operations.LogAnalyticsOperations.get_waf_log_analytics_rankings": null, - "azure.mgmt.cdn.operations.ProfilesOperations.list": null, - "azure.mgmt.cdn.aio.operations.ProfilesOperations.list": null, - "azure.mgmt.cdn.operations.ProfilesOperations.list_by_resource_group": null, - "azure.mgmt.cdn.aio.operations.ProfilesOperations.list_by_resource_group": null, - "azure.mgmt.cdn.operations.ProfilesOperations.get": null, - "azure.mgmt.cdn.aio.operations.ProfilesOperations.get": null, - "azure.mgmt.cdn.operations.ProfilesOperations.begin_create": null, - "azure.mgmt.cdn.aio.operations.ProfilesOperations.begin_create": null, - "azure.mgmt.cdn.operations.ProfilesOperations.begin_update": null, - "azure.mgmt.cdn.aio.operations.ProfilesOperations.begin_update": null, - "azure.mgmt.cdn.operations.ProfilesOperations.begin_delete": null, - "azure.mgmt.cdn.aio.operations.ProfilesOperations.begin_delete": null, - "azure.mgmt.cdn.operations.ProfilesOperations.begin_can_migrate": null, - "azure.mgmt.cdn.aio.operations.ProfilesOperations.begin_can_migrate": null, - "azure.mgmt.cdn.operations.ProfilesOperations.begin_migrate": null, - "azure.mgmt.cdn.aio.operations.ProfilesOperations.begin_migrate": null, - "azure.mgmt.cdn.operations.ProfilesOperations.begin_migration_commit": null, - "azure.mgmt.cdn.aio.operations.ProfilesOperations.begin_migration_commit": null, - "azure.mgmt.cdn.operations.ProfilesOperations.generate_sso_uri": null, - "azure.mgmt.cdn.aio.operations.ProfilesOperations.generate_sso_uri": null, - "azure.mgmt.cdn.operations.ProfilesOperations.list_supported_optimization_types": null, - "azure.mgmt.cdn.aio.operations.ProfilesOperations.list_supported_optimization_types": null, - "azure.mgmt.cdn.operations.ProfilesOperations.list_resource_usage": null, - "azure.mgmt.cdn.aio.operations.ProfilesOperations.list_resource_usage": null, - "azure.mgmt.cdn.operations.ProfilesOperations.begin_cdn_can_migrate_to_afd": null, - "azure.mgmt.cdn.aio.operations.ProfilesOperations.begin_cdn_can_migrate_to_afd": null, - "azure.mgmt.cdn.operations.ProfilesOperations.begin_cdn_migrate_to_afd": null, - "azure.mgmt.cdn.aio.operations.ProfilesOperations.begin_cdn_migrate_to_afd": null, - "azure.mgmt.cdn.operations.ProfilesOperations.begin_migration_abort": null, - "azure.mgmt.cdn.aio.operations.ProfilesOperations.begin_migration_abort": null, - "azure.mgmt.cdn.operations.EndpointsOperations.list_by_profile": null, - "azure.mgmt.cdn.aio.operations.EndpointsOperations.list_by_profile": null, - "azure.mgmt.cdn.operations.EndpointsOperations.get": null, - "azure.mgmt.cdn.aio.operations.EndpointsOperations.get": null, - "azure.mgmt.cdn.operations.EndpointsOperations.begin_create": null, - "azure.mgmt.cdn.aio.operations.EndpointsOperations.begin_create": null, - "azure.mgmt.cdn.operations.EndpointsOperations.begin_update": null, - "azure.mgmt.cdn.aio.operations.EndpointsOperations.begin_update": null, - "azure.mgmt.cdn.operations.EndpointsOperations.begin_delete": null, - "azure.mgmt.cdn.aio.operations.EndpointsOperations.begin_delete": null, - "azure.mgmt.cdn.operations.EndpointsOperations.begin_start": null, - "azure.mgmt.cdn.aio.operations.EndpointsOperations.begin_start": null, - "azure.mgmt.cdn.operations.EndpointsOperations.begin_stop": null, - "azure.mgmt.cdn.aio.operations.EndpointsOperations.begin_stop": null, - "azure.mgmt.cdn.operations.EndpointsOperations.begin_purge_content": null, - "azure.mgmt.cdn.aio.operations.EndpointsOperations.begin_purge_content": null, - "azure.mgmt.cdn.operations.EndpointsOperations.begin_load_content": null, - "azure.mgmt.cdn.aio.operations.EndpointsOperations.begin_load_content": null, - "azure.mgmt.cdn.operations.EndpointsOperations.validate_custom_domain": null, - "azure.mgmt.cdn.aio.operations.EndpointsOperations.validate_custom_domain": null, - "azure.mgmt.cdn.operations.EndpointsOperations.list_resource_usage": null, - "azure.mgmt.cdn.aio.operations.EndpointsOperations.list_resource_usage": null, - "azure.mgmt.cdn.operations.OriginsOperations.list_by_endpoint": null, - "azure.mgmt.cdn.aio.operations.OriginsOperations.list_by_endpoint": null, - "azure.mgmt.cdn.operations.OriginsOperations.get": null, - "azure.mgmt.cdn.aio.operations.OriginsOperations.get": null, - "azure.mgmt.cdn.operations.OriginsOperations.begin_create": null, - "azure.mgmt.cdn.aio.operations.OriginsOperations.begin_create": null, - "azure.mgmt.cdn.operations.OriginsOperations.begin_update": null, - "azure.mgmt.cdn.aio.operations.OriginsOperations.begin_update": null, - "azure.mgmt.cdn.operations.OriginsOperations.begin_delete": null, - "azure.mgmt.cdn.aio.operations.OriginsOperations.begin_delete": null, - "azure.mgmt.cdn.operations.OriginGroupsOperations.list_by_endpoint": null, - "azure.mgmt.cdn.aio.operations.OriginGroupsOperations.list_by_endpoint": null, - "azure.mgmt.cdn.operations.OriginGroupsOperations.get": null, - "azure.mgmt.cdn.aio.operations.OriginGroupsOperations.get": null, - "azure.mgmt.cdn.operations.OriginGroupsOperations.begin_create": null, - "azure.mgmt.cdn.aio.operations.OriginGroupsOperations.begin_create": null, - "azure.mgmt.cdn.operations.OriginGroupsOperations.begin_update": null, - "azure.mgmt.cdn.aio.operations.OriginGroupsOperations.begin_update": null, - "azure.mgmt.cdn.operations.OriginGroupsOperations.begin_delete": null, - "azure.mgmt.cdn.aio.operations.OriginGroupsOperations.begin_delete": null, - "azure.mgmt.cdn.operations.CustomDomainsOperations.list_by_endpoint": null, - "azure.mgmt.cdn.aio.operations.CustomDomainsOperations.list_by_endpoint": null, - "azure.mgmt.cdn.operations.CustomDomainsOperations.get": null, - "azure.mgmt.cdn.aio.operations.CustomDomainsOperations.get": null, - "azure.mgmt.cdn.operations.CustomDomainsOperations.begin_create": null, - "azure.mgmt.cdn.aio.operations.CustomDomainsOperations.begin_create": null, - "azure.mgmt.cdn.operations.CustomDomainsOperations.begin_delete": null, - "azure.mgmt.cdn.aio.operations.CustomDomainsOperations.begin_delete": null, - "azure.mgmt.cdn.operations.CustomDomainsOperations.begin_disable_custom_https": null, - "azure.mgmt.cdn.aio.operations.CustomDomainsOperations.begin_disable_custom_https": null, - "azure.mgmt.cdn.operations.CustomDomainsOperations.begin_enable_custom_https": null, - "azure.mgmt.cdn.aio.operations.CustomDomainsOperations.begin_enable_custom_https": null, - "azure.mgmt.cdn.operations.ResourceUsageOperations.list": null, - "azure.mgmt.cdn.aio.operations.ResourceUsageOperations.list": null, - "azure.mgmt.cdn.operations.Operations.list": null, - "azure.mgmt.cdn.aio.operations.Operations.list": null, - "azure.mgmt.cdn.operations.EdgeNodesOperations.list": null, - "azure.mgmt.cdn.aio.operations.EdgeNodesOperations.list": null, - "azure.mgmt.cdn.operations.PoliciesOperations.list": null, - "azure.mgmt.cdn.aio.operations.PoliciesOperations.list": null, - "azure.mgmt.cdn.operations.PoliciesOperations.get": null, - "azure.mgmt.cdn.aio.operations.PoliciesOperations.get": null, - "azure.mgmt.cdn.operations.PoliciesOperations.begin_create_or_update": null, - "azure.mgmt.cdn.aio.operations.PoliciesOperations.begin_create_or_update": null, - "azure.mgmt.cdn.operations.PoliciesOperations.begin_update": null, - "azure.mgmt.cdn.aio.operations.PoliciesOperations.begin_update": null, - "azure.mgmt.cdn.operations.PoliciesOperations.delete": null, - "azure.mgmt.cdn.aio.operations.PoliciesOperations.delete": null, - "azure.mgmt.cdn.operations.ManagedRuleSetsOperations.list": null, - "azure.mgmt.cdn.aio.operations.ManagedRuleSetsOperations.list": null - } + "azure.mgmt.cdn.models.ActivatedResourceReference": "Microsoft.Cdn.ActivatedResourceReference", + "azure.mgmt.cdn.models.Resource": "Azure.ResourceManager.CommonTypes.Resource", + "azure.mgmt.cdn.models.ProxyResource": "Azure.ResourceManager.CommonTypes.ProxyResource", + "azure.mgmt.cdn.models.AFDDomain": "Microsoft.Cdn.AFDDomain", + "azure.mgmt.cdn.models.AFDDomainHttpsCustomizedCipherSuiteSet": "Microsoft.Cdn.AFDDomainHttpsCustomizedCipherSuiteSet", + "azure.mgmt.cdn.models.AFDDomainHttpsParameters": "Microsoft.Cdn.AFDDomainHttpsParameters", + "azure.mgmt.cdn.models.AFDDomainProperties": "Microsoft.Cdn.AFDDomainProperties", + "azure.mgmt.cdn.models.AFDDomainUpdateParameters": "Microsoft.Cdn.AFDDomainUpdateParameters", + "azure.mgmt.cdn.models.AFDDomainUpdatePropertiesParameters": "Microsoft.Cdn.AFDDomainUpdatePropertiesParameters", + "azure.mgmt.cdn.models.TrackedResource": "Azure.ResourceManager.CommonTypes.TrackedResource", + "azure.mgmt.cdn.models.AFDEndpoint": "Microsoft.Cdn.AFDEndpoint", + "azure.mgmt.cdn.models.AFDEndpointProperties": "Microsoft.Cdn.AFDEndpointProperties", + "azure.mgmt.cdn.models.AFDEndpointPropertiesUpdateParameters": "Microsoft.Cdn.AFDEndpointPropertiesUpdateParameters", + "azure.mgmt.cdn.models.AFDEndpointUpdateParameters": "Microsoft.Cdn.AFDEndpointUpdateParameters", + "azure.mgmt.cdn.models.AFDOrigin": "Microsoft.Cdn.AFDOrigin", + "azure.mgmt.cdn.models.AFDOriginGroup": "Microsoft.Cdn.AFDOriginGroup", + "azure.mgmt.cdn.models.AFDOriginGroupProperties": "Microsoft.Cdn.AFDOriginGroupProperties", + "azure.mgmt.cdn.models.AFDOriginGroupUpdateParameters": "Microsoft.Cdn.AFDOriginGroupUpdateParameters", + "azure.mgmt.cdn.models.AFDOriginGroupUpdatePropertiesParameters": "Microsoft.Cdn.AFDOriginGroupUpdatePropertiesParameters", + "azure.mgmt.cdn.models.AFDOriginProperties": "Microsoft.Cdn.AFDOriginProperties", + "azure.mgmt.cdn.models.AFDOriginUpdateParameters": "Microsoft.Cdn.AFDOriginUpdateParameters", + "azure.mgmt.cdn.models.AFDOriginUpdatePropertiesParameters": "Microsoft.Cdn.AFDOriginUpdatePropertiesParameters", + "azure.mgmt.cdn.models.AfdPurgeParameters": "Microsoft.Cdn.AfdPurgeParameters", + "azure.mgmt.cdn.models.AfdRouteCacheConfiguration": "Microsoft.Cdn.AfdRouteCacheConfiguration", + "azure.mgmt.cdn.models.AFDStateProperties": "Microsoft.Cdn.AFDStateProperties", + "azure.mgmt.cdn.models.SecretParameters": "Microsoft.Cdn.SecretParameters", + "azure.mgmt.cdn.models.AzureFirstPartyManagedCertificateParameters": "Microsoft.Cdn.AzureFirstPartyManagedCertificateParameters", + "azure.mgmt.cdn.models.CacheConfiguration": "Microsoft.Cdn.CacheConfiguration", + "azure.mgmt.cdn.models.DeliveryRuleActionParameters": "Microsoft.Cdn.DeliveryRuleActionParameters", + "azure.mgmt.cdn.models.CacheExpirationActionParameters": "Microsoft.Cdn.CacheExpirationActionParameters", + "azure.mgmt.cdn.models.CacheKeyQueryStringActionParameters": "Microsoft.Cdn.CacheKeyQueryStringActionParameters", + "azure.mgmt.cdn.models.CanMigrateParameters": "Microsoft.Cdn.CanMigrateParameters", + "azure.mgmt.cdn.models.CanMigrateProperties": "Microsoft.Cdn.CanMigrateProperties", + "azure.mgmt.cdn.models.CanMigrateResult": "Microsoft.Cdn.CanMigrateResult", + "azure.mgmt.cdn.models.CertificateSourceParameters": "Microsoft.Cdn.CertificateSourceParameters", + "azure.mgmt.cdn.models.CdnCertificateSourceParameters": "Microsoft.Cdn.CdnCertificateSourceParameters", + "azure.mgmt.cdn.models.CdnEndpoint": "Microsoft.Cdn.CdnEndpoint", + "azure.mgmt.cdn.models.CustomDomainHttpsParameters": "Microsoft.Cdn.CustomDomainHttpsParameters", + "azure.mgmt.cdn.models.CdnManagedHttpsParameters": "Microsoft.Cdn.CdnManagedHttpsParameters", + "azure.mgmt.cdn.models.CdnMigrationToAfdParameters": "Microsoft.Cdn.CdnMigrationToAfdParameters", + "azure.mgmt.cdn.models.CdnWebApplicationFirewallPolicy": "Microsoft.Cdn.CdnWebApplicationFirewallPolicy", + "azure.mgmt.cdn.models.CdnWebApplicationFirewallPolicyPatchParameters": "Microsoft.Cdn.CdnWebApplicationFirewallPolicyPatchParameters", + "azure.mgmt.cdn.models.CdnWebApplicationFirewallPolicyProperties": "Microsoft.Cdn.CdnWebApplicationFirewallPolicyProperties", + "azure.mgmt.cdn.models.CheckEndpointNameAvailabilityInput": "Microsoft.Cdn.CheckEndpointNameAvailabilityInput", + "azure.mgmt.cdn.models.CheckEndpointNameAvailabilityOutput": "Microsoft.Cdn.CheckEndpointNameAvailabilityOutput", + "azure.mgmt.cdn.models.CheckHostNameAvailabilityInput": "Microsoft.Cdn.CheckHostNameAvailabilityInput", + "azure.mgmt.cdn.models.CheckNameAvailabilityInput": "Microsoft.Cdn.CheckNameAvailabilityInput", + "azure.mgmt.cdn.models.CheckNameAvailabilityOutput": "Microsoft.Cdn.CheckNameAvailabilityOutput", + "azure.mgmt.cdn.models.CidrIpAddress": "Microsoft.Cdn.CidrIpAddress", + "azure.mgmt.cdn.models.DeliveryRuleConditionParameters": "Microsoft.Cdn.DeliveryRuleConditionParameters", + "azure.mgmt.cdn.models.ClientPortMatchConditionParameters": "Microsoft.Cdn.ClientPortMatchConditionParameters", + "azure.mgmt.cdn.models.Components18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsPropertiesDataItems": "Microsoft.Cdn.Components18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsPropertiesDataItems", + "azure.mgmt.cdn.models.Components1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsPropertiesDataItems": "Microsoft.Cdn.Components1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsPropertiesDataItems", + "azure.mgmt.cdn.models.ComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItems": "Microsoft.Cdn.ComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItems", + "azure.mgmt.cdn.models.CompressionSettings": "Microsoft.Cdn.CompressionSettings", + "azure.mgmt.cdn.models.ContinentsResponse": "Microsoft.Cdn.ContinentsResponse", + "azure.mgmt.cdn.models.ContinentsResponseContinentsItem": "Microsoft.Cdn.ContinentsResponseContinentsItem", + "azure.mgmt.cdn.models.ContinentsResponseCountryOrRegionsItem": "Microsoft.Cdn.ContinentsResponseCountryOrRegionsItem", + "azure.mgmt.cdn.models.CookiesMatchConditionParameters": "Microsoft.Cdn.CookiesMatchConditionParameters", + "azure.mgmt.cdn.models.CustomDomain": "Microsoft.Cdn.CustomDomain", + "azure.mgmt.cdn.models.CustomDomainParameters": "Microsoft.Cdn.CustomDomainParameters", + "azure.mgmt.cdn.models.CustomDomainProperties": "Microsoft.Cdn.CustomDomainProperties", + "azure.mgmt.cdn.models.CustomDomainPropertiesParameters": "Microsoft.Cdn.CustomDomainPropertiesParameters", + "azure.mgmt.cdn.models.CustomerCertificateParameters": "Microsoft.Cdn.CustomerCertificateParameters", + "azure.mgmt.cdn.models.CustomRule": "Microsoft.Cdn.CustomRule", + "azure.mgmt.cdn.models.CustomRuleList": "Microsoft.Cdn.CustomRuleList", + "azure.mgmt.cdn.models.DeepCreatedCustomDomain": "Microsoft.Cdn.DeepCreatedCustomDomain", + "azure.mgmt.cdn.models.DeepCreatedCustomDomainProperties": "Microsoft.Cdn.DeepCreatedCustomDomainProperties", + "azure.mgmt.cdn.models.DeepCreatedOrigin": "Microsoft.Cdn.DeepCreatedOrigin", + "azure.mgmt.cdn.models.DeepCreatedOriginGroup": "Microsoft.Cdn.DeepCreatedOriginGroup", + "azure.mgmt.cdn.models.DeepCreatedOriginGroupProperties": "Microsoft.Cdn.DeepCreatedOriginGroupProperties", + "azure.mgmt.cdn.models.DeepCreatedOriginProperties": "Microsoft.Cdn.DeepCreatedOriginProperties", + "azure.mgmt.cdn.models.DeliveryRule": "Microsoft.Cdn.DeliveryRule", + "azure.mgmt.cdn.models.DeliveryRuleAction": "Microsoft.Cdn.DeliveryRuleAction", + "azure.mgmt.cdn.models.DeliveryRuleCacheExpirationAction": "Microsoft.Cdn.DeliveryRuleCacheExpirationAction", + "azure.mgmt.cdn.models.DeliveryRuleCacheKeyQueryStringAction": "Microsoft.Cdn.DeliveryRuleCacheKeyQueryStringAction", + "azure.mgmt.cdn.models.DeliveryRuleCondition": "Microsoft.Cdn.DeliveryRuleCondition", + "azure.mgmt.cdn.models.DeliveryRuleClientPortCondition": "Microsoft.Cdn.DeliveryRuleClientPortCondition", + "azure.mgmt.cdn.models.DeliveryRuleCookiesCondition": "Microsoft.Cdn.DeliveryRuleCookiesCondition", + "azure.mgmt.cdn.models.DeliveryRuleHostNameCondition": "Microsoft.Cdn.DeliveryRuleHostNameCondition", + "azure.mgmt.cdn.models.DeliveryRuleHttpVersionCondition": "Microsoft.Cdn.DeliveryRuleHttpVersionCondition", + "azure.mgmt.cdn.models.DeliveryRuleIsDeviceCondition": "Microsoft.Cdn.DeliveryRuleIsDeviceCondition", + "azure.mgmt.cdn.models.DeliveryRulePostArgsCondition": "Microsoft.Cdn.DeliveryRulePostArgsCondition", + "azure.mgmt.cdn.models.DeliveryRuleQueryStringCondition": "Microsoft.Cdn.DeliveryRuleQueryStringCondition", + "azure.mgmt.cdn.models.DeliveryRuleRemoteAddressCondition": "Microsoft.Cdn.DeliveryRuleRemoteAddressCondition", + "azure.mgmt.cdn.models.DeliveryRuleRequestBodyCondition": "Microsoft.Cdn.DeliveryRuleRequestBodyCondition", + "azure.mgmt.cdn.models.DeliveryRuleRequestHeaderAction": "Microsoft.Cdn.DeliveryRuleRequestHeaderAction", + "azure.mgmt.cdn.models.DeliveryRuleRequestHeaderCondition": "Microsoft.Cdn.DeliveryRuleRequestHeaderCondition", + "azure.mgmt.cdn.models.DeliveryRuleRequestMethodCondition": "Microsoft.Cdn.DeliveryRuleRequestMethodCondition", + "azure.mgmt.cdn.models.DeliveryRuleRequestSchemeCondition": "Microsoft.Cdn.DeliveryRuleRequestSchemeCondition", + "azure.mgmt.cdn.models.DeliveryRuleRequestUriCondition": "Microsoft.Cdn.DeliveryRuleRequestUriCondition", + "azure.mgmt.cdn.models.DeliveryRuleResponseHeaderAction": "Microsoft.Cdn.DeliveryRuleResponseHeaderAction", + "azure.mgmt.cdn.models.DeliveryRuleRouteConfigurationOverrideAction": "Microsoft.Cdn.DeliveryRuleRouteConfigurationOverrideAction", + "azure.mgmt.cdn.models.DeliveryRuleServerPortCondition": "Microsoft.Cdn.DeliveryRuleServerPortCondition", + "azure.mgmt.cdn.models.DeliveryRuleSocketAddrCondition": "Microsoft.Cdn.DeliveryRuleSocketAddrCondition", + "azure.mgmt.cdn.models.DeliveryRuleSslProtocolCondition": "Microsoft.Cdn.DeliveryRuleSslProtocolCondition", + "azure.mgmt.cdn.models.DeliveryRuleUrlFileExtensionCondition": "Microsoft.Cdn.DeliveryRuleUrlFileExtensionCondition", + "azure.mgmt.cdn.models.DeliveryRuleUrlFileNameCondition": "Microsoft.Cdn.DeliveryRuleUrlFileNameCondition", + "azure.mgmt.cdn.models.DeliveryRuleUrlPathCondition": "Microsoft.Cdn.DeliveryRuleUrlPathCondition", + "azure.mgmt.cdn.models.DimensionProperties": "Microsoft.Cdn.DimensionProperties", + "azure.mgmt.cdn.models.DomainValidationProperties": "Microsoft.Cdn.DomainValidationProperties", + "azure.mgmt.cdn.models.EdgeNode": "Microsoft.Cdn.EdgeNode", + "azure.mgmt.cdn.models.EdgeNodeProperties": "Microsoft.Cdn.EdgeNodeProperties", + "azure.mgmt.cdn.models.Endpoint": "Microsoft.Cdn.Endpoint", + "azure.mgmt.cdn.models.EndpointPropertiesUpdateParameters": "Microsoft.Cdn.EndpointPropertiesUpdateParameters", + "azure.mgmt.cdn.models.EndpointProperties": "Microsoft.Cdn.EndpointProperties", + "azure.mgmt.cdn.models.EndpointPropertiesUpdateParametersDeliveryPolicy": "Microsoft.Cdn.EndpointPropertiesUpdateParametersDeliveryPolicy", + "azure.mgmt.cdn.models.EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink": "Microsoft.Cdn.EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink", + "azure.mgmt.cdn.models.EndpointUpdateParameters": "Microsoft.Cdn.EndpointUpdateParameters", + "azure.mgmt.cdn.models.ErrorAdditionalInfo": "Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo", + "azure.mgmt.cdn.models.ErrorDetail": "Azure.ResourceManager.CommonTypes.ErrorDetail", + "azure.mgmt.cdn.models.ErrorResponse": "Azure.ResourceManager.CommonTypes.ErrorResponse", + "azure.mgmt.cdn.models.GeoFilter": "Microsoft.Cdn.GeoFilter", + "azure.mgmt.cdn.models.HeaderActionParameters": "Microsoft.Cdn.HeaderActionParameters", + "azure.mgmt.cdn.models.HealthProbeParameters": "Microsoft.Cdn.HealthProbeParameters", + "azure.mgmt.cdn.models.HostNameMatchConditionParameters": "Microsoft.Cdn.HostNameMatchConditionParameters", + "azure.mgmt.cdn.models.HttpErrorRangeParameters": "Microsoft.Cdn.HttpErrorRangeParameters", + "azure.mgmt.cdn.models.HttpVersionMatchConditionParameters": "Microsoft.Cdn.HttpVersionMatchConditionParameters", + "azure.mgmt.cdn.models.IpAddressGroup": "Microsoft.Cdn.IpAddressGroup", + "azure.mgmt.cdn.models.IsDeviceMatchConditionParameters": "Microsoft.Cdn.IsDeviceMatchConditionParameters", + "azure.mgmt.cdn.models.KeyVaultCertificateSourceParameters": "Microsoft.Cdn.KeyVaultCertificateSourceParameters", + "azure.mgmt.cdn.models.KeyVaultSigningKeyParameters": "Microsoft.Cdn.KeyVaultSigningKeyParameters", + "azure.mgmt.cdn.models.LoadBalancingSettingsParameters": "Microsoft.Cdn.LoadBalancingSettingsParameters", + "azure.mgmt.cdn.models.LoadParameters": "Microsoft.Cdn.LoadParameters", + "azure.mgmt.cdn.models.LogSpecification": "Microsoft.Cdn.LogSpecification", + "azure.mgmt.cdn.models.ManagedCertificateParameters": "Microsoft.Cdn.ManagedCertificateParameters", + "azure.mgmt.cdn.models.ManagedRuleDefinition": "Microsoft.Cdn.ManagedRuleDefinition", + "azure.mgmt.cdn.models.ManagedRuleGroupDefinition": "Microsoft.Cdn.ManagedRuleGroupDefinition", + "azure.mgmt.cdn.models.ManagedRuleGroupOverride": "Microsoft.Cdn.ManagedRuleGroupOverride", + "azure.mgmt.cdn.models.ManagedRuleOverride": "Microsoft.Cdn.ManagedRuleOverride", + "azure.mgmt.cdn.models.ManagedRuleSet": "Microsoft.Cdn.ManagedRuleSet", + "azure.mgmt.cdn.models.ManagedRuleSetDefinition": "Microsoft.Cdn.ManagedRuleSetDefinition", + "azure.mgmt.cdn.models.ManagedRuleSetDefinitionProperties": "Microsoft.Cdn.ManagedRuleSetDefinitionProperties", + "azure.mgmt.cdn.models.ManagedRuleSetList": "Microsoft.Cdn.ManagedRuleSetList", + "azure.mgmt.cdn.models.ManagedServiceIdentity": "Azure.ResourceManager.CommonTypes.ManagedServiceIdentity", + "azure.mgmt.cdn.models.MatchCondition": "Microsoft.Cdn.MatchCondition", + "azure.mgmt.cdn.models.MetricAvailability": "Microsoft.Cdn.MetricAvailability", + "azure.mgmt.cdn.models.MetricSpecification": "Microsoft.Cdn.MetricSpecification", + "azure.mgmt.cdn.models.MetricsResponse": "Microsoft.Cdn.MetricsResponse", + "azure.mgmt.cdn.models.MetricsResponseSeriesItem": "Microsoft.Cdn.MetricsResponseSeriesItem", + "azure.mgmt.cdn.models.MetricsResponseSeriesPropertiesItemsItem": "Microsoft.Cdn.MetricsResponseSeriesPropertiesItemsItem", + "azure.mgmt.cdn.models.MigrateResult": "Microsoft.Cdn.MigrateResult", + "azure.mgmt.cdn.models.MigrateResultProperties": "Microsoft.Cdn.MigrateResultProperties", + "azure.mgmt.cdn.models.MigrationEndpointMapping": "Microsoft.Cdn.MigrationEndpointMapping", + "azure.mgmt.cdn.models.MigrationErrorType": "Microsoft.Cdn.MigrationErrorType", + "azure.mgmt.cdn.models.MigrationParameters": "Microsoft.Cdn.MigrationParameters", + "azure.mgmt.cdn.models.MigrationWebApplicationFirewallMapping": "Microsoft.Cdn.MigrationWebApplicationFirewallMapping", + "azure.mgmt.cdn.models.Operation": "Microsoft.Cdn.Operation", + "azure.mgmt.cdn.models.OperationDisplay": "Microsoft.Cdn.OperationDisplay", + "azure.mgmt.cdn.models.OperationProperties": "Microsoft.Cdn.OperationProperties", + "azure.mgmt.cdn.models.Origin": "Microsoft.Cdn.Origin", + "azure.mgmt.cdn.models.OriginAuthenticationProperties": "Microsoft.Cdn.OriginAuthenticationProperties", + "azure.mgmt.cdn.models.OriginGroup": "Microsoft.Cdn.OriginGroup", + "azure.mgmt.cdn.models.OriginGroupOverride": "Microsoft.Cdn.OriginGroupOverride", + "azure.mgmt.cdn.models.OriginGroupOverrideAction": "Microsoft.Cdn.OriginGroupOverrideAction", + "azure.mgmt.cdn.models.OriginGroupOverrideActionParameters": "Microsoft.Cdn.OriginGroupOverrideActionParameters", + "azure.mgmt.cdn.models.OriginGroupUpdatePropertiesParameters": "Microsoft.Cdn.OriginGroupUpdatePropertiesParameters", + "azure.mgmt.cdn.models.OriginGroupProperties": "Microsoft.Cdn.OriginGroupProperties", + "azure.mgmt.cdn.models.OriginGroupUpdateParameters": "Microsoft.Cdn.OriginGroupUpdateParameters", + "azure.mgmt.cdn.models.OriginUpdatePropertiesParameters": "Microsoft.Cdn.OriginUpdatePropertiesParameters", + "azure.mgmt.cdn.models.OriginProperties": "Microsoft.Cdn.OriginProperties", + "azure.mgmt.cdn.models.OriginUpdateParameters": "Microsoft.Cdn.OriginUpdateParameters", + "azure.mgmt.cdn.models.PolicySettings": "Microsoft.Cdn.PolicySettings", + "azure.mgmt.cdn.models.PostArgsMatchConditionParameters": "Microsoft.Cdn.PostArgsMatchConditionParameters", + "azure.mgmt.cdn.models.Profile": "Microsoft.Cdn.Profile", + "azure.mgmt.cdn.models.ProfileChangeSkuWafMapping": "Microsoft.Cdn.ProfileChangeSkuWafMapping", + "azure.mgmt.cdn.models.ProfileLogScrubbing": "Microsoft.Cdn.ProfileLogScrubbing", + "azure.mgmt.cdn.models.ProfileProperties": "Microsoft.Cdn.ProfileProperties", + "azure.mgmt.cdn.models.ProfilePropertiesUpdateParameters": "Microsoft.Cdn.ProfilePropertiesUpdateParameters", + "azure.mgmt.cdn.models.ProfileScrubbingRules": "Microsoft.Cdn.ProfileScrubbingRules", + "azure.mgmt.cdn.models.ProfileUpdateParameters": "Microsoft.Cdn.ProfileUpdateParameters", + "azure.mgmt.cdn.models.ProfileUpgradeParameters": "Microsoft.Cdn.ProfileUpgradeParameters", + "azure.mgmt.cdn.models.PurgeParameters": "Microsoft.Cdn.PurgeParameters", + "azure.mgmt.cdn.models.QueryStringMatchConditionParameters": "Microsoft.Cdn.QueryStringMatchConditionParameters", + "azure.mgmt.cdn.models.RankingsResponse": "Microsoft.Cdn.RankingsResponse", + "azure.mgmt.cdn.models.RankingsResponseTablesItem": "Microsoft.Cdn.RankingsResponseTablesItem", + "azure.mgmt.cdn.models.RankingsResponseTablesPropertiesItemsItem": "Microsoft.Cdn.RankingsResponseTablesPropertiesItemsItem", + "azure.mgmt.cdn.models.RankingsResponseTablesPropertiesItemsMetricsItem": "Microsoft.Cdn.RankingsResponseTablesPropertiesItemsMetricsItem", + "azure.mgmt.cdn.models.RateLimitRule": "Microsoft.Cdn.RateLimitRule", + "azure.mgmt.cdn.models.RateLimitRuleList": "Microsoft.Cdn.RateLimitRuleList", + "azure.mgmt.cdn.models.RemoteAddressMatchConditionParameters": "Microsoft.Cdn.RemoteAddressMatchConditionParameters", + "azure.mgmt.cdn.models.RequestBodyMatchConditionParameters": "Microsoft.Cdn.RequestBodyMatchConditionParameters", + "azure.mgmt.cdn.models.RequestHeaderMatchConditionParameters": "Microsoft.Cdn.RequestHeaderMatchConditionParameters", + "azure.mgmt.cdn.models.RequestMethodMatchConditionParameters": "Microsoft.Cdn.RequestMethodMatchConditionParameters", + "azure.mgmt.cdn.models.RequestSchemeMatchConditionParameters": "Microsoft.Cdn.RequestSchemeMatchConditionParameters", + "azure.mgmt.cdn.models.RequestUriMatchConditionParameters": "Microsoft.Cdn.RequestUriMatchConditionParameters", + "azure.mgmt.cdn.models.ResourceReference": "Microsoft.Cdn.ResourceReference", + "azure.mgmt.cdn.models.ResourcesResponse": "Microsoft.Cdn.ResourcesResponse", + "azure.mgmt.cdn.models.ResourcesResponseCustomDomainsItem": "Microsoft.Cdn.ResourcesResponseCustomDomainsItem", + "azure.mgmt.cdn.models.ResourcesResponseEndpointsItem": "Microsoft.Cdn.ResourcesResponseEndpointsItem", + "azure.mgmt.cdn.models.ResourcesResponseEndpointsPropertiesItemsItem": "Microsoft.Cdn.ResourcesResponseEndpointsPropertiesItemsItem", + "azure.mgmt.cdn.models.ResourceUsage": "Microsoft.Cdn.ResourceUsage", + "azure.mgmt.cdn.models.ResponseBasedOriginErrorDetectionParameters": "Microsoft.Cdn.ResponseBasedOriginErrorDetectionParameters", + "azure.mgmt.cdn.models.Route": "Microsoft.Cdn.Route", + "azure.mgmt.cdn.models.RouteConfigurationOverrideActionParameters": "Microsoft.Cdn.RouteConfigurationOverrideActionParameters", + "azure.mgmt.cdn.models.RouteProperties": "Microsoft.Cdn.RouteProperties", + "azure.mgmt.cdn.models.RouteUpdateParameters": "Microsoft.Cdn.RouteUpdateParameters", + "azure.mgmt.cdn.models.RouteUpdatePropertiesParameters": "Microsoft.Cdn.RouteUpdatePropertiesParameters", + "azure.mgmt.cdn.models.Rule": "Microsoft.Cdn.Rule", + "azure.mgmt.cdn.models.RuleProperties": "Microsoft.Cdn.RuleProperties", + "azure.mgmt.cdn.models.RuleSet": "Microsoft.Cdn.RuleSet", + "azure.mgmt.cdn.models.RuleSetProperties": "Microsoft.Cdn.RuleSetProperties", + "azure.mgmt.cdn.models.RuleUpdateParameters": "Microsoft.Cdn.RuleUpdateParameters", + "azure.mgmt.cdn.models.RuleUpdatePropertiesParameters": "Microsoft.Cdn.RuleUpdatePropertiesParameters", + "azure.mgmt.cdn.models.Secret": "Microsoft.Cdn.Secret", + "azure.mgmt.cdn.models.SecretProperties": "Microsoft.Cdn.SecretProperties", + "azure.mgmt.cdn.models.SecurityPolicy": "Microsoft.Cdn.SecurityPolicy", + "azure.mgmt.cdn.models.SecurityPolicyProperties": "Microsoft.Cdn.SecurityPolicyProperties", + "azure.mgmt.cdn.models.SecurityPolicyPropertiesParameters": "Microsoft.Cdn.SecurityPolicyPropertiesParameters", + "azure.mgmt.cdn.models.SecurityPolicyUpdateParameters": "Microsoft.Cdn.SecurityPolicyUpdateParameters", + "azure.mgmt.cdn.models.SecurityPolicyUpdateProperties": "Microsoft.Cdn.SecurityPolicyUpdateProperties", + "azure.mgmt.cdn.models.SecurityPolicyWebApplicationFirewallAssociation": "Microsoft.Cdn.SecurityPolicyWebApplicationFirewallAssociation", + "azure.mgmt.cdn.models.SecurityPolicyWebApplicationFirewallParameters": "Microsoft.Cdn.SecurityPolicyWebApplicationFirewallParameters", + "azure.mgmt.cdn.models.ServerPortMatchConditionParameters": "Microsoft.Cdn.ServerPortMatchConditionParameters", + "azure.mgmt.cdn.models.ServiceSpecification": "Microsoft.Cdn.ServiceSpecification", + "azure.mgmt.cdn.models.SharedPrivateLinkResourceProperties": "Microsoft.Cdn.SharedPrivateLinkResourceProperties", + "azure.mgmt.cdn.models.Sku": "Microsoft.Cdn.Sku", + "azure.mgmt.cdn.models.SocketAddrMatchConditionParameters": "Microsoft.Cdn.SocketAddrMatchConditionParameters", + "azure.mgmt.cdn.models.SslProtocolMatchConditionParameters": "Microsoft.Cdn.SslProtocolMatchConditionParameters", + "azure.mgmt.cdn.models.SsoUri": "Microsoft.Cdn.SsoUri", + "azure.mgmt.cdn.models.SupportedOptimizationTypesListResult": "Microsoft.Cdn.SupportedOptimizationTypesListResult", + "azure.mgmt.cdn.models.SystemData": "Azure.ResourceManager.CommonTypes.SystemData", + "azure.mgmt.cdn.models.UrlFileExtensionMatchConditionParameters": "Microsoft.Cdn.UrlFileExtensionMatchConditionParameters", + "azure.mgmt.cdn.models.UrlFileNameMatchConditionParameters": "Microsoft.Cdn.UrlFileNameMatchConditionParameters", + "azure.mgmt.cdn.models.UrlPathMatchConditionParameters": "Microsoft.Cdn.UrlPathMatchConditionParameters", + "azure.mgmt.cdn.models.UrlRedirectAction": "Microsoft.Cdn.UrlRedirectAction", + "azure.mgmt.cdn.models.UrlRedirectActionParameters": "Microsoft.Cdn.UrlRedirectActionParameters", + "azure.mgmt.cdn.models.UrlRewriteAction": "Microsoft.Cdn.UrlRewriteAction", + "azure.mgmt.cdn.models.UrlRewriteActionParameters": "Microsoft.Cdn.UrlRewriteActionParameters", + "azure.mgmt.cdn.models.UrlSigningAction": "Microsoft.Cdn.UrlSigningAction", + "azure.mgmt.cdn.models.UrlSigningActionParameters": "Microsoft.Cdn.UrlSigningActionParameters", + "azure.mgmt.cdn.models.UrlSigningKey": "Microsoft.Cdn.UrlSigningKey", + "azure.mgmt.cdn.models.UrlSigningKeyParameters": "Microsoft.Cdn.UrlSigningKeyParameters", + "azure.mgmt.cdn.models.UrlSigningParamIdentifier": "Microsoft.Cdn.UrlSigningParamIdentifier", + "azure.mgmt.cdn.models.Usage": "Microsoft.Cdn.Usage", + "azure.mgmt.cdn.models.UsageName": "Microsoft.Cdn.UsageName", + "azure.mgmt.cdn.models.UserAssignedIdentity": "Azure.ResourceManager.CommonTypes.UserAssignedIdentity", + "azure.mgmt.cdn.models.UserManagedHttpsParameters": "Microsoft.Cdn.UserManagedHttpsParameters", + "azure.mgmt.cdn.models.ValidateCustomDomainInput": "Microsoft.Cdn.ValidateCustomDomainInput", + "azure.mgmt.cdn.models.ValidateCustomDomainOutput": "Microsoft.Cdn.ValidateCustomDomainOutput", + "azure.mgmt.cdn.models.ValidateProbeInput": "Microsoft.Cdn.ValidateProbeInput", + "azure.mgmt.cdn.models.ValidateProbeOutput": "Microsoft.Cdn.ValidateProbeOutput", + "azure.mgmt.cdn.models.ValidateSecretInput": "Microsoft.Cdn.ValidateSecretInput", + "azure.mgmt.cdn.models.ValidateSecretOutput": "Microsoft.Cdn.ValidateSecretOutput", + "azure.mgmt.cdn.models.WafMetricsResponse": "Microsoft.Cdn.WafMetricsResponse", + "azure.mgmt.cdn.models.WafMetricsResponseSeriesItem": "Microsoft.Cdn.WafMetricsResponseSeriesItem", + "azure.mgmt.cdn.models.WafMetricsResponseSeriesPropertiesItemsItem": "Microsoft.Cdn.WafMetricsResponseSeriesPropertiesItemsItem", + "azure.mgmt.cdn.models.WafRankingsResponse": "Microsoft.Cdn.WafRankingsResponse", + "azure.mgmt.cdn.models.WafRankingsResponseDataItem": "Microsoft.Cdn.WafRankingsResponseDataItem", + "azure.mgmt.cdn.models.CreatedByType": "Azure.ResourceManager.CommonTypes.createdByType", + "azure.mgmt.cdn.models.ProfileResourceState": "Microsoft.Cdn.ProfileResourceState", + "azure.mgmt.cdn.models.ProfileProvisioningState": "Microsoft.Cdn.ProfileProvisioningState", + "azure.mgmt.cdn.models.ProfileScrubbingState": "Microsoft.Cdn.ProfileScrubbingState", + "azure.mgmt.cdn.models.ScrubbingRuleEntryMatchVariable": "Microsoft.Cdn.ScrubbingRuleEntryMatchVariable", + "azure.mgmt.cdn.models.ScrubbingRuleEntryMatchOperator": "Microsoft.Cdn.ScrubbingRuleEntryMatchOperator", + "azure.mgmt.cdn.models.ScrubbingRuleEntryState": "Microsoft.Cdn.ScrubbingRuleEntryState", + "azure.mgmt.cdn.models.SkuName": "Microsoft.Cdn.SkuName", + "azure.mgmt.cdn.models.ManagedServiceIdentityType": "Azure.ResourceManager.CommonTypes.ManagedServiceIdentityType", + "azure.mgmt.cdn.models.OptimizationType": "Microsoft.Cdn.OptimizationType", + "azure.mgmt.cdn.models.ResourceUsageUnit": "Microsoft.Cdn.ResourceUsageUnit", + "azure.mgmt.cdn.models.CanMigrateDefaultSku": "Microsoft.Cdn.CanMigrateDefaultSku", + "azure.mgmt.cdn.models.EnabledState": "Microsoft.Cdn.EnabledState", + "azure.mgmt.cdn.models.AfdProvisioningState": "Microsoft.Cdn.AfdProvisioningState", + "azure.mgmt.cdn.models.DeploymentStatus": "Microsoft.Cdn.DeploymentStatus", + "azure.mgmt.cdn.models.AutoGeneratedDomainNameLabelScope": "Microsoft.Cdn.AutoGeneratedDomainNameLabelScope", + "azure.mgmt.cdn.models.UsageUnit": "Microsoft.Cdn.UsageUnit", + "azure.mgmt.cdn.models.HealthProbeRequestType": "Microsoft.Cdn.HealthProbeRequestType", + "azure.mgmt.cdn.models.ProbeProtocol": "Microsoft.Cdn.ProbeProtocol", + "azure.mgmt.cdn.models.OriginAuthenticationType": "Microsoft.Cdn.OriginAuthenticationType", + "azure.mgmt.cdn.models.SharedPrivateLinkResourceStatus": "Microsoft.Cdn.SharedPrivateLinkResourceStatus", + "azure.mgmt.cdn.models.AFDEndpointProtocols": "Microsoft.Cdn.AFDEndpointProtocols", + "azure.mgmt.cdn.models.AfdQueryStringCachingBehavior": "Microsoft.Cdn.AfdQueryStringCachingBehavior", + "azure.mgmt.cdn.models.ForwardingProtocol": "Microsoft.Cdn.ForwardingProtocol", + "azure.mgmt.cdn.models.LinkToDefaultDomain": "Microsoft.Cdn.LinkToDefaultDomain", + "azure.mgmt.cdn.models.HttpsRedirect": "Microsoft.Cdn.HttpsRedirect", + "azure.mgmt.cdn.models.MatchVariable": "Microsoft.Cdn.MatchVariable", + "azure.mgmt.cdn.models.DeliveryRuleConditionParametersType": "Microsoft.Cdn.DeliveryRuleConditionParametersType", + "azure.mgmt.cdn.models.CookiesOperator": "Microsoft.Cdn.CookiesOperator", + "azure.mgmt.cdn.models.Transform": "Microsoft.Cdn.Transform", + "azure.mgmt.cdn.models.HostNameOperator": "Microsoft.Cdn.HostNameOperator", + "azure.mgmt.cdn.models.HttpVersionOperator": "Microsoft.Cdn.HttpVersionOperator", + "azure.mgmt.cdn.models.IsDeviceOperator": "Microsoft.Cdn.IsDeviceOperator", + "azure.mgmt.cdn.models.IsDeviceMatchValue": "Microsoft.Cdn.IsDeviceMatchValue", + "azure.mgmt.cdn.models.PostArgsOperator": "Microsoft.Cdn.PostArgsOperator", + "azure.mgmt.cdn.models.QueryStringOperator": "Microsoft.Cdn.QueryStringOperator", + "azure.mgmt.cdn.models.RemoteAddressOperator": "Microsoft.Cdn.RemoteAddressOperator", + "azure.mgmt.cdn.models.RequestBodyOperator": "Microsoft.Cdn.RequestBodyOperator", + "azure.mgmt.cdn.models.RequestHeaderOperator": "Microsoft.Cdn.RequestHeaderOperator", + "azure.mgmt.cdn.models.RequestMethodOperator": "Microsoft.Cdn.RequestMethodOperator", + "azure.mgmt.cdn.models.RequestMethodMatchValue": "Microsoft.Cdn.RequestMethodMatchValue", + "azure.mgmt.cdn.models.RequestSchemeMatchConditionParametersOperator": "Microsoft.Cdn.RequestSchemeMatchConditionParametersOperator", + "azure.mgmt.cdn.models.RequestSchemeMatchValue": "Microsoft.Cdn.RequestSchemeMatchValue", + "azure.mgmt.cdn.models.RequestUriOperator": "Microsoft.Cdn.RequestUriOperator", + "azure.mgmt.cdn.models.ServerPortOperator": "Microsoft.Cdn.ServerPortOperator", + "azure.mgmt.cdn.models.SocketAddrOperator": "Microsoft.Cdn.SocketAddrOperator", + "azure.mgmt.cdn.models.SslProtocolOperator": "Microsoft.Cdn.SslProtocolOperator", + "azure.mgmt.cdn.models.SslProtocol": "Microsoft.Cdn.SslProtocol", + "azure.mgmt.cdn.models.UrlFileExtensionOperator": "Microsoft.Cdn.UrlFileExtensionOperator", + "azure.mgmt.cdn.models.UrlFileNameOperator": "Microsoft.Cdn.UrlFileNameOperator", + "azure.mgmt.cdn.models.UrlPathOperator": "Microsoft.Cdn.UrlPathOperator", + "azure.mgmt.cdn.models.ClientPortOperator": "Microsoft.Cdn.ClientPortOperator", + "azure.mgmt.cdn.models.DeliveryRuleActionName": "Microsoft.Cdn.DeliveryRuleActionName", + "azure.mgmt.cdn.models.DeliveryRuleActionParametersType": "Microsoft.Cdn.DeliveryRuleActionParametersType", + "azure.mgmt.cdn.models.QueryStringBehavior": "Microsoft.Cdn.QueryStringBehavior", + "azure.mgmt.cdn.models.HeaderAction": "Microsoft.Cdn.HeaderAction", + "azure.mgmt.cdn.models.RuleQueryStringCachingBehavior": "Microsoft.Cdn.RuleQueryStringCachingBehavior", + "azure.mgmt.cdn.models.RuleIsCompressionEnabled": "Microsoft.Cdn.RuleIsCompressionEnabled", + "azure.mgmt.cdn.models.RuleCacheBehavior": "Microsoft.Cdn.RuleCacheBehavior", + "azure.mgmt.cdn.models.RedirectType": "Microsoft.Cdn.RedirectType", + "azure.mgmt.cdn.models.DestinationProtocol": "Microsoft.Cdn.DestinationProtocol", + "azure.mgmt.cdn.models.Algorithm": "Microsoft.Cdn.Algorithm", + "azure.mgmt.cdn.models.ParamIndicator": "Microsoft.Cdn.ParamIndicator", + "azure.mgmt.cdn.models.CacheBehavior": "Microsoft.Cdn.CacheBehavior", + "azure.mgmt.cdn.models.CacheType": "Microsoft.Cdn.CacheType", + "azure.mgmt.cdn.models.MatchProcessingBehavior": "Microsoft.Cdn.MatchProcessingBehavior", + "azure.mgmt.cdn.models.SecurityPolicyType": "Microsoft.Cdn.SecurityPolicyType", + "azure.mgmt.cdn.models.SecretType": "Microsoft.Cdn.SecretType", + "azure.mgmt.cdn.models.QueryStringCachingBehavior": "Microsoft.Cdn.QueryStringCachingBehavior", + "azure.mgmt.cdn.models.GeoFilterActions": "Microsoft.Cdn.GeoFilterActions", + "azure.mgmt.cdn.models.KeyVaultSigningKeyParametersType": "Microsoft.Cdn.KeyVaultSigningKeyParametersType", + "azure.mgmt.cdn.models.PrivateEndpointStatus": "Microsoft.Cdn.PrivateEndpointStatus", + "azure.mgmt.cdn.models.ResponseBasedDetectedErrorTypes": "Microsoft.Cdn.ResponseBasedDetectedErrorTypes", + "azure.mgmt.cdn.models.EndpointResourceState": "Microsoft.Cdn.EndpointResourceState", + "azure.mgmt.cdn.models.EndpointProvisioningState": "Microsoft.Cdn.EndpointProvisioningState", + "azure.mgmt.cdn.models.OriginResourceState": "Microsoft.Cdn.OriginResourceState", + "azure.mgmt.cdn.models.OriginProvisioningState": "Microsoft.Cdn.OriginProvisioningState", + "azure.mgmt.cdn.models.OriginGroupResourceState": "Microsoft.Cdn.OriginGroupResourceState", + "azure.mgmt.cdn.models.OriginGroupProvisioningState": "Microsoft.Cdn.OriginGroupProvisioningState", + "azure.mgmt.cdn.models.CustomDomainResourceState": "Microsoft.Cdn.CustomDomainResourceState", + "azure.mgmt.cdn.models.CustomHttpsProvisioningState": "Microsoft.Cdn.CustomHttpsProvisioningState", + "azure.mgmt.cdn.models.CustomHttpsProvisioningSubstate": "Microsoft.Cdn.CustomHttpsProvisioningSubstate", + "azure.mgmt.cdn.models.CertificateSource": "Microsoft.Cdn.CertificateSource", + "azure.mgmt.cdn.models.ProtocolType": "Microsoft.Cdn.ProtocolType", + "azure.mgmt.cdn.models.MinimumTlsVersion": "Microsoft.Cdn.MinimumTlsVersion", + "azure.mgmt.cdn.models.CertificateSourceParametersType": "Microsoft.Cdn.CertificateSourceParametersType", + "azure.mgmt.cdn.models.CertificateType": "Microsoft.Cdn.CertificateType", + "azure.mgmt.cdn.models.UpdateRule": "Microsoft.Cdn.UpdateRule", + "azure.mgmt.cdn.models.DeleteRule": "Microsoft.Cdn.DeleteRule", + "azure.mgmt.cdn.models.AfdCertificateType": "Microsoft.Cdn.AfdCertificateType", + "azure.mgmt.cdn.models.AfdCipherSuiteSetType": "Microsoft.Cdn.AfdCipherSuiteSetType", + "azure.mgmt.cdn.models.AfdMinimumTlsVersion": "Microsoft.Cdn.AfdMinimumTlsVersion", + "azure.mgmt.cdn.models.AfdCustomizedCipherSuiteForTls12": "Microsoft.Cdn.AfdCustomizedCipherSuiteForTls12", + "azure.mgmt.cdn.models.AfdCustomizedCipherSuiteForTls13": "Microsoft.Cdn.AfdCustomizedCipherSuiteForTls13", + "azure.mgmt.cdn.models.DomainValidationState": "Microsoft.Cdn.DomainValidationState", + "azure.mgmt.cdn.models.ResourceType": "Microsoft.Cdn.ResourceType", + "azure.mgmt.cdn.models.Status": "Microsoft.Cdn.Status", + "azure.mgmt.cdn.models.MetricsGranularity": "Microsoft.Cdn.MetricsGranularity", + "azure.mgmt.cdn.models.MetricsSeriesUnit": "Microsoft.Cdn.MetricsSeriesUnit", + "azure.mgmt.cdn.models.LogMetric": "Microsoft.Cdn.LogMetric", + "azure.mgmt.cdn.models.LogMetricsGranularity": "Microsoft.Cdn.LogMetricsGranularity", + "azure.mgmt.cdn.models.LogMetricsGroupBy": "Microsoft.Cdn.LogMetricsGroupBy", + "azure.mgmt.cdn.models.LogRanking": "Microsoft.Cdn.LogRanking", + "azure.mgmt.cdn.models.LogRankingMetric": "Microsoft.Cdn.LogRankingMetric", + "azure.mgmt.cdn.models.WafMetricsGranularity": "Microsoft.Cdn.WafMetricsGranularity", + "azure.mgmt.cdn.models.WafMetricsSeriesUnit": "Microsoft.Cdn.WafMetricsSeriesUnit", + "azure.mgmt.cdn.models.WafMetric": "Microsoft.Cdn.WafMetric", + "azure.mgmt.cdn.models.WafGranularity": "Microsoft.Cdn.WafGranularity", + "azure.mgmt.cdn.models.WafAction": "Microsoft.Cdn.WafAction", + "azure.mgmt.cdn.models.WafRankingGroupBy": "Microsoft.Cdn.WafRankingGroupBy", + "azure.mgmt.cdn.models.WafRuleType": "Microsoft.Cdn.WafRuleType", + "azure.mgmt.cdn.models.WafRankingType": "Microsoft.Cdn.WafRankingType", + "azure.mgmt.cdn.models.PolicyEnabledState": "Microsoft.Cdn.PolicyEnabledState", + "azure.mgmt.cdn.models.PolicyMode": "Microsoft.Cdn.PolicyMode", + "azure.mgmt.cdn.models.PolicySettingsDefaultCustomBlockResponseStatusCode": "Microsoft.Cdn.PolicySettingsDefaultCustomBlockResponseStatusCode", + "azure.mgmt.cdn.models.CustomRuleEnabledState": "Microsoft.Cdn.CustomRuleEnabledState", + "azure.mgmt.cdn.models.WafMatchVariable": "Microsoft.Cdn.WafMatchVariable", + "azure.mgmt.cdn.models.Operator": "Microsoft.Cdn.Operator", + "azure.mgmt.cdn.models.TransformType": "Microsoft.Cdn.TransformType", + "azure.mgmt.cdn.models.ActionType": "Microsoft.Cdn.ActionType", + "azure.mgmt.cdn.models.ManagedRuleEnabledState": "Microsoft.Cdn.ManagedRuleEnabledState", + "azure.mgmt.cdn.models.ProvisioningState": "Microsoft.Cdn.ProvisioningState", + "azure.mgmt.cdn.models.PolicyResourceState": "Microsoft.Cdn.PolicyResourceState", + "azure.mgmt.cdn.operations.Operations.list": "Azure.ResourceManager.Legacy.Operations.list", + "azure.mgmt.cdn.aio.operations.Operations.list": "Azure.ResourceManager.Legacy.Operations.list", + "azure.mgmt.cdn.operations.ProfilesOperations.get": "Microsoft.Cdn.Profiles.get", + "azure.mgmt.cdn.aio.operations.ProfilesOperations.get": "Microsoft.Cdn.Profiles.get", + "azure.mgmt.cdn.operations.ProfilesOperations.begin_create": "Microsoft.Cdn.Profiles.create", + "azure.mgmt.cdn.aio.operations.ProfilesOperations.begin_create": "Microsoft.Cdn.Profiles.create", + "azure.mgmt.cdn.operations.ProfilesOperations.begin_update": "Microsoft.Cdn.Profiles.update", + "azure.mgmt.cdn.aio.operations.ProfilesOperations.begin_update": "Microsoft.Cdn.Profiles.update", + "azure.mgmt.cdn.operations.ProfilesOperations.begin_delete": "Microsoft.Cdn.Profiles.delete", + "azure.mgmt.cdn.aio.operations.ProfilesOperations.begin_delete": "Microsoft.Cdn.Profiles.delete", + "azure.mgmt.cdn.operations.ProfilesOperations.list_by_resource_group": "Microsoft.Cdn.Profiles.listByResourceGroup", + "azure.mgmt.cdn.aio.operations.ProfilesOperations.list_by_resource_group": "Microsoft.Cdn.Profiles.listByResourceGroup", + "azure.mgmt.cdn.operations.ProfilesOperations.list": "Microsoft.Cdn.Profiles.list", + "azure.mgmt.cdn.aio.operations.ProfilesOperations.list": "Microsoft.Cdn.Profiles.list", + "azure.mgmt.cdn.operations.ProfilesOperations.begin_migration_commit": "Microsoft.Cdn.Profiles.migrationCommit", + "azure.mgmt.cdn.aio.operations.ProfilesOperations.begin_migration_commit": "Microsoft.Cdn.Profiles.migrationCommit", + "azure.mgmt.cdn.operations.ProfilesOperations.generate_sso_uri": "Microsoft.Cdn.Profiles.generateSsoUri", + "azure.mgmt.cdn.aio.operations.ProfilesOperations.generate_sso_uri": "Microsoft.Cdn.Profiles.generateSsoUri", + "azure.mgmt.cdn.operations.ProfilesOperations.list_supported_optimization_types": "Microsoft.Cdn.Profiles.listSupportedOptimizationTypes", + "azure.mgmt.cdn.aio.operations.ProfilesOperations.list_supported_optimization_types": "Microsoft.Cdn.Profiles.listSupportedOptimizationTypes", + "azure.mgmt.cdn.operations.ProfilesOperations.list_resource_usage": "Microsoft.Cdn.Profiles.profilesListResourceUsage", + "azure.mgmt.cdn.aio.operations.ProfilesOperations.list_resource_usage": "Microsoft.Cdn.Profiles.profilesListResourceUsage", + "azure.mgmt.cdn.operations.ProfilesOperations.begin_cdn_can_migrate_to_afd": "Microsoft.Cdn.Profiles.cdnCanMigrateToAfd", + "azure.mgmt.cdn.aio.operations.ProfilesOperations.begin_cdn_can_migrate_to_afd": "Microsoft.Cdn.Profiles.cdnCanMigrateToAfd", + "azure.mgmt.cdn.operations.ProfilesOperations.begin_cdn_migrate_to_afd": "Microsoft.Cdn.Profiles.cdnMigrateToAfd", + "azure.mgmt.cdn.aio.operations.ProfilesOperations.begin_cdn_migrate_to_afd": "Microsoft.Cdn.Profiles.cdnMigrateToAfd", + "azure.mgmt.cdn.operations.ProfilesOperations.begin_migration_abort": "Microsoft.Cdn.Profiles.migrationAbort", + "azure.mgmt.cdn.aio.operations.ProfilesOperations.begin_migration_abort": "Microsoft.Cdn.Profiles.migrationAbort", + "azure.mgmt.cdn.operations.ProfilesOperations.begin_can_migrate": "Microsoft.Cdn.ProfilesOperationGroup.canMigrate", + "azure.mgmt.cdn.aio.operations.ProfilesOperations.begin_can_migrate": "Microsoft.Cdn.ProfilesOperationGroup.canMigrate", + "azure.mgmt.cdn.operations.ProfilesOperations.begin_migrate": "Microsoft.Cdn.ProfilesOperationGroup.migrate", + "azure.mgmt.cdn.aio.operations.ProfilesOperations.begin_migrate": "Microsoft.Cdn.ProfilesOperationGroup.migrate", + "azure.mgmt.cdn.operations.AFDEndpointsOperations.get": "Microsoft.Cdn.AFDEndpoints.get", + "azure.mgmt.cdn.aio.operations.AFDEndpointsOperations.get": "Microsoft.Cdn.AFDEndpoints.get", + "azure.mgmt.cdn.operations.AFDEndpointsOperations.begin_create": "Microsoft.Cdn.AFDEndpoints.create", + "azure.mgmt.cdn.aio.operations.AFDEndpointsOperations.begin_create": "Microsoft.Cdn.AFDEndpoints.create", + "azure.mgmt.cdn.operations.AFDEndpointsOperations.begin_update": "Microsoft.Cdn.AFDEndpoints.update", + "azure.mgmt.cdn.aio.operations.AFDEndpointsOperations.begin_update": "Microsoft.Cdn.AFDEndpoints.update", + "azure.mgmt.cdn.operations.AFDEndpointsOperations.begin_delete": "Microsoft.Cdn.AFDEndpoints.delete", + "azure.mgmt.cdn.aio.operations.AFDEndpointsOperations.begin_delete": "Microsoft.Cdn.AFDEndpoints.delete", + "azure.mgmt.cdn.operations.AFDEndpointsOperations.list_by_profile": "Microsoft.Cdn.AFDEndpoints.listByProfile", + "azure.mgmt.cdn.aio.operations.AFDEndpointsOperations.list_by_profile": "Microsoft.Cdn.AFDEndpoints.listByProfile", + "azure.mgmt.cdn.operations.AFDEndpointsOperations.begin_purge_content": "Microsoft.Cdn.AFDEndpoints.purgeContent", + "azure.mgmt.cdn.aio.operations.AFDEndpointsOperations.begin_purge_content": "Microsoft.Cdn.AFDEndpoints.purgeContent", + "azure.mgmt.cdn.operations.AFDEndpointsOperations.list_resource_usage": "Microsoft.Cdn.AFDEndpoints.listResourceUsage", + "azure.mgmt.cdn.aio.operations.AFDEndpointsOperations.list_resource_usage": "Microsoft.Cdn.AFDEndpoints.listResourceUsage", + "azure.mgmt.cdn.operations.AFDEndpointsOperations.validate_custom_domain": "Microsoft.Cdn.AFDEndpoints.validateCustomDomain", + "azure.mgmt.cdn.aio.operations.AFDEndpointsOperations.validate_custom_domain": "Microsoft.Cdn.AFDEndpoints.validateCustomDomain", + "azure.mgmt.cdn.operations.AFDOriginGroupsOperations.get": "Microsoft.Cdn.AFDOriginGroups.get", + "azure.mgmt.cdn.aio.operations.AFDOriginGroupsOperations.get": "Microsoft.Cdn.AFDOriginGroups.get", + "azure.mgmt.cdn.operations.AFDOriginGroupsOperations.begin_create": "Microsoft.Cdn.AFDOriginGroups.create", + "azure.mgmt.cdn.aio.operations.AFDOriginGroupsOperations.begin_create": "Microsoft.Cdn.AFDOriginGroups.create", + "azure.mgmt.cdn.operations.AFDOriginGroupsOperations.begin_update": "Microsoft.Cdn.AFDOriginGroups.update", + "azure.mgmt.cdn.aio.operations.AFDOriginGroupsOperations.begin_update": "Microsoft.Cdn.AFDOriginGroups.update", + "azure.mgmt.cdn.operations.AFDOriginGroupsOperations.begin_delete": "Microsoft.Cdn.AFDOriginGroups.delete", + "azure.mgmt.cdn.aio.operations.AFDOriginGroupsOperations.begin_delete": "Microsoft.Cdn.AFDOriginGroups.delete", + "azure.mgmt.cdn.operations.AFDOriginGroupsOperations.list_by_profile": "Microsoft.Cdn.AFDOriginGroups.listByProfile", + "azure.mgmt.cdn.aio.operations.AFDOriginGroupsOperations.list_by_profile": "Microsoft.Cdn.AFDOriginGroups.listByProfile", + "azure.mgmt.cdn.operations.AFDOriginGroupsOperations.list_resource_usage": "Microsoft.Cdn.AFDOriginGroups.listResourceUsage", + "azure.mgmt.cdn.aio.operations.AFDOriginGroupsOperations.list_resource_usage": "Microsoft.Cdn.AFDOriginGroups.listResourceUsage", + "azure.mgmt.cdn.operations.AFDOriginsOperations.get": "Microsoft.Cdn.AFDOrigins.get", + "azure.mgmt.cdn.aio.operations.AFDOriginsOperations.get": "Microsoft.Cdn.AFDOrigins.get", + "azure.mgmt.cdn.operations.AFDOriginsOperations.begin_create": "Microsoft.Cdn.AFDOrigins.create", + "azure.mgmt.cdn.aio.operations.AFDOriginsOperations.begin_create": "Microsoft.Cdn.AFDOrigins.create", + "azure.mgmt.cdn.operations.AFDOriginsOperations.begin_update": "Microsoft.Cdn.AFDOrigins.update", + "azure.mgmt.cdn.aio.operations.AFDOriginsOperations.begin_update": "Microsoft.Cdn.AFDOrigins.update", + "azure.mgmt.cdn.operations.AFDOriginsOperations.begin_delete": "Microsoft.Cdn.AFDOrigins.delete", + "azure.mgmt.cdn.aio.operations.AFDOriginsOperations.begin_delete": "Microsoft.Cdn.AFDOrigins.delete", + "azure.mgmt.cdn.operations.AFDOriginsOperations.list_by_origin_group": "Microsoft.Cdn.AFDOrigins.listByOriginGroup", + "azure.mgmt.cdn.aio.operations.AFDOriginsOperations.list_by_origin_group": "Microsoft.Cdn.AFDOrigins.listByOriginGroup", + "azure.mgmt.cdn.operations.RoutesOperations.get": "Microsoft.Cdn.Routes.get", + "azure.mgmt.cdn.aio.operations.RoutesOperations.get": "Microsoft.Cdn.Routes.get", + "azure.mgmt.cdn.operations.RoutesOperations.begin_create": "Microsoft.Cdn.Routes.create", + "azure.mgmt.cdn.aio.operations.RoutesOperations.begin_create": "Microsoft.Cdn.Routes.create", + "azure.mgmt.cdn.operations.RoutesOperations.begin_update": "Microsoft.Cdn.Routes.update", + "azure.mgmt.cdn.aio.operations.RoutesOperations.begin_update": "Microsoft.Cdn.Routes.update", + "azure.mgmt.cdn.operations.RoutesOperations.begin_delete": "Microsoft.Cdn.Routes.delete", + "azure.mgmt.cdn.aio.operations.RoutesOperations.begin_delete": "Microsoft.Cdn.Routes.delete", + "azure.mgmt.cdn.operations.RoutesOperations.list_by_endpoint": "Microsoft.Cdn.Routes.listByEndpoint", + "azure.mgmt.cdn.aio.operations.RoutesOperations.list_by_endpoint": "Microsoft.Cdn.Routes.listByEndpoint", + "azure.mgmt.cdn.operations.RuleSetsOperations.get": "Microsoft.Cdn.RuleSets.get", + "azure.mgmt.cdn.aio.operations.RuleSetsOperations.get": "Microsoft.Cdn.RuleSets.get", + "azure.mgmt.cdn.operations.RuleSetsOperations.create": "Microsoft.Cdn.RuleSets.create", + "azure.mgmt.cdn.aio.operations.RuleSetsOperations.create": "Microsoft.Cdn.RuleSets.create", + "azure.mgmt.cdn.operations.RuleSetsOperations.begin_delete": "Microsoft.Cdn.RuleSets.delete", + "azure.mgmt.cdn.aio.operations.RuleSetsOperations.begin_delete": "Microsoft.Cdn.RuleSets.delete", + "azure.mgmt.cdn.operations.RuleSetsOperations.list_by_profile": "Microsoft.Cdn.RuleSets.listByProfile", + "azure.mgmt.cdn.aio.operations.RuleSetsOperations.list_by_profile": "Microsoft.Cdn.RuleSets.listByProfile", + "azure.mgmt.cdn.operations.RuleSetsOperations.list_resource_usage": "Microsoft.Cdn.RuleSets.listResourceUsage", + "azure.mgmt.cdn.aio.operations.RuleSetsOperations.list_resource_usage": "Microsoft.Cdn.RuleSets.listResourceUsage", + "azure.mgmt.cdn.operations.RulesOperations.get": "Microsoft.Cdn.Rules.get", + "azure.mgmt.cdn.aio.operations.RulesOperations.get": "Microsoft.Cdn.Rules.get", + "azure.mgmt.cdn.operations.RulesOperations.begin_create": "Microsoft.Cdn.Rules.create", + "azure.mgmt.cdn.aio.operations.RulesOperations.begin_create": "Microsoft.Cdn.Rules.create", + "azure.mgmt.cdn.operations.RulesOperations.begin_update": "Microsoft.Cdn.Rules.update", + "azure.mgmt.cdn.aio.operations.RulesOperations.begin_update": "Microsoft.Cdn.Rules.update", + "azure.mgmt.cdn.operations.RulesOperations.begin_delete": "Microsoft.Cdn.Rules.delete", + "azure.mgmt.cdn.aio.operations.RulesOperations.begin_delete": "Microsoft.Cdn.Rules.delete", + "azure.mgmt.cdn.operations.RulesOperations.list_by_rule_set": "Microsoft.Cdn.Rules.listByRuleSet", + "azure.mgmt.cdn.aio.operations.RulesOperations.list_by_rule_set": "Microsoft.Cdn.Rules.listByRuleSet", + "azure.mgmt.cdn.operations.SecurityPoliciesOperations.get": "Microsoft.Cdn.SecurityPolicies.get", + "azure.mgmt.cdn.aio.operations.SecurityPoliciesOperations.get": "Microsoft.Cdn.SecurityPolicies.get", + "azure.mgmt.cdn.operations.SecurityPoliciesOperations.begin_create": "Microsoft.Cdn.SecurityPolicies.create", + "azure.mgmt.cdn.aio.operations.SecurityPoliciesOperations.begin_create": "Microsoft.Cdn.SecurityPolicies.create", + "azure.mgmt.cdn.operations.SecurityPoliciesOperations.begin_patch": "Microsoft.Cdn.SecurityPolicies.patch", + "azure.mgmt.cdn.aio.operations.SecurityPoliciesOperations.begin_patch": "Microsoft.Cdn.SecurityPolicies.patch", + "azure.mgmt.cdn.operations.SecurityPoliciesOperations.begin_delete": "Microsoft.Cdn.SecurityPolicies.delete", + "azure.mgmt.cdn.aio.operations.SecurityPoliciesOperations.begin_delete": "Microsoft.Cdn.SecurityPolicies.delete", + "azure.mgmt.cdn.operations.SecurityPoliciesOperations.list_by_profile": "Microsoft.Cdn.SecurityPolicies.listByProfile", + "azure.mgmt.cdn.aio.operations.SecurityPoliciesOperations.list_by_profile": "Microsoft.Cdn.SecurityPolicies.listByProfile", + "azure.mgmt.cdn.operations.SecretsOperations.get": "Microsoft.Cdn.Secrets.get", + "azure.mgmt.cdn.aio.operations.SecretsOperations.get": "Microsoft.Cdn.Secrets.get", + "azure.mgmt.cdn.operations.SecretsOperations.begin_create": "Microsoft.Cdn.Secrets.create", + "azure.mgmt.cdn.aio.operations.SecretsOperations.begin_create": "Microsoft.Cdn.Secrets.create", + "azure.mgmt.cdn.operations.SecretsOperations.begin_delete": "Microsoft.Cdn.Secrets.delete", + "azure.mgmt.cdn.aio.operations.SecretsOperations.begin_delete": "Microsoft.Cdn.Secrets.delete", + "azure.mgmt.cdn.operations.SecretsOperations.list_by_profile": "Microsoft.Cdn.Secrets.listByProfile", + "azure.mgmt.cdn.aio.operations.SecretsOperations.list_by_profile": "Microsoft.Cdn.Secrets.listByProfile", + "azure.mgmt.cdn.operations.EndpointsOperations.get": "Microsoft.Cdn.Endpoints.get", + "azure.mgmt.cdn.aio.operations.EndpointsOperations.get": "Microsoft.Cdn.Endpoints.get", + "azure.mgmt.cdn.operations.EndpointsOperations.begin_create": "Microsoft.Cdn.Endpoints.create", + "azure.mgmt.cdn.aio.operations.EndpointsOperations.begin_create": "Microsoft.Cdn.Endpoints.create", + "azure.mgmt.cdn.operations.EndpointsOperations.begin_update": "Microsoft.Cdn.Endpoints.update", + "azure.mgmt.cdn.aio.operations.EndpointsOperations.begin_update": "Microsoft.Cdn.Endpoints.update", + "azure.mgmt.cdn.operations.EndpointsOperations.begin_delete": "Microsoft.Cdn.Endpoints.delete", + "azure.mgmt.cdn.aio.operations.EndpointsOperations.begin_delete": "Microsoft.Cdn.Endpoints.delete", + "azure.mgmt.cdn.operations.EndpointsOperations.list_by_profile": "Microsoft.Cdn.Endpoints.listByProfile", + "azure.mgmt.cdn.aio.operations.EndpointsOperations.list_by_profile": "Microsoft.Cdn.Endpoints.listByProfile", + "azure.mgmt.cdn.operations.EndpointsOperations.begin_start": "Microsoft.Cdn.Endpoints.start", + "azure.mgmt.cdn.aio.operations.EndpointsOperations.begin_start": "Microsoft.Cdn.Endpoints.start", + "azure.mgmt.cdn.operations.EndpointsOperations.begin_stop": "Microsoft.Cdn.Endpoints.stop", + "azure.mgmt.cdn.aio.operations.EndpointsOperations.begin_stop": "Microsoft.Cdn.Endpoints.stop", + "azure.mgmt.cdn.operations.EndpointsOperations.begin_purge_content": "Microsoft.Cdn.Endpoints.purgeContent", + "azure.mgmt.cdn.aio.operations.EndpointsOperations.begin_purge_content": "Microsoft.Cdn.Endpoints.purgeContent", + "azure.mgmt.cdn.operations.EndpointsOperations.begin_load_content": "Microsoft.Cdn.Endpoints.loadContent", + "azure.mgmt.cdn.aio.operations.EndpointsOperations.begin_load_content": "Microsoft.Cdn.Endpoints.loadContent", + "azure.mgmt.cdn.operations.EndpointsOperations.validate_custom_domain": "Microsoft.Cdn.Endpoints.validateCustomDomain", + "azure.mgmt.cdn.aio.operations.EndpointsOperations.validate_custom_domain": "Microsoft.Cdn.Endpoints.validateCustomDomain", + "azure.mgmt.cdn.operations.EndpointsOperations.list_resource_usage": "Microsoft.Cdn.Endpoints.listResourceUsage", + "azure.mgmt.cdn.aio.operations.EndpointsOperations.list_resource_usage": "Microsoft.Cdn.Endpoints.listResourceUsage", + "azure.mgmt.cdn.operations.OriginsOperations.get": "Microsoft.Cdn.Origins.get", + "azure.mgmt.cdn.aio.operations.OriginsOperations.get": "Microsoft.Cdn.Origins.get", + "azure.mgmt.cdn.operations.OriginsOperations.begin_create": "Microsoft.Cdn.Origins.create", + "azure.mgmt.cdn.aio.operations.OriginsOperations.begin_create": "Microsoft.Cdn.Origins.create", + "azure.mgmt.cdn.operations.OriginsOperations.begin_update": "Microsoft.Cdn.Origins.update", + "azure.mgmt.cdn.aio.operations.OriginsOperations.begin_update": "Microsoft.Cdn.Origins.update", + "azure.mgmt.cdn.operations.OriginsOperations.begin_delete": "Microsoft.Cdn.Origins.delete", + "azure.mgmt.cdn.aio.operations.OriginsOperations.begin_delete": "Microsoft.Cdn.Origins.delete", + "azure.mgmt.cdn.operations.OriginsOperations.list_by_endpoint": "Microsoft.Cdn.Origins.listByEndpoint", + "azure.mgmt.cdn.aio.operations.OriginsOperations.list_by_endpoint": "Microsoft.Cdn.Origins.listByEndpoint", + "azure.mgmt.cdn.operations.OriginGroupsOperations.get": "Microsoft.Cdn.OriginGroups.get", + "azure.mgmt.cdn.aio.operations.OriginGroupsOperations.get": "Microsoft.Cdn.OriginGroups.get", + "azure.mgmt.cdn.operations.OriginGroupsOperations.begin_create": "Microsoft.Cdn.OriginGroups.create", + "azure.mgmt.cdn.aio.operations.OriginGroupsOperations.begin_create": "Microsoft.Cdn.OriginGroups.create", + "azure.mgmt.cdn.operations.OriginGroupsOperations.begin_update": "Microsoft.Cdn.OriginGroups.update", + "azure.mgmt.cdn.aio.operations.OriginGroupsOperations.begin_update": "Microsoft.Cdn.OriginGroups.update", + "azure.mgmt.cdn.operations.OriginGroupsOperations.begin_delete": "Microsoft.Cdn.OriginGroups.delete", + "azure.mgmt.cdn.aio.operations.OriginGroupsOperations.begin_delete": "Microsoft.Cdn.OriginGroups.delete", + "azure.mgmt.cdn.operations.OriginGroupsOperations.list_by_endpoint": "Microsoft.Cdn.OriginGroups.listByEndpoint", + "azure.mgmt.cdn.aio.operations.OriginGroupsOperations.list_by_endpoint": "Microsoft.Cdn.OriginGroups.listByEndpoint", + "azure.mgmt.cdn.operations.CustomDomainsOperations.get": "Microsoft.Cdn.CustomDomains.get", + "azure.mgmt.cdn.aio.operations.CustomDomainsOperations.get": "Microsoft.Cdn.CustomDomains.get", + "azure.mgmt.cdn.operations.CustomDomainsOperations.begin_create": "Microsoft.Cdn.CustomDomains.create", + "azure.mgmt.cdn.aio.operations.CustomDomainsOperations.begin_create": "Microsoft.Cdn.CustomDomains.create", + "azure.mgmt.cdn.operations.CustomDomainsOperations.begin_delete": "Microsoft.Cdn.CustomDomains.delete", + "azure.mgmt.cdn.aio.operations.CustomDomainsOperations.begin_delete": "Microsoft.Cdn.CustomDomains.delete", + "azure.mgmt.cdn.operations.CustomDomainsOperations.list_by_endpoint": "Microsoft.Cdn.CustomDomains.listByEndpoint", + "azure.mgmt.cdn.aio.operations.CustomDomainsOperations.list_by_endpoint": "Microsoft.Cdn.CustomDomains.listByEndpoint", + "azure.mgmt.cdn.operations.CustomDomainsOperations.begin_disable_custom_https": "Microsoft.Cdn.CustomDomains.disableCustomHttps", + "azure.mgmt.cdn.aio.operations.CustomDomainsOperations.begin_disable_custom_https": "Microsoft.Cdn.CustomDomains.disableCustomHttps", + "azure.mgmt.cdn.operations.CustomDomainsOperations.begin_enable_custom_https": "Microsoft.Cdn.CustomDomains.enableCustomHttps", + "azure.mgmt.cdn.aio.operations.CustomDomainsOperations.begin_enable_custom_https": "Microsoft.Cdn.CustomDomains.enableCustomHttps", + "azure.mgmt.cdn.operations.AFDCustomDomainsOperations.get": "Microsoft.Cdn.AFDDomains.get", + "azure.mgmt.cdn.aio.operations.AFDCustomDomainsOperations.get": "Microsoft.Cdn.AFDDomains.get", + "azure.mgmt.cdn.operations.AFDCustomDomainsOperations.begin_create": "Microsoft.Cdn.AFDDomains.create", + "azure.mgmt.cdn.aio.operations.AFDCustomDomainsOperations.begin_create": "Microsoft.Cdn.AFDDomains.create", + "azure.mgmt.cdn.operations.AFDCustomDomainsOperations.begin_update": "Microsoft.Cdn.AFDDomains.update", + "azure.mgmt.cdn.aio.operations.AFDCustomDomainsOperations.begin_update": "Microsoft.Cdn.AFDDomains.update", + "azure.mgmt.cdn.operations.AFDCustomDomainsOperations.begin_delete": "Microsoft.Cdn.AFDDomains.delete", + "azure.mgmt.cdn.aio.operations.AFDCustomDomainsOperations.begin_delete": "Microsoft.Cdn.AFDDomains.delete", + "azure.mgmt.cdn.operations.AFDCustomDomainsOperations.list_by_profile": "Microsoft.Cdn.AFDDomains.listByProfile", + "azure.mgmt.cdn.aio.operations.AFDCustomDomainsOperations.list_by_profile": "Microsoft.Cdn.AFDDomains.listByProfile", + "azure.mgmt.cdn.operations.AFDCustomDomainsOperations.begin_refresh_validation_token": "Microsoft.Cdn.AFDDomains.refreshValidationToken", + "azure.mgmt.cdn.aio.operations.AFDCustomDomainsOperations.begin_refresh_validation_token": "Microsoft.Cdn.AFDDomains.refreshValidationToken", + "azure.mgmt.cdn.operations.AFDProfilesOperations.check_endpoint_name_availability": "Microsoft.Cdn.Profiles.checkEndpointNameAvailability", + "azure.mgmt.cdn.aio.operations.AFDProfilesOperations.check_endpoint_name_availability": "Microsoft.Cdn.Profiles.checkEndpointNameAvailability", + "azure.mgmt.cdn.operations.AFDProfilesOperations.list_resource_usage": "Microsoft.Cdn.Profiles.listResourceUsage", + "azure.mgmt.cdn.aio.operations.AFDProfilesOperations.list_resource_usage": "Microsoft.Cdn.Profiles.listResourceUsage", + "azure.mgmt.cdn.operations.AFDProfilesOperations.check_host_name_availability": "Microsoft.Cdn.Profiles.checkHostNameAvailability", + "azure.mgmt.cdn.aio.operations.AFDProfilesOperations.check_host_name_availability": "Microsoft.Cdn.Profiles.checkHostNameAvailability", + "azure.mgmt.cdn.operations.AFDProfilesOperations.validate_secret": "Microsoft.Cdn.Profiles.validateSecret", + "azure.mgmt.cdn.aio.operations.AFDProfilesOperations.validate_secret": "Microsoft.Cdn.Profiles.validateSecret", + "azure.mgmt.cdn.operations.AFDProfilesOperations.begin_upgrade": "Microsoft.Cdn.Profiles.upgrade", + "azure.mgmt.cdn.aio.operations.AFDProfilesOperations.begin_upgrade": "Microsoft.Cdn.Profiles.upgrade", + "azure.mgmt.cdn.operations.LogAnalyticsOperations.get_log_analytics_metrics": "Microsoft.Cdn.Profiles.getLogAnalyticsMetrics", + "azure.mgmt.cdn.aio.operations.LogAnalyticsOperations.get_log_analytics_metrics": "Microsoft.Cdn.Profiles.getLogAnalyticsMetrics", + "azure.mgmt.cdn.operations.LogAnalyticsOperations.get_log_analytics_rankings": "Microsoft.Cdn.Profiles.getLogAnalyticsRankings", + "azure.mgmt.cdn.aio.operations.LogAnalyticsOperations.get_log_analytics_rankings": "Microsoft.Cdn.Profiles.getLogAnalyticsRankings", + "azure.mgmt.cdn.operations.LogAnalyticsOperations.get_log_analytics_locations": "Microsoft.Cdn.Profiles.getLogAnalyticsLocations", + "azure.mgmt.cdn.aio.operations.LogAnalyticsOperations.get_log_analytics_locations": "Microsoft.Cdn.Profiles.getLogAnalyticsLocations", + "azure.mgmt.cdn.operations.LogAnalyticsOperations.get_log_analytics_resources": "Microsoft.Cdn.Profiles.getLogAnalyticsResources", + "azure.mgmt.cdn.aio.operations.LogAnalyticsOperations.get_log_analytics_resources": "Microsoft.Cdn.Profiles.getLogAnalyticsResources", + "azure.mgmt.cdn.operations.LogAnalyticsOperations.get_waf_log_analytics_metrics": "Microsoft.Cdn.Profiles.getWafLogAnalyticsMetrics", + "azure.mgmt.cdn.aio.operations.LogAnalyticsOperations.get_waf_log_analytics_metrics": "Microsoft.Cdn.Profiles.getWafLogAnalyticsMetrics", + "azure.mgmt.cdn.operations.LogAnalyticsOperations.get_waf_log_analytics_rankings": "Microsoft.Cdn.Profiles.getWafLogAnalyticsRankings", + "azure.mgmt.cdn.aio.operations.LogAnalyticsOperations.get_waf_log_analytics_rankings": "Microsoft.Cdn.Profiles.getWafLogAnalyticsRankings", + "azure.mgmt.cdn.operations.PoliciesOperations.get": "Microsoft.Cdn.CdnWebApplicationFirewallPolicies.get", + "azure.mgmt.cdn.aio.operations.PoliciesOperations.get": "Microsoft.Cdn.CdnWebApplicationFirewallPolicies.get", + "azure.mgmt.cdn.operations.PoliciesOperations.begin_create_or_update": "Microsoft.Cdn.CdnWebApplicationFirewallPolicies.createOrUpdate", + "azure.mgmt.cdn.aio.operations.PoliciesOperations.begin_create_or_update": "Microsoft.Cdn.CdnWebApplicationFirewallPolicies.createOrUpdate", + "azure.mgmt.cdn.operations.PoliciesOperations.begin_update": "Microsoft.Cdn.CdnWebApplicationFirewallPolicies.update", + "azure.mgmt.cdn.aio.operations.PoliciesOperations.begin_update": "Microsoft.Cdn.CdnWebApplicationFirewallPolicies.update", + "azure.mgmt.cdn.operations.PoliciesOperations.delete": "Microsoft.Cdn.CdnWebApplicationFirewallPolicies.delete", + "azure.mgmt.cdn.aio.operations.PoliciesOperations.delete": "Microsoft.Cdn.CdnWebApplicationFirewallPolicies.delete", + "azure.mgmt.cdn.operations.PoliciesOperations.list": "Microsoft.Cdn.CdnWebApplicationFirewallPolicies.list", + "azure.mgmt.cdn.aio.operations.PoliciesOperations.list": "Microsoft.Cdn.CdnWebApplicationFirewallPolicies.list", + "azure.mgmt.cdn.operations.ResourceUsageOperations.list": "Microsoft.Cdn.ResourceUsageOperationGroup.list", + "azure.mgmt.cdn.aio.operations.ResourceUsageOperations.list": "Microsoft.Cdn.ResourceUsageOperationGroup.list", + "azure.mgmt.cdn.operations.EdgeNodesOperations.list": "Microsoft.Cdn.EdgeNodesOperationGroup.list", + "azure.mgmt.cdn.aio.operations.EdgeNodesOperations.list": "Microsoft.Cdn.EdgeNodesOperationGroup.list", + "azure.mgmt.cdn.operations.ManagedRuleSetsOperations.list": "Microsoft.Cdn.ManagedRuleSetsOperationGroup.list", + "azure.mgmt.cdn.aio.operations.ManagedRuleSetsOperations.list": "Microsoft.Cdn.ManagedRuleSetsOperationGroup.list", + "azure.mgmt.cdn.CdnClient.check_endpoint_name_availability": "Microsoft.Cdn.checkEndpointNameAvailability", + "azure.mgmt.cdn.aio.CdnClient.check_endpoint_name_availability": "Microsoft.Cdn.checkEndpointNameAvailability", + "azure.mgmt.cdn.CdnClient.check_name_availability": "Microsoft.Cdn.checkNameAvailability", + "azure.mgmt.cdn.aio.CdnClient.check_name_availability": "Microsoft.Cdn.checkNameAvailability", + "azure.mgmt.cdn.CdnClient.check_name_availability_with_subscription": "Microsoft.Cdn.checkNameAvailabilityWithSubscription", + "azure.mgmt.cdn.aio.CdnClient.check_name_availability_with_subscription": "Microsoft.Cdn.checkNameAvailabilityWithSubscription", + "azure.mgmt.cdn.CdnClient.validate_probe": "Microsoft.Cdn.validateProbe", + "azure.mgmt.cdn.aio.CdnClient.validate_probe": "Microsoft.Cdn.validateProbe" + }, + "CrossLanguageVersion": "e6aecd637d4d" } \ No newline at end of file diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/__init__.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/__init__.py index 333e59422592..b9bb6b0c2137 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/__init__.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/__init__.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # pylint: disable=wrong-import-position @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._cdn_management_client import CdnManagementClient # type: ignore +from ._client import CdnClient # type: ignore from ._version import VERSION __version__ = VERSION @@ -25,7 +25,7 @@ from ._patch import patch_sdk as _patch_sdk __all__ = [ - "CdnManagementClient", + "CdnClient", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/_cdn_management_client.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/_client.py similarity index 86% rename from sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/_cdn_management_client.py rename to sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/_client.py index 1abaecf3ec76..df481899743f 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/_cdn_management_client.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/_client.py @@ -2,13 +2,13 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from copy import deepcopy +import sys from typing import Any, Optional, TYPE_CHECKING, cast -from typing_extensions import Self from azure.core.pipeline import policies from azure.core.rest import HttpRequest, HttpResponse @@ -17,8 +17,7 @@ from azure.mgmt.core.policies import ARMAutoResourceProviderRegistrationPolicy from azure.mgmt.core.tools import get_arm_endpoints -from . import models as _models -from ._configuration import CdnManagementClientConfiguration +from ._configuration import CdnClientConfiguration from ._utils.serialization import Deserializer, Serializer from .operations import ( AFDCustomDomainsOperations, @@ -42,21 +41,27 @@ RulesOperations, SecretsOperations, SecurityPoliciesOperations, - _CdnManagementClientOperationsMixin, + _CdnClientOperationsMixin, ) +if sys.version_info >= (3, 11): + from typing import Self +else: + from typing_extensions import Self # type: ignore + if TYPE_CHECKING: from azure.core import AzureClouds from azure.core.credentials import TokenCredential -class CdnManagementClient(_CdnManagementClientOperationsMixin): # pylint: disable=too-many-instance-attributes - """Cdn Management Client. +class CdnClient(_CdnClientOperationsMixin): # pylint: disable=too-many-instance-attributes + """Use these APIs to manage Azure Front Door and CDN resources through the Azure Resource Manager. + You must make sure that requests made to these resources are secure. - :ivar afd_profiles: AFDProfilesOperations operations - :vartype afd_profiles: azure.mgmt.cdn.operations.AFDProfilesOperations - :ivar afd_custom_domains: AFDCustomDomainsOperations operations - :vartype afd_custom_domains: azure.mgmt.cdn.operations.AFDCustomDomainsOperations + :ivar operations: Operations operations + :vartype operations: azure.mgmt.cdn.operations.Operations + :ivar profiles: ProfilesOperations operations + :vartype profiles: azure.mgmt.cdn.operations.ProfilesOperations :ivar afd_endpoints: AFDEndpointsOperations operations :vartype afd_endpoints: azure.mgmt.cdn.operations.AFDEndpointsOperations :ivar afd_origin_groups: AFDOriginGroupsOperations operations @@ -73,10 +78,6 @@ class CdnManagementClient(_CdnManagementClientOperationsMixin): # pylint: disab :vartype security_policies: azure.mgmt.cdn.operations.SecurityPoliciesOperations :ivar secrets: SecretsOperations operations :vartype secrets: azure.mgmt.cdn.operations.SecretsOperations - :ivar log_analytics: LogAnalyticsOperations operations - :vartype log_analytics: azure.mgmt.cdn.operations.LogAnalyticsOperations - :ivar profiles: ProfilesOperations operations - :vartype profiles: azure.mgmt.cdn.operations.ProfilesOperations :ivar endpoints: EndpointsOperations operations :vartype endpoints: azure.mgmt.cdn.operations.EndpointsOperations :ivar origins: OriginsOperations operations @@ -85,27 +86,32 @@ class CdnManagementClient(_CdnManagementClientOperationsMixin): # pylint: disab :vartype origin_groups: azure.mgmt.cdn.operations.OriginGroupsOperations :ivar custom_domains: CustomDomainsOperations operations :vartype custom_domains: azure.mgmt.cdn.operations.CustomDomainsOperations + :ivar afd_custom_domains: AFDCustomDomainsOperations operations + :vartype afd_custom_domains: azure.mgmt.cdn.operations.AFDCustomDomainsOperations + :ivar afd_profiles: AFDProfilesOperations operations + :vartype afd_profiles: azure.mgmt.cdn.operations.AFDProfilesOperations + :ivar log_analytics: LogAnalyticsOperations operations + :vartype log_analytics: azure.mgmt.cdn.operations.LogAnalyticsOperations + :ivar policies: PoliciesOperations operations + :vartype policies: azure.mgmt.cdn.operations.PoliciesOperations :ivar resource_usage: ResourceUsageOperations operations :vartype resource_usage: azure.mgmt.cdn.operations.ResourceUsageOperations - :ivar operations: Operations operations - :vartype operations: azure.mgmt.cdn.operations.Operations :ivar edge_nodes: EdgeNodesOperations operations :vartype edge_nodes: azure.mgmt.cdn.operations.EdgeNodesOperations - :ivar policies: PoliciesOperations operations - :vartype policies: azure.mgmt.cdn.operations.PoliciesOperations :ivar managed_rule_sets: ManagedRuleSetsOperations operations :vartype managed_rule_sets: azure.mgmt.cdn.operations.ManagedRuleSetsOperations - :param credential: Credential needed for the client to connect to Azure. Required. + :param credential: Credential used to authenticate requests to the service. Required. :type credential: ~azure.core.credentials.TokenCredential :param subscription_id: The ID of the target subscription. The value must be an UUID. Required. :type subscription_id: str - :param base_url: Service URL. Default value is None. + :param base_url: Service host. Default value is None. :type base_url: str :keyword cloud_setting: The cloud setting for which to get the ARM endpoint. Default value is None. :paramtype cloud_setting: ~azure.core.AzureClouds - :keyword api_version: Api Version. Default value is "2025-06-01". Note that overriding this - default value may result in unsupported behavior. + :keyword api_version: The API version to use for this operation. Known values are "2025-06-01" + and None. Default value is None. If not set, the operation's default API version will be used. + 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,14 +126,16 @@ def __init__( cloud_setting: Optional["AzureClouds"] = None, **kwargs: Any ) -> None: + _endpoint = "{endpoint}" _cloud = cloud_setting or settings.current.azure_cloud # type: ignore _endpoints = get_arm_endpoints(_cloud) if not base_url: base_url = _endpoints["resource_manager"] credential_scopes = kwargs.pop("credential_scopes", _endpoints["credential_scopes"]) - self._config = CdnManagementClientConfiguration( + self._config = CdnClientConfiguration( credential=credential, subscription_id=subscription_id, + base_url=cast(str, base_url), cloud_setting=cloud_setting, credential_scopes=credential_scopes, **kwargs @@ -151,16 +159,13 @@ def __init__( policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None, self._config.http_logging_policy, ] - self._client: ARMPipelineClient = ARMPipelineClient(base_url=cast(str, base_url), policies=_policies, **kwargs) + self._client: ARMPipelineClient = ARMPipelineClient(base_url=cast(str, _endpoint), policies=_policies, **kwargs) - client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)} - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) + self._serialize = Serializer() + self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.afd_profiles = AFDProfilesOperations(self._client, self._config, self._serialize, self._deserialize) - self.afd_custom_domains = AFDCustomDomainsOperations( - self._client, self._config, self._serialize, self._deserialize - ) + self.operations = Operations(self._client, self._config, self._serialize, self._deserialize) + self.profiles = ProfilesOperations(self._client, self._config, self._serialize, self._deserialize) self.afd_endpoints = AFDEndpointsOperations(self._client, self._config, self._serialize, self._deserialize) self.afd_origin_groups = AFDOriginGroupsOperations( self._client, self._config, self._serialize, self._deserialize @@ -173,27 +178,29 @@ def __init__( self._client, self._config, self._serialize, self._deserialize ) self.secrets = SecretsOperations(self._client, self._config, self._serialize, self._deserialize) - self.log_analytics = LogAnalyticsOperations(self._client, self._config, self._serialize, self._deserialize) - self.profiles = ProfilesOperations(self._client, self._config, self._serialize, self._deserialize) self.endpoints = EndpointsOperations(self._client, self._config, self._serialize, self._deserialize) self.origins = OriginsOperations(self._client, self._config, self._serialize, self._deserialize) self.origin_groups = OriginGroupsOperations(self._client, self._config, self._serialize, self._deserialize) self.custom_domains = CustomDomainsOperations(self._client, self._config, self._serialize, self._deserialize) + self.afd_custom_domains = AFDCustomDomainsOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.afd_profiles = AFDProfilesOperations(self._client, self._config, self._serialize, self._deserialize) + self.log_analytics = LogAnalyticsOperations(self._client, self._config, self._serialize, self._deserialize) + self.policies = PoliciesOperations(self._client, self._config, self._serialize, self._deserialize) self.resource_usage = ResourceUsageOperations(self._client, self._config, self._serialize, self._deserialize) - self.operations = Operations(self._client, self._config, self._serialize, self._deserialize) self.edge_nodes = EdgeNodesOperations(self._client, self._config, self._serialize, self._deserialize) - self.policies = PoliciesOperations(self._client, self._config, self._serialize, self._deserialize) self.managed_rule_sets = ManagedRuleSetsOperations( self._client, self._config, self._serialize, self._deserialize ) - def _send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse: + def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse: """Runs the network request through the client's chained policies. >>> from azure.core.rest import HttpRequest >>> request = HttpRequest("GET", "https://www.example.org/") - >>> response = client._send_request(request) + >>> response = client.send_request(request) For more information on this code flow, see https://aka.ms/azsdk/dpcodegen/python/send_request @@ -206,7 +213,11 @@ def _send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: """ request_copy = deepcopy(request) - request_copy.url = self._client.format_url(request_copy.url) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments) return self._client.send_request(request_copy, stream=stream, **kwargs) # type: ignore def close(self) -> None: diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/_configuration.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/_configuration.py index 5dc5306ae4e8..63957f76e216 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/_configuration.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/_configuration.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -18,21 +18,24 @@ from azure.core.credentials import TokenCredential -class CdnManagementClientConfiguration: # pylint: disable=too-many-instance-attributes - """Configuration for CdnManagementClient. +class CdnClientConfiguration: # pylint: disable=too-many-instance-attributes + """Configuration for CdnClient. Note that all parameters used to create this instance are saved as instance attributes. - :param credential: Credential needed for the client to connect to Azure. Required. + :param credential: Credential used to authenticate requests to the service. Required. :type credential: ~azure.core.credentials.TokenCredential :param subscription_id: The ID of the target subscription. The value must be an UUID. Required. :type subscription_id: str + :param base_url: Service host. Default value is "https://management.azure.com". + :type base_url: str :param cloud_setting: The cloud setting for which to get the ARM endpoint. Default value is None. :type cloud_setting: ~azure.core.AzureClouds - :keyword api_version: Api Version. Default value is "2025-06-01". Note that overriding this - default value may result in unsupported behavior. + :keyword api_version: The API version to use for this operation. Known values are "2025-06-01" + and None. Default value is None. If not set, the operation's default API version will be used. + Note that overriding this default value may result in unsupported behavior. :paramtype api_version: str """ @@ -40,6 +43,7 @@ def __init__( self, credential: "TokenCredential", subscription_id: str, + base_url: str = "https://management.azure.com", cloud_setting: Optional["AzureClouds"] = None, **kwargs: Any ) -> None: @@ -52,6 +56,7 @@ def __init__( self.credential = credential self.subscription_id = subscription_id + self.base_url = base_url self.cloud_setting = cloud_setting self.api_version = api_version self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"]) diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/_patch.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/_patch.py index d3be7c117232..ea765788358a 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/_patch.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/_patch.py @@ -1,34 +1,20 @@ # coding=utf-8 # -------------------------------------------------------------------------- -# # Copyright (c) Microsoft Corporation. All rights reserved. -# -# The MIT License (MIT) -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the ""Software""), to -# deal in the Software without restriction, including without limitation the -# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -# sell copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -# IN THE SOFTWARE. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # -------------------------------------------------------------------------- +"""Customize generated code here. +Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize +""" -# This file is used for handwritten extensions to the generated code. Example: -# https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md +__all__: list[str] = [] # Add all objects you want publicly available to users at this package level def patch_sdk(): - pass + """Do not remove from this file. + + `patch_sdk` is a last resort escape hatch that allows you to do customizations + you can't accomplish using the techniques described in + https://aka.ms/azsdk/python/dpcodegen/python/customize + """ diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/_utils/__init__.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/_utils/__init__.py index 0af9b28f6607..8026245c2abc 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/_utils/__init__.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/_utils/__init__.py @@ -1,6 +1,6 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/_utils/model_base.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/_utils/model_base.py new file mode 100644 index 000000000000..4102784f9a85 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/_utils/model_base.py @@ -0,0 +1,1453 @@ +# pylint: disable=line-too-long,useless-suppression,too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +# pylint: disable=protected-access, broad-except + +import copy +import calendar +import decimal +import functools +import sys +import logging +import base64 +import re +import typing +import enum +import email.utils +from datetime import datetime, date, time, timedelta, timezone +from json import JSONEncoder +import xml.etree.ElementTree as ET +from collections.abc import MutableMapping +import isodate +from azure.core.exceptions import DeserializationError +from azure.core import CaseInsensitiveEnumMeta +from azure.core.pipeline import PipelineResponse +from azure.core.serialization import _Null + +from azure.core.rest import HttpResponse + +if sys.version_info >= (3, 11): + from typing import Self +else: + from typing_extensions import Self + +_LOGGER = logging.getLogger(__name__) + +__all__ = ["SdkJSONEncoder", "Model", "rest_field", "rest_discriminator"] + +TZ_UTC = timezone.utc +_T = typing.TypeVar("_T") +_NONE_TYPE = type(None) + + +def _timedelta_as_isostr(td: timedelta) -> str: + """Converts a datetime.timedelta object into an ISO 8601 formatted string, e.g. 'P4DT12H30M05S' + + Function adapted from the Tin Can Python project: https://github.com/RusticiSoftware/TinCanPython + + :param timedelta td: The timedelta to convert + :rtype: str + :return: ISO8601 version of this timedelta + """ + + # Split seconds to larger units + seconds = td.total_seconds() + minutes, seconds = divmod(seconds, 60) + hours, minutes = divmod(minutes, 60) + days, hours = divmod(hours, 24) + + days, hours, minutes = list(map(int, (days, hours, minutes))) + seconds = round(seconds, 6) + + # Build date + date_str = "" + if days: + date_str = "%sD" % days + + if hours or minutes or seconds: + # Build time + time_str = "T" + + # Hours + bigger_exists = date_str or hours + if bigger_exists: + time_str += "{:02}H".format(hours) + + # Minutes + bigger_exists = bigger_exists or minutes + if bigger_exists: + time_str += "{:02}M".format(minutes) + + # Seconds + try: + if seconds.is_integer(): + seconds_string = "{:02}".format(int(seconds)) + else: + # 9 chars long w/ leading 0, 6 digits after decimal + seconds_string = "%09.6f" % seconds + # Remove trailing zeros + seconds_string = seconds_string.rstrip("0") + except AttributeError: # int.is_integer() raises + seconds_string = "{:02}".format(seconds) + + time_str += "{}S".format(seconds_string) + else: + time_str = "" + + return "P" + date_str + time_str + + +def _serialize_bytes(o, format: typing.Optional[str] = None) -> str: + encoded = base64.b64encode(o).decode() + if format == "base64url": + return encoded.strip("=").replace("+", "-").replace("/", "_") + return encoded + + +def _serialize_datetime(o, format: typing.Optional[str] = None): + if hasattr(o, "year") and hasattr(o, "hour"): + if format == "rfc7231": + return email.utils.format_datetime(o, usegmt=True) + if format == "unix-timestamp": + return int(calendar.timegm(o.utctimetuple())) + + # astimezone() fails for naive times in Python 2.7, so make make sure o is aware (tzinfo is set) + if not o.tzinfo: + iso_formatted = o.replace(tzinfo=TZ_UTC).isoformat() + else: + iso_formatted = o.astimezone(TZ_UTC).isoformat() + # Replace the trailing "+00:00" UTC offset with "Z" (RFC 3339: https://www.ietf.org/rfc/rfc3339.txt) + return iso_formatted.replace("+00:00", "Z") + # Next try datetime.date or datetime.time + return o.isoformat() + + +def _is_readonly(p): + try: + return p._visibility == ["read"] + except AttributeError: + return False + + +class SdkJSONEncoder(JSONEncoder): + """A JSON encoder that's capable of serializing datetime objects and bytes.""" + + def __init__(self, *args, exclude_readonly: bool = False, format: typing.Optional[str] = None, **kwargs): + super().__init__(*args, **kwargs) + self.exclude_readonly = exclude_readonly + self.format = format + + def default(self, o): # pylint: disable=too-many-return-statements + if _is_model(o): + if self.exclude_readonly: + readonly_props = [p._rest_name for p in o._attr_to_rest_field.values() if _is_readonly(p)] + return {k: v for k, v in o.items() if k not in readonly_props} + return dict(o.items()) + try: + return super(SdkJSONEncoder, self).default(o) + except TypeError: + if isinstance(o, _Null): + return None + if isinstance(o, decimal.Decimal): + return float(o) + if isinstance(o, (bytes, bytearray)): + return _serialize_bytes(o, self.format) + try: + # First try datetime.datetime + return _serialize_datetime(o, self.format) + except AttributeError: + pass + # Last, try datetime.timedelta + try: + return _timedelta_as_isostr(o) + except AttributeError: + # This will be raised when it hits value.total_seconds in the method above + pass + return super(SdkJSONEncoder, self).default(o) + + +_VALID_DATE = re.compile(r"\d{4}[-]\d{2}[-]\d{2}T\d{2}:\d{2}:\d{2}" + r"\.?\d*Z?[-+]?[\d{2}]?:?[\d{2}]?") +_VALID_RFC7231 = re.compile( + r"(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s\d{2}\s" + r"(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s\d{4}\s\d{2}:\d{2}:\d{2}\sGMT" +) + +_ARRAY_ENCODE_MAPPING = { + "pipeDelimited": "|", + "spaceDelimited": " ", + "commaDelimited": ",", + "newlineDelimited": "\n", +} + + +def _deserialize_array_encoded(delimit: str, attr): + if isinstance(attr, str): + if attr == "": + return [] + return attr.split(delimit) + return attr + + +def _deserialize_datetime(attr: typing.Union[str, datetime]) -> datetime: + """Deserialize ISO-8601 formatted string into Datetime object. + + :param str attr: response string to be deserialized. + :rtype: ~datetime.datetime + :returns: The datetime object from that input + """ + if isinstance(attr, datetime): + # i'm already deserialized + return attr + attr = attr.upper() + match = _VALID_DATE.match(attr) + if not match: + raise ValueError("Invalid datetime string: " + attr) + + check_decimal = attr.split(".") + if len(check_decimal) > 1: + decimal_str = "" + for digit in check_decimal[1]: + if digit.isdigit(): + decimal_str += digit + else: + break + if len(decimal_str) > 6: + attr = attr.replace(decimal_str, decimal_str[0:6]) + + date_obj = isodate.parse_datetime(attr) + test_utc = date_obj.utctimetuple() + if test_utc.tm_year > 9999 or test_utc.tm_year < 1: + raise OverflowError("Hit max or min date") + return date_obj # type: ignore[no-any-return] + + +def _deserialize_datetime_rfc7231(attr: typing.Union[str, datetime]) -> datetime: + """Deserialize RFC7231 formatted string into Datetime object. + + :param str attr: response string to be deserialized. + :rtype: ~datetime.datetime + :returns: The datetime object from that input + """ + if isinstance(attr, datetime): + # i'm already deserialized + return attr + match = _VALID_RFC7231.match(attr) + if not match: + raise ValueError("Invalid datetime string: " + attr) + + return email.utils.parsedate_to_datetime(attr) + + +def _deserialize_datetime_unix_timestamp(attr: typing.Union[float, datetime]) -> datetime: + """Deserialize unix timestamp into Datetime object. + + :param str attr: response string to be deserialized. + :rtype: ~datetime.datetime + :returns: The datetime object from that input + """ + if isinstance(attr, datetime): + # i'm already deserialized + return attr + return datetime.fromtimestamp(attr, TZ_UTC) + + +def _deserialize_date(attr: typing.Union[str, date]) -> date: + """Deserialize ISO-8601 formatted string into Date object. + :param str attr: response string to be deserialized. + :rtype: date + :returns: The date object from that input + """ + # This must NOT use defaultmonth/defaultday. Using None ensure this raises an exception. + if isinstance(attr, date): + return attr + return isodate.parse_date(attr, defaultmonth=None, defaultday=None) # type: ignore + + +def _deserialize_time(attr: typing.Union[str, time]) -> time: + """Deserialize ISO-8601 formatted string into time object. + + :param str attr: response string to be deserialized. + :rtype: datetime.time + :returns: The time object from that input + """ + if isinstance(attr, time): + return attr + return isodate.parse_time(attr) # type: ignore[no-any-return] + + +def _deserialize_bytes(attr): + if isinstance(attr, (bytes, bytearray)): + return attr + return bytes(base64.b64decode(attr)) + + +def _deserialize_bytes_base64(attr): + if isinstance(attr, (bytes, bytearray)): + return attr + padding = "=" * (3 - (len(attr) + 3) % 4) # type: ignore + attr = attr + padding # type: ignore + encoded = attr.replace("-", "+").replace("_", "/") + return bytes(base64.b64decode(encoded)) + + +def _deserialize_duration(attr): + if isinstance(attr, timedelta): + return attr + return isodate.parse_duration(attr) + + +def _deserialize_decimal(attr): + if isinstance(attr, decimal.Decimal): + return attr + return decimal.Decimal(str(attr)) + + +def _deserialize_int_as_str(attr): + if isinstance(attr, int): + return attr + return int(attr) + + +_DESERIALIZE_MAPPING = { + datetime: _deserialize_datetime, + date: _deserialize_date, + time: _deserialize_time, + bytes: _deserialize_bytes, + bytearray: _deserialize_bytes, + timedelta: _deserialize_duration, + typing.Any: lambda x: x, + decimal.Decimal: _deserialize_decimal, +} + +_DESERIALIZE_MAPPING_WITHFORMAT = { + "rfc3339": _deserialize_datetime, + "rfc7231": _deserialize_datetime_rfc7231, + "unix-timestamp": _deserialize_datetime_unix_timestamp, + "base64": _deserialize_bytes, + "base64url": _deserialize_bytes_base64, +} + + +def get_deserializer(annotation: typing.Any, rf: typing.Optional["_RestField"] = None): + if annotation is int and rf and rf._format == "str": + return _deserialize_int_as_str + if annotation is str and rf and rf._format in _ARRAY_ENCODE_MAPPING: + return functools.partial(_deserialize_array_encoded, _ARRAY_ENCODE_MAPPING[rf._format]) + if rf and rf._format: + return _DESERIALIZE_MAPPING_WITHFORMAT.get(rf._format) + return _DESERIALIZE_MAPPING.get(annotation) # pyright: ignore + + +def _get_type_alias_type(module_name: str, alias_name: str): + types = { + k: v + for k, v in sys.modules[module_name].__dict__.items() + if isinstance(v, typing._GenericAlias) # type: ignore + } + if alias_name not in types: + return alias_name + return types[alias_name] + + +def _get_model(module_name: str, model_name: str): + models = {k: v for k, v in sys.modules[module_name].__dict__.items() if isinstance(v, type)} + module_end = module_name.rsplit(".", 1)[0] + models.update({k: v for k, v in sys.modules[module_end].__dict__.items() if isinstance(v, type)}) + if isinstance(model_name, str): + model_name = model_name.split(".")[-1] + if model_name not in models: + return model_name + return models[model_name] + + +_UNSET = object() + + +class _MyMutableMapping(MutableMapping[str, typing.Any]): + def __init__(self, data: dict[str, typing.Any]) -> None: + self._data = data + + def __contains__(self, key: typing.Any) -> bool: + return key in self._data + + def __getitem__(self, key: str) -> typing.Any: + # If this key has been deserialized (for mutable types), we need to handle serialization + if hasattr(self, "_attr_to_rest_field"): + cache_attr = f"_deserialized_{key}" + if hasattr(self, cache_attr): + rf = _get_rest_field(getattr(self, "_attr_to_rest_field"), key) + if rf: + value = self._data.get(key) + if isinstance(value, (dict, list, set)): + # For mutable types, serialize and return + # But also update _data with serialized form and clear flag + # so mutations via this returned value affect _data + serialized = _serialize(value, rf._format) + # If serialized form is same type (no transformation needed), + # return _data directly so mutations work + if isinstance(serialized, type(value)) and serialized == value: + return self._data.get(key) + # Otherwise return serialized copy and clear flag + try: + object.__delattr__(self, cache_attr) + except AttributeError: + pass + # Store serialized form back + self._data[key] = serialized + return serialized + return self._data.__getitem__(key) + + def __setitem__(self, key: str, value: typing.Any) -> None: + # Clear any cached deserialized value when setting through dictionary access + cache_attr = f"_deserialized_{key}" + try: + object.__delattr__(self, cache_attr) + except AttributeError: + pass + self._data.__setitem__(key, value) + + def __delitem__(self, key: str) -> None: + self._data.__delitem__(key) + + def __iter__(self) -> typing.Iterator[typing.Any]: + return self._data.__iter__() + + def __len__(self) -> int: + return self._data.__len__() + + def __ne__(self, other: typing.Any) -> bool: + return not self.__eq__(other) + + def keys(self) -> typing.KeysView[str]: + """ + :returns: a set-like object providing a view on D's keys + :rtype: ~typing.KeysView + """ + return self._data.keys() + + def values(self) -> typing.ValuesView[typing.Any]: + """ + :returns: an object providing a view on D's values + :rtype: ~typing.ValuesView + """ + return self._data.values() + + def items(self) -> typing.ItemsView[str, typing.Any]: + """ + :returns: set-like object providing a view on D's items + :rtype: ~typing.ItemsView + """ + return self._data.items() + + def get(self, key: str, default: typing.Any = None) -> typing.Any: + """ + Get the value for key if key is in the dictionary, else default. + :param str key: The key to look up. + :param any default: The value to return if key is not in the dictionary. Defaults to None + :returns: D[k] if k in D, else d. + :rtype: any + """ + try: + return self[key] + except KeyError: + return default + + @typing.overload + def pop(self, key: str) -> typing.Any: ... # pylint: disable=arguments-differ + + @typing.overload + def pop(self, key: str, default: _T) -> _T: ... # pylint: disable=signature-differs + + @typing.overload + def pop(self, key: str, default: typing.Any) -> typing.Any: ... # pylint: disable=signature-differs + + def pop(self, key: str, default: typing.Any = _UNSET) -> typing.Any: + """ + Removes specified key and return the corresponding value. + :param str key: The key to pop. + :param any default: The value to return if key is not in the dictionary + :returns: The value corresponding to the key. + :rtype: any + :raises KeyError: If key is not found and default is not given. + """ + if default is _UNSET: + return self._data.pop(key) + return self._data.pop(key, default) + + def popitem(self) -> tuple[str, typing.Any]: + """ + Removes and returns some (key, value) pair + :returns: The (key, value) pair. + :rtype: tuple + :raises KeyError: if D is empty. + """ + return self._data.popitem() + + def clear(self) -> None: + """ + Remove all items from D. + """ + self._data.clear() + + def update(self, *args: typing.Any, **kwargs: typing.Any) -> None: # pylint: disable=arguments-differ + """ + Updates D from mapping/iterable E and F. + :param any args: Either a mapping object or an iterable of key-value pairs. + """ + self._data.update(*args, **kwargs) + + @typing.overload + def setdefault(self, key: str, default: None = None) -> None: ... + + @typing.overload + def setdefault(self, key: str, default: typing.Any) -> typing.Any: ... # pylint: disable=signature-differs + + def setdefault(self, key: str, default: typing.Any = _UNSET) -> typing.Any: + """ + Same as calling D.get(k, d), and setting D[k]=d if k not found + :param str key: The key to look up. + :param any default: The value to set if key is not in the dictionary + :returns: D[k] if k in D, else d. + :rtype: any + """ + if default is _UNSET: + return self._data.setdefault(key) + return self._data.setdefault(key, default) + + def __eq__(self, other: typing.Any) -> bool: + if isinstance(other, _MyMutableMapping): + return self._data == other._data + try: + other_model = self.__class__(other) + except Exception: + return False + return self._data == other_model._data + + def __repr__(self) -> str: + return str(self._data) + + +def _is_model(obj: typing.Any) -> bool: + return getattr(obj, "_is_model", False) + + +def _serialize(o, format: typing.Optional[str] = None): # pylint: disable=too-many-return-statements + if isinstance(o, list): + if format in _ARRAY_ENCODE_MAPPING and all(isinstance(x, str) for x in o): + return _ARRAY_ENCODE_MAPPING[format].join(o) + return [_serialize(x, format) for x in o] + if isinstance(o, dict): + return {k: _serialize(v, format) for k, v in o.items()} + if isinstance(o, set): + return {_serialize(x, format) for x in o} + if isinstance(o, tuple): + return tuple(_serialize(x, format) for x in o) + if isinstance(o, (bytes, bytearray)): + return _serialize_bytes(o, format) + if isinstance(o, decimal.Decimal): + return float(o) + if isinstance(o, enum.Enum): + return o.value + if isinstance(o, int): + if format == "str": + return str(o) + return o + try: + # First try datetime.datetime + return _serialize_datetime(o, format) + except AttributeError: + pass + # Last, try datetime.timedelta + try: + return _timedelta_as_isostr(o) + except AttributeError: + # This will be raised when it hits value.total_seconds in the method above + pass + return o + + +def _get_rest_field(attr_to_rest_field: dict[str, "_RestField"], rest_name: str) -> typing.Optional["_RestField"]: + try: + return next(rf for rf in attr_to_rest_field.values() if rf._rest_name == rest_name) + except StopIteration: + return None + + +def _create_value(rf: typing.Optional["_RestField"], value: typing.Any) -> typing.Any: + if not rf: + return _serialize(value, None) + if rf._is_multipart_file_input: + return value + if rf._is_model: + return _deserialize(rf._type, value) + if isinstance(value, ET.Element): + value = _deserialize(rf._type, value) + return _serialize(value, rf._format) + + +class Model(_MyMutableMapping): + _is_model = True + # label whether current class's _attr_to_rest_field has been calculated + # could not see _attr_to_rest_field directly because subclass inherits it from parent class + _calculated: set[str] = set() + + def __init__(self, *args: typing.Any, **kwargs: typing.Any) -> None: + class_name = self.__class__.__name__ + if len(args) > 1: + raise TypeError(f"{class_name}.__init__() takes 2 positional arguments but {len(args) + 1} were given") + dict_to_pass: dict[str, typing.Any] = {} + if args: + if isinstance(args[0], ET.Element): + dict_to_pass.update(self._init_from_xml(args[0])) + else: + dict_to_pass.update( + {k: _create_value(_get_rest_field(self._attr_to_rest_field, k), v) for k, v in args[0].items()} + ) + else: + non_attr_kwargs = [k for k in kwargs if k not in self._attr_to_rest_field] + if non_attr_kwargs: + # actual type errors only throw the first wrong keyword arg they see, so following that. + raise TypeError(f"{class_name}.__init__() got an unexpected keyword argument '{non_attr_kwargs[0]}'") + dict_to_pass.update( + { + self._attr_to_rest_field[k]._rest_name: _create_value(self._attr_to_rest_field[k], v) + for k, v in kwargs.items() + if v is not None + } + ) + # Apply client default values for fields the caller didn't set so that + # defaults are part of `_data` and therefore included during serialization. + for rf in self._attr_to_rest_field.values(): + if rf._default is _UNSET: + continue + if rf._rest_name in dict_to_pass: + continue + dict_to_pass[rf._rest_name] = _create_value(rf, rf._default) + super().__init__(dict_to_pass) + + def _init_from_xml(self, element: ET.Element) -> dict[str, typing.Any]: + """Deserialize an XML element into a dict mapping rest field names to values. + + :param ET.Element element: The XML element to deserialize from. + :returns: A dictionary of rest_name to deserialized value pairs. + :rtype: dict + """ + result: dict[str, typing.Any] = {} + model_meta = getattr(self, "_xml", {}) + existed_attr_keys: list[str] = [] + + for rf in self._attr_to_rest_field.values(): + prop_meta = getattr(rf, "_xml", {}) + xml_name = prop_meta.get("name", rf._rest_name) + xml_ns = _resolve_xml_ns(prop_meta, model_meta) + if xml_ns: + xml_name = "{" + xml_ns + "}" + xml_name + + # attribute + if prop_meta.get("attribute", False) and element.get(xml_name) is not None: + existed_attr_keys.append(xml_name) + result[rf._rest_name] = _deserialize(rf._type, element.get(xml_name)) + continue + + # unwrapped element is array + if prop_meta.get("unwrapped", False): + # unwrapped array could either use prop items meta/prop meta + _items_name = prop_meta.get("itemsName") + if _items_name: + xml_name = _items_name + _items_ns = prop_meta.get("itemsNs") + if _items_ns is not None: + xml_ns = _items_ns + if xml_ns: + xml_name = "{" + xml_ns + "}" + xml_name + items = element.findall(xml_name) # pyright: ignore + if len(items) > 0: + existed_attr_keys.append(xml_name) + result[rf._rest_name] = _deserialize(rf._type, items) + elif not rf._is_optional: + existed_attr_keys.append(xml_name) + result[rf._rest_name] = [] + continue + + # text element is primitive type + if prop_meta.get("text", False): + if element.text is not None: + result[rf._rest_name] = _deserialize(rf._type, element.text) + continue + + # wrapped element could be normal property or array, it should only have one element + item = element.find(xml_name) + if item is not None: + existed_attr_keys.append(xml_name) + result[rf._rest_name] = _deserialize(rf._type, item) + + # rest thing is additional properties + for e in element: + if e.tag not in existed_attr_keys: + result[e.tag] = _convert_element(e) + + return result + + def copy(self) -> "Model": + return Model(self.__dict__) + + def __new__(cls, *args: typing.Any, **kwargs: typing.Any) -> Self: + if f"{cls.__module__}.{cls.__qualname__}" not in cls._calculated: + # we know the last nine classes in mro are going to be 'Model', '_MyMutableMapping', 'MutableMapping', + # 'Mapping', 'Collection', 'Sized', 'Iterable', 'Container' and 'object' + mros = cls.__mro__[:-9][::-1] # ignore parents, and reverse the mro order + attr_to_rest_field: dict[str, _RestField] = { # map attribute name to rest_field property + k: v for mro_class in mros for k, v in mro_class.__dict__.items() if k[0] != "_" and hasattr(v, "_type") + } + annotations = { + k: v + for mro_class in mros + if hasattr(mro_class, "__annotations__") + for k, v in mro_class.__annotations__.items() + } + for attr, rf in attr_to_rest_field.items(): + rf._module = cls.__module__ + if not rf._type: + rf._type = rf._get_deserialize_callable_from_annotation(annotations.get(attr, None)) + if not rf._rest_name_input: + rf._rest_name_input = attr + cls._attr_to_rest_field: dict[str, _RestField] = dict(attr_to_rest_field.items()) + cls._calculated.add(f"{cls.__module__}.{cls.__qualname__}") + + return super().__new__(cls) + + def __init_subclass__(cls, discriminator: typing.Optional[str] = None) -> None: + for base in cls.__bases__: + if hasattr(base, "__mapping__"): + base.__mapping__[discriminator or cls.__name__] = cls # type: ignore + + @classmethod + def _get_discriminator(cls, exist_discriminators) -> typing.Optional["_RestField"]: + for v in cls.__dict__.values(): + if isinstance(v, _RestField) and v._is_discriminator and v._rest_name not in exist_discriminators: + return v + return None + + @classmethod + def _deserialize(cls, data, exist_discriminators): + if not hasattr(cls, "__mapping__"): + return cls(data) + discriminator = cls._get_discriminator(exist_discriminators) + if discriminator is None: + return cls(data) + exist_discriminators.append(discriminator._rest_name) + if isinstance(data, ET.Element): + model_meta = getattr(cls, "_xml", {}) + prop_meta = getattr(discriminator, "_xml", {}) + xml_name = prop_meta.get("name", discriminator._rest_name) + xml_ns = _resolve_xml_ns(prop_meta, model_meta) + if xml_ns: + xml_name = "{" + xml_ns + "}" + xml_name + + if data.get(xml_name) is not None: + discriminator_value = data.get(xml_name) + else: + discriminator_value = data.find(xml_name).text # pyright: ignore + else: + discriminator_value = data.get(discriminator._rest_name) + mapped_cls = cls.__mapping__.get(discriminator_value, cls) # pyright: ignore # pylint: disable=no-member + return mapped_cls._deserialize(data, exist_discriminators) + + def as_dict(self, *, exclude_readonly: bool = False) -> dict[str, typing.Any]: + """Return a dict that can be turned into json using json.dump. + + :keyword bool exclude_readonly: Whether to remove the readonly properties. + :returns: A dict JSON compatible object + :rtype: dict + """ + + result = {} + readonly_props = [] + if exclude_readonly: + readonly_props = [p._rest_name for p in self._attr_to_rest_field.values() if _is_readonly(p)] + for k, v in self.items(): + if exclude_readonly and k in readonly_props: # pyright: ignore + continue + is_multipart_file_input = False + try: + is_multipart_file_input = next( + rf for rf in self._attr_to_rest_field.values() if rf._rest_name == k + )._is_multipart_file_input + except StopIteration: + pass + result[k] = v if is_multipart_file_input else Model._as_dict_value(v, exclude_readonly=exclude_readonly) + return result + + @staticmethod + def _as_dict_value(v: typing.Any, exclude_readonly: bool = False) -> typing.Any: + if v is None or isinstance(v, _Null): + return None + if isinstance(v, (list, tuple, set)): + return type(v)(Model._as_dict_value(x, exclude_readonly=exclude_readonly) for x in v) + if isinstance(v, dict): + return {dk: Model._as_dict_value(dv, exclude_readonly=exclude_readonly) for dk, dv in v.items()} + return v.as_dict(exclude_readonly=exclude_readonly) if hasattr(v, "as_dict") else v + + +def _deserialize_model(model_deserializer: typing.Optional[typing.Callable], obj): + if _is_model(obj): + return obj + return _deserialize(model_deserializer, obj) + + +def _deserialize_with_optional(if_obj_deserializer: typing.Optional[typing.Callable], obj): + if obj is None: + return obj + return _deserialize_with_callable(if_obj_deserializer, obj) + + +def _deserialize_with_union(deserializers, obj): + for deserializer in deserializers: + try: + return _deserialize(deserializer, obj) + except DeserializationError: + pass + raise DeserializationError() + + +def _deserialize_dict( + value_deserializer: typing.Optional[typing.Callable], + module: typing.Optional[str], + obj: dict[typing.Any, typing.Any], +): + if obj is None: + return obj + if isinstance(obj, ET.Element): + obj = {child.tag: child for child in obj} + return {k: _deserialize(value_deserializer, v, module) for k, v in obj.items()} + + +def _deserialize_multiple_sequence( + entry_deserializers: list[typing.Optional[typing.Callable]], + module: typing.Optional[str], + obj, +): + if obj is None: + return obj + return type(obj)(_deserialize(deserializer, entry, module) for entry, deserializer in zip(obj, entry_deserializers)) + + +def _is_array_encoded_deserializer(deserializer: functools.partial) -> bool: + return ( + isinstance(deserializer, functools.partial) + and isinstance(deserializer.args[0], functools.partial) + and deserializer.args[0].func == _deserialize_array_encoded # pylint: disable=comparison-with-callable + ) + + +def _deserialize_sequence( + deserializer: typing.Optional[typing.Callable], + module: typing.Optional[str], + obj, +): + if obj is None: + return obj + if isinstance(obj, ET.Element): + obj = list(obj) + + # encoded string may be deserialized to sequence + if isinstance(obj, str) and isinstance(deserializer, functools.partial): + # for list[str] + if _is_array_encoded_deserializer(deserializer): + return deserializer(obj) + + # for list[Union[...]] + if isinstance(deserializer.args[0], list): + for sub_deserializer in deserializer.args[0]: + if _is_array_encoded_deserializer(sub_deserializer): + return sub_deserializer(obj) + + return type(obj)(_deserialize(deserializer, entry, module) for entry in obj) + + +def _sorted_annotations(types: list[typing.Any]) -> list[typing.Any]: + return sorted( + types, + key=lambda x: hasattr(x, "__name__") and x.__name__.lower() in ("str", "float", "int", "bool"), + ) + + +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-statements, too-many-branches + annotation: typing.Any, + module: typing.Optional[str], + rf: typing.Optional["_RestField"] = None, +) -> typing.Optional[typing.Callable[[typing.Any], typing.Any]]: + if not annotation: + return None + + # is it a type alias? + if isinstance(annotation, str): + if module is not None: + annotation = _get_type_alias_type(module, annotation) + + # is it a forward ref / in quotes? + if isinstance(annotation, (str, typing.ForwardRef)): + try: + model_name = annotation.__forward_arg__ # type: ignore + except AttributeError: + model_name = annotation + if module is not None: + annotation = _get_model(module, model_name) # type: ignore + + try: + if module and _is_model(annotation): + if rf: + rf._is_model = True + + return functools.partial(_deserialize_model, annotation) # pyright: ignore + except Exception: + pass + + # is it a literal? + try: + if annotation.__origin__ is typing.Literal: # pyright: ignore + return None + except AttributeError: + pass + + # is it optional? + try: + if any(a is _NONE_TYPE for a in annotation.__args__): # pyright: ignore + if rf: + rf._is_optional = True + if len(annotation.__args__) <= 2: # pyright: ignore + if_obj_deserializer = _get_deserialize_callable_from_annotation( + next(a for a in annotation.__args__ if a is not _NONE_TYPE), module, rf # pyright: ignore + ) + + return functools.partial(_deserialize_with_optional, if_obj_deserializer) + # the type is Optional[Union[...]], we need to remove the None type from the Union + annotation_copy = copy.copy(annotation) + annotation_copy.__args__ = [a for a in annotation_copy.__args__ if a is not _NONE_TYPE] # pyright: ignore + return _get_deserialize_callable_from_annotation(annotation_copy, module, rf) + except AttributeError: + pass + + # is it union? + if getattr(annotation, "__origin__", None) is typing.Union: + # initial ordering is we make `string` the last deserialization option, because it is often them most generic + deserializers = [ + _get_deserialize_callable_from_annotation(arg, module, rf) + for arg in _sorted_annotations(annotation.__args__) # pyright: ignore + ] + + return functools.partial(_deserialize_with_union, deserializers) + + try: + annotation_name = ( + annotation.__name__ if hasattr(annotation, "__name__") else annotation._name # pyright: ignore + ) + if annotation_name.lower() == "dict": + value_deserializer = _get_deserialize_callable_from_annotation( + annotation.__args__[1], module, rf # pyright: ignore + ) + + return functools.partial( + _deserialize_dict, + value_deserializer, + module, + ) + except (AttributeError, IndexError): + pass + try: + annotation_name = ( + annotation.__name__ if hasattr(annotation, "__name__") else annotation._name # pyright: ignore + ) + if annotation_name.lower() in ["list", "set", "tuple", "sequence"]: + if len(annotation.__args__) > 1: # pyright: ignore + entry_deserializers = [ + _get_deserialize_callable_from_annotation(dt, module, rf) + for dt in annotation.__args__ # pyright: ignore + ] + return functools.partial(_deserialize_multiple_sequence, entry_deserializers, module) + deserializer = _get_deserialize_callable_from_annotation( + annotation.__args__[0], module, rf # pyright: ignore + ) + + return functools.partial(_deserialize_sequence, deserializer, module) + except (TypeError, IndexError, AttributeError, SyntaxError): + pass + + def _deserialize_default( + deserializer, + obj, + ): + if obj is None: + return obj + try: + return _deserialize_with_callable(deserializer, obj) + except Exception: + pass + return obj + + if get_deserializer(annotation, rf): + return functools.partial(_deserialize_default, get_deserializer(annotation, rf)) + + return functools.partial(_deserialize_default, annotation) + + +def _deserialize_with_callable( + deserializer: typing.Optional[typing.Callable[[typing.Any], typing.Any]], + value: typing.Any, +): # pylint: disable=too-many-return-statements + try: + if value is None or isinstance(value, _Null): + return None + if isinstance(value, ET.Element): + if deserializer is str: + return value.text or "" + if deserializer is int: + return int(value.text) if value.text else None + if deserializer is float: + return float(value.text) if value.text else None + if deserializer is bool: + return value.text == "true" if value.text else None + if deserializer and deserializer in _DESERIALIZE_MAPPING.values(): + return deserializer(value.text) if value.text else None + if deserializer and deserializer in _DESERIALIZE_MAPPING_WITHFORMAT.values(): + return deserializer(value.text) if value.text else None + if deserializer is None: + return value + if deserializer in [int, float, bool]: + return deserializer(value) + if isinstance(deserializer, CaseInsensitiveEnumMeta): + try: + return deserializer(value.text if isinstance(value, ET.Element) else value) + except ValueError: + # for unknown value, return raw value + return value.text if isinstance(value, ET.Element) else value + if isinstance(deserializer, type) and issubclass(deserializer, Model): + return deserializer._deserialize(value, []) + return typing.cast(typing.Callable[[typing.Any], typing.Any], deserializer)(value) + except Exception as e: + raise DeserializationError() from e + + +def _deserialize( + deserializer: typing.Any, + value: typing.Any, + module: typing.Optional[str] = None, + rf: typing.Optional["_RestField"] = None, + format: typing.Optional[str] = None, +) -> typing.Any: + if isinstance(value, PipelineResponse): + value = value.http_response.json() + if rf is None and format: + rf = _RestField(format=format) + if not isinstance(deserializer, functools.partial): + deserializer = _get_deserialize_callable_from_annotation(deserializer, module, rf) + return _deserialize_with_callable(deserializer, value) + + +def _failsafe_deserialize( + deserializer: typing.Any, + response: HttpResponse, + module: typing.Optional[str] = None, + rf: typing.Optional["_RestField"] = None, + format: typing.Optional[str] = None, +) -> typing.Any: + try: + return _deserialize(deserializer, response.json(), module, rf, format) + except Exception: # pylint: disable=broad-except + _LOGGER.warning( + "Ran into a deserialization error. Ignoring since this is failsafe deserialization", exc_info=True + ) + return None + + +def _failsafe_deserialize_xml( + deserializer: typing.Any, + response: HttpResponse, +) -> typing.Any: + try: + return _deserialize_xml(deserializer, response.text()) + except Exception: # pylint: disable=broad-except + _LOGGER.warning( + "Ran into a deserialization error. Ignoring since this is failsafe deserialization", exc_info=True + ) + return None + + +# pylint: disable=too-many-instance-attributes +class _RestField: + def __init__( + self, + *, + name: typing.Optional[str] = None, + type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + is_discriminator: bool = False, + visibility: typing.Optional[list[str]] = None, + default: typing.Any = _UNSET, + format: typing.Optional[str] = None, + is_multipart_file_input: bool = False, + xml: typing.Optional[dict[str, typing.Any]] = None, + ): + self._type = type + self._rest_name_input = name + self._module: typing.Optional[str] = None + self._is_discriminator = is_discriminator + self._visibility = visibility + self._is_model = False + self._is_optional = False + self._default = default + self._format = format + self._is_multipart_file_input = is_multipart_file_input + self._xml = xml if xml is not None else {} + + @property + def _class_type(self) -> typing.Any: + result = getattr(self._type, "args", [None])[0] + # type may be wrapped by nested functools.partial so we need to check for that + if isinstance(result, functools.partial): + return getattr(result, "args", [None])[0] + return result + + @property + def _rest_name(self) -> str: + if self._rest_name_input is None: + raise ValueError("Rest name was never set") + return self._rest_name_input + + def __get__(self, obj: Model, type=None): # pylint: disable=redefined-builtin + # by this point, type and rest_name will have a value bc we default + # them in __new__ of the Model class + # Use _data.get() directly to avoid triggering __getitem__ which clears the cache + item = obj._data.get(self._rest_name, _UNSET) + if item is _UNSET: + # Field not set by user; return the client default if one exists, otherwise None + return self._default if self._default is not _UNSET else None + if item is None: + return item + if self._is_model: + return item + + # For mutable types, we want mutations to directly affect _data + # Check if we've already deserialized this value + cache_attr = f"_deserialized_{self._rest_name}" + if hasattr(obj, cache_attr): + # Return the value from _data directly (it's been deserialized in place) + return obj._data.get(self._rest_name) + + deserialized = _deserialize(self._type, _serialize(item, self._format), rf=self) + + # For mutable types, store the deserialized value back in _data + # so mutations directly affect _data + if isinstance(deserialized, (dict, list, set)): + obj._data[self._rest_name] = deserialized + object.__setattr__(obj, cache_attr, True) # Mark as deserialized + return deserialized + + return deserialized + + def __set__(self, obj: Model, value) -> None: + # Clear the cached deserialized object when setting a new value + cache_attr = f"_deserialized_{self._rest_name}" + if hasattr(obj, cache_attr): + object.__delattr__(obj, cache_attr) + + if value is None: + # we want to wipe out entries if users set attr to None + try: + obj.__delitem__(self._rest_name) + except KeyError: + pass + return + if self._is_model: + if not _is_model(value): + value = _deserialize(self._type, value) + obj.__setitem__(self._rest_name, value) + return + obj.__setitem__(self._rest_name, _serialize(value, self._format)) + + def _get_deserialize_callable_from_annotation( + self, annotation: typing.Any + ) -> typing.Optional[typing.Callable[[typing.Any], typing.Any]]: + return _get_deserialize_callable_from_annotation(annotation, self._module, self) + + +def rest_field( + *, + name: typing.Optional[str] = None, + type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[list[str]] = None, + default: typing.Any = _UNSET, + format: typing.Optional[str] = None, + is_multipart_file_input: bool = False, + xml: typing.Optional[dict[str, typing.Any]] = None, +) -> typing.Any: + return _RestField( + name=name, + type=type, + visibility=visibility, + default=default, + format=format, + is_multipart_file_input=is_multipart_file_input, + xml=xml, + ) + + +def rest_discriminator( + *, + name: typing.Optional[str] = None, + type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[list[str]] = None, + xml: typing.Optional[dict[str, typing.Any]] = None, +) -> typing.Any: + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility, xml=xml) + + +def serialize_xml(model: Model, exclude_readonly: bool = False) -> str: + """Serialize a model to XML. + + :param Model model: The model to serialize. + :param bool exclude_readonly: Whether to exclude readonly properties. + :returns: The XML representation of the model. + :rtype: str + """ + return ET.tostring(_get_element(model, exclude_readonly), encoding="unicode") # type: ignore + + +def _get_xml_ns(meta: dict[str, typing.Any]) -> typing.Optional[str]: + """Return the XML namespace from a metadata dict, checking both 'ns' (old-style) and 'namespace' (DPG) keys. + + :param dict meta: The metadata dictionary to extract namespace from. + :returns: The namespace string if 'ns' or 'namespace' key is present, None otherwise. + :rtype: str or None + """ + ns = meta.get("ns") + if ns is None: + ns = meta.get("namespace") + return ns + + +def _resolve_xml_ns( + prop_meta: dict[str, typing.Any], model_meta: typing.Optional[dict[str, typing.Any]] = None +) -> typing.Optional[str]: + """Resolve XML namespace for a property, falling back to model namespace when appropriate. + + Checks the property metadata first; if no namespace is found and the model does not declare + an explicit prefix, falls back to the model-level namespace. + + :param dict prop_meta: The property metadata dictionary. + :param dict model_meta: The model metadata dictionary, used as fallback. + :returns: The resolved namespace string, or None. + :rtype: str or None + """ + ns = _get_xml_ns(prop_meta) + if ns is None and model_meta is not None and not model_meta.get("prefix"): + ns = _get_xml_ns(model_meta) + return ns + + +def _set_xml_attribute(element: ET.Element, name: str, value: typing.Any, prop_meta: dict[str, typing.Any]) -> None: + """Set an XML attribute on an element, handling namespace prefix registration. + + :param ET.Element element: The element to set the attribute on. + :param str name: The default attribute name (wire name). + :param any value: The attribute value. + :param dict prop_meta: The property metadata dictionary. + """ + xml_name = prop_meta.get("name", name) + _attr_ns = _get_xml_ns(prop_meta) + if _attr_ns: + _attr_prefix = prop_meta.get("prefix") + if _attr_prefix: + _safe_register_namespace(_attr_prefix, _attr_ns) + xml_name = "{" + _attr_ns + "}" + xml_name + element.set(xml_name, _get_primitive_type_value(value)) + + +def _get_element( + o: typing.Any, + exclude_readonly: bool = False, + parent_meta: typing.Optional[dict[str, typing.Any]] = None, + wrapped_element: typing.Optional[ET.Element] = None, +) -> typing.Union[ET.Element, list[ET.Element]]: + if _is_model(o): + model_meta = getattr(o, "_xml", {}) + + # if prop is a model, then use the prop element directly, else generate a wrapper of model + if wrapped_element is None: + # When serializing as an array item (parent_meta is set), check if the parent has an + # explicit itemsName. This ensures correct element names for unwrapped arrays (where + # the element tag is the property/items name, not the model type name). + _items_name = parent_meta.get("itemsName") if parent_meta is not None else None + element_name = _items_name if _items_name else (model_meta.get("name") or o.__class__.__name__) + _model_ns = _get_xml_ns(model_meta) + wrapped_element = _create_xml_element( + element_name, + model_meta.get("prefix"), + _model_ns, + ) + + readonly_props = [] + if exclude_readonly: + readonly_props = [p._rest_name for p in o._attr_to_rest_field.values() if _is_readonly(p)] + + for k, v in o.items(): + # do not serialize readonly properties + if exclude_readonly and k in readonly_props: + continue + + prop_rest_field = _get_rest_field(o._attr_to_rest_field, k) + if prop_rest_field: + prop_meta = getattr(prop_rest_field, "_xml").copy() + # use the wire name as xml name if no specific name is set + if prop_meta.get("name") is None: + prop_meta["name"] = k + else: + # additional properties will not have rest field, use the wire name as xml name + prop_meta = {"name": k} + + # Propagate model namespace to properties only for old-style "ns"-keyed models. + # DPG-generated models use the "namespace" key and explicitly declare namespace on + # each property that needs it, so propagation is intentionally skipped for them. + if prop_meta.get("ns") is None and model_meta.get("ns"): + prop_meta["ns"] = model_meta.get("ns") + prop_meta["prefix"] = model_meta.get("prefix") + + if prop_meta.get("unwrapped", False): + # unwrapped could only set on array + wrapped_element.extend(_get_element(v, exclude_readonly, prop_meta)) + elif prop_meta.get("text", False): + # text could only set on primitive type + wrapped_element.text = _get_primitive_type_value(v) + elif prop_meta.get("attribute", False): + _set_xml_attribute(wrapped_element, k, v, prop_meta) + else: + # other wrapped prop element + wrapped_element.append(_get_wrapped_element(v, exclude_readonly, prop_meta)) + return wrapped_element + if isinstance(o, list): + return [_get_element(x, exclude_readonly, parent_meta) for x in o] # type: ignore + if isinstance(o, dict): + result = [] + _dict_ns = _get_xml_ns(parent_meta) if parent_meta else None + for k, v in o.items(): + result.append( + _get_wrapped_element( + v, + exclude_readonly, + { + "name": k, + "ns": _dict_ns, + "prefix": parent_meta.get("prefix") if parent_meta else None, + }, + ) + ) + return result + + # primitive case need to create element based on parent_meta + if parent_meta: + _items_ns = parent_meta.get("itemsNs") + if _items_ns is None: + _items_ns = _get_xml_ns(parent_meta) + return _get_wrapped_element( + o, + exclude_readonly, + { + "name": parent_meta.get("itemsName", parent_meta.get("name")), + "prefix": parent_meta.get("itemsPrefix", parent_meta.get("prefix")), + "ns": _items_ns, + }, + ) + + raise ValueError("Could not serialize value into xml: " + o) + + +def _get_wrapped_element( + v: typing.Any, + exclude_readonly: bool, + meta: typing.Optional[dict[str, typing.Any]], +) -> ET.Element: + _meta_ns = _get_xml_ns(meta) if meta else None + wrapped_element = _create_xml_element( + meta.get("name") if meta else None, meta.get("prefix") if meta else None, _meta_ns + ) + if isinstance(v, (dict, list)): + wrapped_element.extend(_get_element(v, exclude_readonly, meta)) + elif _is_model(v): + _get_element(v, exclude_readonly, meta, wrapped_element) + else: + wrapped_element.text = _get_primitive_type_value(v) + return wrapped_element # type: ignore[no-any-return] + + +def _get_primitive_type_value(v) -> str: + if v is True: + return "true" + if v is False: + return "false" + if isinstance(v, _Null): + return "" + return str(v) + + +def _safe_register_namespace(prefix: str, ns: str) -> None: + """Register an XML namespace prefix, handling reserved prefix patterns. + + Some prefixes (e.g. 'ns2') match Python's reserved 'ns\\d+' pattern used for + auto-generated prefixes, causing register_namespace to raise ValueError. + Falls back to directly registering in the internal namespace map. + + :param str prefix: The namespace prefix to register. + :param str ns: The namespace URI. + """ + try: + ET.register_namespace(prefix, ns) + except ValueError: + _ns_map = getattr(ET, "_namespace_map", None) + if _ns_map is not None: + _ns_map[ns] = prefix + + +def _create_xml_element( + tag: typing.Any, prefix: typing.Optional[str] = None, ns: typing.Optional[str] = None +) -> ET.Element: + if prefix and ns: + _safe_register_namespace(prefix, ns) + if ns: + return ET.Element("{" + ns + "}" + tag) + return ET.Element(tag) + + +def _deserialize_xml( + deserializer: typing.Any, + value: str, +) -> typing.Any: + element = ET.fromstring(value) # nosec + return _deserialize(deserializer, element) + + +def _convert_element(e: ET.Element): + # dict case + if len(e.attrib) > 0 or len({child.tag for child in e}) > 1: + dict_result: dict[str, typing.Any] = {} + for child in e: + if dict_result.get(child.tag) is not None: + if isinstance(dict_result[child.tag], list): + dict_result[child.tag].append(_convert_element(child)) + else: + dict_result[child.tag] = [dict_result[child.tag], _convert_element(child)] + else: + dict_result[child.tag] = _convert_element(child) + dict_result.update(e.attrib) + return dict_result + # array case + if len(e) > 0: + array_result: list[typing.Any] = [] + for child in e: + array_result.append(_convert_element(child)) + return array_result + # primitive case + return e.text diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/_utils/serialization.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/_utils/serialization.py index 6da830e0cf4a..954bf7ebffa7 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/_utils/serialization.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/_utils/serialization.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -39,11 +39,15 @@ import xml.etree.ElementTree as ET import isodate # type: ignore -from typing_extensions import Self from azure.core.exceptions import DeserializationError, SerializationError from azure.core.serialization import NULL as CoreNull +if sys.version_info >= (3, 11): + from typing import Self +else: + from typing_extensions import Self + _BOM = codecs.BOM_UTF8.decode(encoding="utf-8") JSON = MutableMapping[str, Any] diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/_utils/utils.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/_utils/utils.py index 39b612f39a9b..35c9c836f85f 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/_utils/utils.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/_utils/utils.py @@ -1,7 +1,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/_version.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/_version.py index d382b630900a..d596632c2977 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/_version.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/_version.py @@ -2,9 +2,8 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- - VERSION = "13.2.0" diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/__init__.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/__init__.py index e1b8503a3b09..deadcf632ea9 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/__init__.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/__init__.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # pylint: disable=wrong-import-position @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._cdn_management_client import CdnManagementClient # type: ignore +from ._client import CdnClient # type: ignore try: from ._patch import __all__ as _patch_all @@ -22,7 +22,7 @@ from ._patch import patch_sdk as _patch_sdk __all__ = [ - "CdnManagementClient", + "CdnClient", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/_cdn_management_client.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/_client.py similarity index 87% rename from sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/_cdn_management_client.py rename to sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/_client.py index d714daaafdbd..2b84d4379a41 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/_cdn_management_client.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/_client.py @@ -2,13 +2,13 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from copy import deepcopy +import sys from typing import Any, Awaitable, Optional, TYPE_CHECKING, cast -from typing_extensions import Self from azure.core.pipeline import policies from azure.core.rest import AsyncHttpResponse, HttpRequest @@ -17,9 +17,8 @@ from azure.mgmt.core.policies import AsyncARMAutoResourceProviderRegistrationPolicy from azure.mgmt.core.tools import get_arm_endpoints -from .. import models as _models from .._utils.serialization import Deserializer, Serializer -from ._configuration import CdnManagementClientConfiguration +from ._configuration import CdnClientConfiguration from .operations import ( AFDCustomDomainsOperations, AFDEndpointsOperations, @@ -42,21 +41,27 @@ RulesOperations, SecretsOperations, SecurityPoliciesOperations, - _CdnManagementClientOperationsMixin, + _CdnClientOperationsMixin, ) +if sys.version_info >= (3, 11): + from typing import Self +else: + from typing_extensions import Self # type: ignore + if TYPE_CHECKING: from azure.core import AzureClouds from azure.core.credentials_async import AsyncTokenCredential -class CdnManagementClient(_CdnManagementClientOperationsMixin): # pylint: disable=too-many-instance-attributes - """Cdn Management Client. +class CdnClient(_CdnClientOperationsMixin): # pylint: disable=too-many-instance-attributes + """Use these APIs to manage Azure Front Door and CDN resources through the Azure Resource Manager. + You must make sure that requests made to these resources are secure. - :ivar afd_profiles: AFDProfilesOperations operations - :vartype afd_profiles: azure.mgmt.cdn.aio.operations.AFDProfilesOperations - :ivar afd_custom_domains: AFDCustomDomainsOperations operations - :vartype afd_custom_domains: azure.mgmt.cdn.aio.operations.AFDCustomDomainsOperations + :ivar operations: Operations operations + :vartype operations: azure.mgmt.cdn.aio.operations.Operations + :ivar profiles: ProfilesOperations operations + :vartype profiles: azure.mgmt.cdn.aio.operations.ProfilesOperations :ivar afd_endpoints: AFDEndpointsOperations operations :vartype afd_endpoints: azure.mgmt.cdn.aio.operations.AFDEndpointsOperations :ivar afd_origin_groups: AFDOriginGroupsOperations operations @@ -73,10 +78,6 @@ class CdnManagementClient(_CdnManagementClientOperationsMixin): # pylint: disab :vartype security_policies: azure.mgmt.cdn.aio.operations.SecurityPoliciesOperations :ivar secrets: SecretsOperations operations :vartype secrets: azure.mgmt.cdn.aio.operations.SecretsOperations - :ivar log_analytics: LogAnalyticsOperations operations - :vartype log_analytics: azure.mgmt.cdn.aio.operations.LogAnalyticsOperations - :ivar profiles: ProfilesOperations operations - :vartype profiles: azure.mgmt.cdn.aio.operations.ProfilesOperations :ivar endpoints: EndpointsOperations operations :vartype endpoints: azure.mgmt.cdn.aio.operations.EndpointsOperations :ivar origins: OriginsOperations operations @@ -85,27 +86,32 @@ class CdnManagementClient(_CdnManagementClientOperationsMixin): # pylint: disab :vartype origin_groups: azure.mgmt.cdn.aio.operations.OriginGroupsOperations :ivar custom_domains: CustomDomainsOperations operations :vartype custom_domains: azure.mgmt.cdn.aio.operations.CustomDomainsOperations + :ivar afd_custom_domains: AFDCustomDomainsOperations operations + :vartype afd_custom_domains: azure.mgmt.cdn.aio.operations.AFDCustomDomainsOperations + :ivar afd_profiles: AFDProfilesOperations operations + :vartype afd_profiles: azure.mgmt.cdn.aio.operations.AFDProfilesOperations + :ivar log_analytics: LogAnalyticsOperations operations + :vartype log_analytics: azure.mgmt.cdn.aio.operations.LogAnalyticsOperations + :ivar policies: PoliciesOperations operations + :vartype policies: azure.mgmt.cdn.aio.operations.PoliciesOperations :ivar resource_usage: ResourceUsageOperations operations :vartype resource_usage: azure.mgmt.cdn.aio.operations.ResourceUsageOperations - :ivar operations: Operations operations - :vartype operations: azure.mgmt.cdn.aio.operations.Operations :ivar edge_nodes: EdgeNodesOperations operations :vartype edge_nodes: azure.mgmt.cdn.aio.operations.EdgeNodesOperations - :ivar policies: PoliciesOperations operations - :vartype policies: azure.mgmt.cdn.aio.operations.PoliciesOperations :ivar managed_rule_sets: ManagedRuleSetsOperations operations :vartype managed_rule_sets: azure.mgmt.cdn.aio.operations.ManagedRuleSetsOperations - :param credential: Credential needed for the client to connect to Azure. Required. + :param credential: Credential used to authenticate requests to the service. Required. :type credential: ~azure.core.credentials_async.AsyncTokenCredential :param subscription_id: The ID of the target subscription. The value must be an UUID. Required. :type subscription_id: str - :param base_url: Service URL. Default value is None. + :param base_url: Service host. Default value is None. :type base_url: str :keyword cloud_setting: The cloud setting for which to get the ARM endpoint. Default value is None. :paramtype cloud_setting: ~azure.core.AzureClouds - :keyword api_version: Api Version. Default value is "2025-06-01". Note that overriding this - default value may result in unsupported behavior. + :keyword api_version: The API version to use for this operation. Known values are "2025-06-01" + and None. Default value is None. If not set, the operation's default API version will be used. + 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,14 +126,16 @@ def __init__( cloud_setting: Optional["AzureClouds"] = None, **kwargs: Any ) -> None: + _endpoint = "{endpoint}" _cloud = cloud_setting or settings.current.azure_cloud # type: ignore _endpoints = get_arm_endpoints(_cloud) if not base_url: base_url = _endpoints["resource_manager"] credential_scopes = kwargs.pop("credential_scopes", _endpoints["credential_scopes"]) - self._config = CdnManagementClientConfiguration( + self._config = CdnClientConfiguration( credential=credential, subscription_id=subscription_id, + base_url=cast(str, base_url), cloud_setting=cloud_setting, credential_scopes=credential_scopes, **kwargs @@ -152,17 +160,14 @@ def __init__( self._config.http_logging_policy, ] self._client: AsyncARMPipelineClient = AsyncARMPipelineClient( - base_url=cast(str, base_url), policies=_policies, **kwargs + base_url=cast(str, _endpoint), policies=_policies, **kwargs ) - client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)} - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) + self._serialize = Serializer() + self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.afd_profiles = AFDProfilesOperations(self._client, self._config, self._serialize, self._deserialize) - self.afd_custom_domains = AFDCustomDomainsOperations( - self._client, self._config, self._serialize, self._deserialize - ) + self.operations = Operations(self._client, self._config, self._serialize, self._deserialize) + self.profiles = ProfilesOperations(self._client, self._config, self._serialize, self._deserialize) self.afd_endpoints = AFDEndpointsOperations(self._client, self._config, self._serialize, self._deserialize) self.afd_origin_groups = AFDOriginGroupsOperations( self._client, self._config, self._serialize, self._deserialize @@ -175,21 +180,23 @@ def __init__( self._client, self._config, self._serialize, self._deserialize ) self.secrets = SecretsOperations(self._client, self._config, self._serialize, self._deserialize) - self.log_analytics = LogAnalyticsOperations(self._client, self._config, self._serialize, self._deserialize) - self.profiles = ProfilesOperations(self._client, self._config, self._serialize, self._deserialize) self.endpoints = EndpointsOperations(self._client, self._config, self._serialize, self._deserialize) self.origins = OriginsOperations(self._client, self._config, self._serialize, self._deserialize) self.origin_groups = OriginGroupsOperations(self._client, self._config, self._serialize, self._deserialize) self.custom_domains = CustomDomainsOperations(self._client, self._config, self._serialize, self._deserialize) + self.afd_custom_domains = AFDCustomDomainsOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.afd_profiles = AFDProfilesOperations(self._client, self._config, self._serialize, self._deserialize) + self.log_analytics = LogAnalyticsOperations(self._client, self._config, self._serialize, self._deserialize) + self.policies = PoliciesOperations(self._client, self._config, self._serialize, self._deserialize) self.resource_usage = ResourceUsageOperations(self._client, self._config, self._serialize, self._deserialize) - self.operations = Operations(self._client, self._config, self._serialize, self._deserialize) self.edge_nodes = EdgeNodesOperations(self._client, self._config, self._serialize, self._deserialize) - self.policies = PoliciesOperations(self._client, self._config, self._serialize, self._deserialize) self.managed_rule_sets = ManagedRuleSetsOperations( self._client, self._config, self._serialize, self._deserialize ) - def _send_request( + def send_request( self, request: HttpRequest, *, stream: bool = False, **kwargs: Any ) -> Awaitable[AsyncHttpResponse]: """Runs the network request through the client's chained policies. @@ -197,7 +204,7 @@ def _send_request( >>> from azure.core.rest import HttpRequest >>> request = HttpRequest("GET", "https://www.example.org/") - >>> response = await client._send_request(request) + >>> response = await client.send_request(request) For more information on this code flow, see https://aka.ms/azsdk/dpcodegen/python/send_request @@ -210,7 +217,11 @@ def _send_request( """ request_copy = deepcopy(request) - request_copy.url = self._client.format_url(request_copy.url) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments) return self._client.send_request(request_copy, stream=stream, **kwargs) # type: ignore async def close(self) -> None: diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/_configuration.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/_configuration.py index 8598c3b27a38..e07e1c180d8c 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/_configuration.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/_configuration.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -18,21 +18,24 @@ from azure.core.credentials_async import AsyncTokenCredential -class CdnManagementClientConfiguration: # pylint: disable=too-many-instance-attributes - """Configuration for CdnManagementClient. +class CdnClientConfiguration: # pylint: disable=too-many-instance-attributes + """Configuration for CdnClient. Note that all parameters used to create this instance are saved as instance attributes. - :param credential: Credential needed for the client to connect to Azure. Required. + :param credential: Credential used to authenticate requests to the service. Required. :type credential: ~azure.core.credentials_async.AsyncTokenCredential :param subscription_id: The ID of the target subscription. The value must be an UUID. Required. :type subscription_id: str + :param base_url: Service host. Default value is "https://management.azure.com". + :type base_url: str :param cloud_setting: The cloud setting for which to get the ARM endpoint. Default value is None. :type cloud_setting: ~azure.core.AzureClouds - :keyword api_version: Api Version. Default value is "2025-06-01". Note that overriding this - default value may result in unsupported behavior. + :keyword api_version: The API version to use for this operation. Known values are "2025-06-01" + and None. Default value is None. If not set, the operation's default API version will be used. + Note that overriding this default value may result in unsupported behavior. :paramtype api_version: str """ @@ -40,6 +43,7 @@ def __init__( self, credential: "AsyncTokenCredential", subscription_id: str, + base_url: str = "https://management.azure.com", cloud_setting: Optional["AzureClouds"] = None, **kwargs: Any ) -> None: @@ -52,6 +56,7 @@ def __init__( self.credential = credential self.subscription_id = subscription_id + self.base_url = base_url self.cloud_setting = cloud_setting self.api_version = api_version self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"]) diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/_patch.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/_patch.py index d3be7c117232..ea765788358a 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/_patch.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/_patch.py @@ -1,34 +1,20 @@ # coding=utf-8 # -------------------------------------------------------------------------- -# # Copyright (c) Microsoft Corporation. All rights reserved. -# -# The MIT License (MIT) -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the ""Software""), to -# deal in the Software without restriction, including without limitation the -# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -# sell copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -# IN THE SOFTWARE. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # -------------------------------------------------------------------------- +"""Customize generated code here. +Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize +""" -# This file is used for handwritten extensions to the generated code. Example: -# https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md +__all__: list[str] = [] # Add all objects you want publicly available to users at this package level def patch_sdk(): - pass + """Do not remove from this file. + + `patch_sdk` is a last resort escape hatch that allows you to do customizations + you can't accomplish using the techniques described in + https://aka.ms/azsdk/python/dpcodegen/python/customize + """ diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/__init__.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/__init__.py index 8fc333a2c406..43626d3a22d5 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/__init__.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/__init__.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # pylint: disable=wrong-import-position @@ -13,36 +12,36 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._cdn_management_client_operations import _CdnManagementClientOperationsMixin # type: ignore # pylint: disable=unused-import -from ._afd_profiles_operations import AFDProfilesOperations # type: ignore -from ._afd_custom_domains_operations import AFDCustomDomainsOperations # type: ignore -from ._afd_endpoints_operations import AFDEndpointsOperations # type: ignore -from ._afd_origin_groups_operations import AFDOriginGroupsOperations # type: ignore -from ._afd_origins_operations import AFDOriginsOperations # type: ignore -from ._routes_operations import RoutesOperations # type: ignore -from ._rule_sets_operations import RuleSetsOperations # type: ignore -from ._rules_operations import RulesOperations # type: ignore -from ._security_policies_operations import SecurityPoliciesOperations # type: ignore -from ._secrets_operations import SecretsOperations # type: ignore -from ._log_analytics_operations import LogAnalyticsOperations # type: ignore -from ._profiles_operations import ProfilesOperations # type: ignore -from ._endpoints_operations import EndpointsOperations # type: ignore -from ._origins_operations import OriginsOperations # type: ignore -from ._origin_groups_operations import OriginGroupsOperations # type: ignore -from ._custom_domains_operations import CustomDomainsOperations # type: ignore -from ._resource_usage_operations import ResourceUsageOperations # type: ignore from ._operations import Operations # type: ignore -from ._edge_nodes_operations import EdgeNodesOperations # type: ignore -from ._policies_operations import PoliciesOperations # type: ignore -from ._managed_rule_sets_operations import ManagedRuleSetsOperations # type: ignore +from ._operations import ProfilesOperations # type: ignore +from ._operations import AFDEndpointsOperations # type: ignore +from ._operations import AFDOriginGroupsOperations # type: ignore +from ._operations import AFDOriginsOperations # type: ignore +from ._operations import RoutesOperations # type: ignore +from ._operations import RuleSetsOperations # type: ignore +from ._operations import RulesOperations # type: ignore +from ._operations import SecurityPoliciesOperations # type: ignore +from ._operations import SecretsOperations # type: ignore +from ._operations import EndpointsOperations # type: ignore +from ._operations import OriginsOperations # type: ignore +from ._operations import OriginGroupsOperations # type: ignore +from ._operations import CustomDomainsOperations # type: ignore +from ._operations import AFDCustomDomainsOperations # type: ignore +from ._operations import AFDProfilesOperations # type: ignore +from ._operations import LogAnalyticsOperations # type: ignore +from ._operations import PoliciesOperations # type: ignore +from ._operations import ResourceUsageOperations # type: ignore +from ._operations import EdgeNodesOperations # type: ignore +from ._operations import ManagedRuleSetsOperations # type: ignore +from ._operations import _CdnClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "AFDProfilesOperations", - "AFDCustomDomainsOperations", + "Operations", + "ProfilesOperations", "AFDEndpointsOperations", "AFDOriginGroupsOperations", "AFDOriginsOperations", @@ -51,16 +50,16 @@ "RulesOperations", "SecurityPoliciesOperations", "SecretsOperations", - "LogAnalyticsOperations", - "ProfilesOperations", "EndpointsOperations", "OriginsOperations", "OriginGroupsOperations", "CustomDomainsOperations", + "AFDCustomDomainsOperations", + "AFDProfilesOperations", + "LogAnalyticsOperations", + "PoliciesOperations", "ResourceUsageOperations", - "Operations", "EdgeNodesOperations", - "PoliciesOperations", "ManagedRuleSetsOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_afd_custom_domains_operations.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_afd_custom_domains_operations.py deleted file mode 100644 index 44a67a4a92b9..000000000000 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_afd_custom_domains_operations.py +++ /dev/null @@ -1,911 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._afd_custom_domains_operations import ( - build_create_request, - build_delete_request, - build_get_request, - build_list_by_profile_request, - build_refresh_validation_token_request, - build_update_request, -) -from .._configuration import CdnManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class AFDCustomDomainsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.cdn.aio.CdnManagementClient`'s - :attr:`afd_custom_domains` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: CdnManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_profile( - self, resource_group_name: str, profile_name: str, **kwargs: Any - ) -> AsyncItemPaged["_models.AFDDomain"]: - """Lists existing AzureFrontDoor domains. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :return: An iterator like instance of either AFDDomain or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cdn.models.AFDDomain] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.AFDDomainListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_profile_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("AFDDomainListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get( - self, resource_group_name: str, profile_name: str, custom_domain_name: str, **kwargs: Any - ) -> _models.AFDDomain: - """Gets an existing AzureFrontDoor domain with the specified domain name under the specified - subscription, resource group and profile. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param custom_domain_name: Name of the domain under the profile which is unique globally. - Required. - :type custom_domain_name: str - :return: AFDDomain or the result of cls(response) - :rtype: ~azure.mgmt.cdn.models.AFDDomain - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.AFDDomain] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - custom_domain_name=custom_domain_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("AFDDomain", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - async def _create_initial( - self, - resource_group_name: str, - profile_name: str, - custom_domain_name: str, - custom_domain: Union[_models.AFDDomain, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(custom_domain, (IOBase, bytes)): - _content = custom_domain - else: - _json = self._serialize.body(custom_domain, "AFDDomain") - - _request = build_create_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - custom_domain_name=custom_domain_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 201: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_create( - self, - resource_group_name: str, - profile_name: str, - custom_domain_name: str, - custom_domain: _models.AFDDomain, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.AFDDomain]: - """Creates a new domain within the specified profile. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param custom_domain_name: Name of the domain under the profile which is unique globally. - Required. - :type custom_domain_name: str - :param custom_domain: Domain properties. Required. - :type custom_domain: ~azure.mgmt.cdn.models.AFDDomain - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either AFDDomain or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.AFDDomain] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_create( - self, - resource_group_name: str, - profile_name: str, - custom_domain_name: str, - custom_domain: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.AFDDomain]: - """Creates a new domain within the specified profile. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param custom_domain_name: Name of the domain under the profile which is unique globally. - Required. - :type custom_domain_name: str - :param custom_domain: Domain properties. Required. - :type custom_domain: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either AFDDomain or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.AFDDomain] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_create( - self, - resource_group_name: str, - profile_name: str, - custom_domain_name: str, - custom_domain: Union[_models.AFDDomain, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.AFDDomain]: - """Creates a new domain within the specified profile. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param custom_domain_name: Name of the domain under the profile which is unique globally. - Required. - :type custom_domain_name: str - :param custom_domain: Domain properties. Is either a AFDDomain type or a IO[bytes] type. - Required. - :type custom_domain: ~azure.mgmt.cdn.models.AFDDomain or IO[bytes] - :return: An instance of AsyncLROPoller that returns either AFDDomain or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.AFDDomain] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.AFDDomain] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._create_initial( - resource_group_name=resource_group_name, - profile_name=profile_name, - custom_domain_name=custom_domain_name, - custom_domain=custom_domain, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("AFDDomain", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, - AsyncARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.AFDDomain].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.AFDDomain]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _update_initial( - self, - resource_group_name: str, - profile_name: str, - custom_domain_name: str, - custom_domain_update_properties: Union[_models.AFDDomainUpdateParameters, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(custom_domain_update_properties, (IOBase, bytes)): - _content = custom_domain_update_properties - else: - _json = self._serialize.body(custom_domain_update_properties, "AFDDomainUpdateParameters") - - _request = build_update_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - custom_domain_name=custom_domain_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_update( - self, - resource_group_name: str, - profile_name: str, - custom_domain_name: str, - custom_domain_update_properties: _models.AFDDomainUpdateParameters, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.AFDDomain]: - """Updates an existing domain within a profile. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param custom_domain_name: Name of the domain under the profile which is unique globally. - Required. - :type custom_domain_name: str - :param custom_domain_update_properties: Domain properties. Required. - :type custom_domain_update_properties: ~azure.mgmt.cdn.models.AFDDomainUpdateParameters - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either AFDDomain or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.AFDDomain] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_update( - self, - resource_group_name: str, - profile_name: str, - custom_domain_name: str, - custom_domain_update_properties: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.AFDDomain]: - """Updates an existing domain within a profile. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param custom_domain_name: Name of the domain under the profile which is unique globally. - Required. - :type custom_domain_name: str - :param custom_domain_update_properties: Domain properties. Required. - :type custom_domain_update_properties: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either AFDDomain or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.AFDDomain] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_update( - self, - resource_group_name: str, - profile_name: str, - custom_domain_name: str, - custom_domain_update_properties: Union[_models.AFDDomainUpdateParameters, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.AFDDomain]: - """Updates an existing domain within a profile. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param custom_domain_name: Name of the domain under the profile which is unique globally. - Required. - :type custom_domain_name: str - :param custom_domain_update_properties: Domain properties. Is either a - AFDDomainUpdateParameters type or a IO[bytes] type. Required. - :type custom_domain_update_properties: ~azure.mgmt.cdn.models.AFDDomainUpdateParameters or - IO[bytes] - :return: An instance of AsyncLROPoller that returns either AFDDomain or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.AFDDomain] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.AFDDomain] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._update_initial( - resource_group_name=resource_group_name, - profile_name=profile_name, - custom_domain_name=custom_domain_name, - custom_domain_update_properties=custom_domain_update_properties, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("AFDDomain", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, - AsyncARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.AFDDomain].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.AFDDomain]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _delete_initial( - self, resource_group_name: str, profile_name: str, custom_domain_name: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - custom_domain_name=custom_domain_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_delete( - self, resource_group_name: str, profile_name: str, custom_domain_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: - """Deletes an existing AzureFrontDoor domain with the specified domain name under the specified - subscription, resource group and profile. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param custom_domain_name: Name of the domain under the profile which is unique globally. - Required. - :type custom_domain_name: str - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._delete_initial( - resource_group_name=resource_group_name, - profile_name=profile_name, - custom_domain_name=custom_domain_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, - AsyncARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - async def _refresh_validation_token_initial( - self, resource_group_name: str, profile_name: str, custom_domain_name: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_refresh_validation_token_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - custom_domain_name=custom_domain_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_refresh_validation_token( - self, resource_group_name: str, profile_name: str, custom_domain_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: - """Updates the domain validation token. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param custom_domain_name: Name of the domain under the profile which is unique globally. - Required. - :type custom_domain_name: str - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._refresh_validation_token_initial( - resource_group_name=resource_group_name, - profile_name=profile_name, - custom_domain_name=custom_domain_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, - AsyncARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_afd_endpoints_operations.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_afd_endpoints_operations.py deleted file mode 100644 index 1ad4a4c5c7ed..000000000000 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_afd_endpoints_operations.py +++ /dev/null @@ -1,1271 +0,0 @@ -# pylint: disable=too-many-lines -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._afd_endpoints_operations import ( - build_create_request, - build_delete_request, - build_get_request, - build_list_by_profile_request, - build_list_resource_usage_request, - build_purge_content_request, - build_update_request, - build_validate_custom_domain_request, -) -from .._configuration import CdnManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class AFDEndpointsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.cdn.aio.CdnManagementClient`'s - :attr:`afd_endpoints` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: CdnManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_profile( - self, resource_group_name: str, profile_name: str, **kwargs: Any - ) -> AsyncItemPaged["_models.AFDEndpoint"]: - """Lists existing AzureFrontDoor endpoints. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :return: An iterator like instance of either AFDEndpoint or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cdn.models.AFDEndpoint] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.AFDEndpointListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_profile_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("AFDEndpointListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get( - self, resource_group_name: str, profile_name: str, endpoint_name: str, **kwargs: Any - ) -> _models.AFDEndpoint: - """Gets an existing AzureFrontDoor endpoint with the specified endpoint name under the specified - subscription, resource group and profile. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :return: AFDEndpoint or the result of cls(response) - :rtype: ~azure.mgmt.cdn.models.AFDEndpoint - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.AFDEndpoint] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - endpoint_name=endpoint_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("AFDEndpoint", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - async def _create_initial( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - endpoint: Union[_models.AFDEndpoint, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(endpoint, (IOBase, bytes)): - _content = endpoint - else: - _json = self._serialize.body(endpoint, "AFDEndpoint") - - _request = build_create_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - endpoint_name=endpoint_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_create( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - endpoint: _models.AFDEndpoint, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.AFDEndpoint]: - """Creates a new AzureFrontDoor endpoint with the specified endpoint name under the specified - subscription, resource group and profile. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :param endpoint: Endpoint properties. Required. - :type endpoint: ~azure.mgmt.cdn.models.AFDEndpoint - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either AFDEndpoint or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.AFDEndpoint] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_create( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - endpoint: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.AFDEndpoint]: - """Creates a new AzureFrontDoor endpoint with the specified endpoint name under the specified - subscription, resource group and profile. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :param endpoint: Endpoint properties. Required. - :type endpoint: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either AFDEndpoint or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.AFDEndpoint] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_create( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - endpoint: Union[_models.AFDEndpoint, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.AFDEndpoint]: - """Creates a new AzureFrontDoor endpoint with the specified endpoint name under the specified - subscription, resource group and profile. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :param endpoint: Endpoint properties. Is either a AFDEndpoint type or a IO[bytes] type. - Required. - :type endpoint: ~azure.mgmt.cdn.models.AFDEndpoint or IO[bytes] - :return: An instance of AsyncLROPoller that returns either AFDEndpoint or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.AFDEndpoint] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.AFDEndpoint] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._create_initial( - resource_group_name=resource_group_name, - profile_name=profile_name, - endpoint_name=endpoint_name, - endpoint=endpoint, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("AFDEndpoint", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, - AsyncARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.AFDEndpoint].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.AFDEndpoint]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _update_initial( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - endpoint_update_properties: Union[_models.AFDEndpointUpdateParameters, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(endpoint_update_properties, (IOBase, bytes)): - _content = endpoint_update_properties - else: - _json = self._serialize.body(endpoint_update_properties, "AFDEndpointUpdateParameters") - - _request = build_update_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - endpoint_name=endpoint_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_update( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - endpoint_update_properties: _models.AFDEndpointUpdateParameters, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.AFDEndpoint]: - """Updates an existing AzureFrontDoor endpoint with the specified endpoint name under the - specified subscription, resource group and profile. Only tags can be updated after creating an - endpoint. To update origins, use the Update Origin operation. To update origin groups, use the - Update Origin group operation. To update domains, use the Update Custom Domain operation. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :param endpoint_update_properties: Endpoint update properties. Required. - :type endpoint_update_properties: ~azure.mgmt.cdn.models.AFDEndpointUpdateParameters - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either AFDEndpoint or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.AFDEndpoint] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_update( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - endpoint_update_properties: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.AFDEndpoint]: - """Updates an existing AzureFrontDoor endpoint with the specified endpoint name under the - specified subscription, resource group and profile. Only tags can be updated after creating an - endpoint. To update origins, use the Update Origin operation. To update origin groups, use the - Update Origin group operation. To update domains, use the Update Custom Domain operation. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :param endpoint_update_properties: Endpoint update properties. Required. - :type endpoint_update_properties: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either AFDEndpoint or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.AFDEndpoint] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_update( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - endpoint_update_properties: Union[_models.AFDEndpointUpdateParameters, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.AFDEndpoint]: - """Updates an existing AzureFrontDoor endpoint with the specified endpoint name under the - specified subscription, resource group and profile. Only tags can be updated after creating an - endpoint. To update origins, use the Update Origin operation. To update origin groups, use the - Update Origin group operation. To update domains, use the Update Custom Domain operation. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :param endpoint_update_properties: Endpoint update properties. Is either a - AFDEndpointUpdateParameters type or a IO[bytes] type. Required. - :type endpoint_update_properties: ~azure.mgmt.cdn.models.AFDEndpointUpdateParameters or - IO[bytes] - :return: An instance of AsyncLROPoller that returns either AFDEndpoint or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.AFDEndpoint] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.AFDEndpoint] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._update_initial( - resource_group_name=resource_group_name, - profile_name=profile_name, - endpoint_name=endpoint_name, - endpoint_update_properties=endpoint_update_properties, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("AFDEndpoint", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, - AsyncARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.AFDEndpoint].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.AFDEndpoint]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _delete_initial( - self, resource_group_name: str, profile_name: str, endpoint_name: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - endpoint_name=endpoint_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_delete( - self, resource_group_name: str, profile_name: str, endpoint_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: - """Deletes an existing AzureFrontDoor endpoint with the specified endpoint name under the - specified subscription, resource group and profile. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._delete_initial( - resource_group_name=resource_group_name, - profile_name=profile_name, - endpoint_name=endpoint_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, - AsyncARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - async def _purge_content_initial( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - contents: Union[_models.AfdPurgeParameters, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(contents, (IOBase, bytes)): - _content = contents - else: - _json = self._serialize.body(contents, "AfdPurgeParameters") - - _request = build_purge_content_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - endpoint_name=endpoint_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_purge_content( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - contents: _models.AfdPurgeParameters, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[None]: - """Removes a content from AzureFrontDoor. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :param contents: The list of paths to the content and the list of linked domains to be purged. - Path can be a full URL, e.g. '/pictures/city.png' which removes a single file, or a directory - with a wildcard, e.g. '/pictures/*' which removes all folders and files in the directory. - Required. - :type contents: ~azure.mgmt.cdn.models.AfdPurgeParameters - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_purge_content( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - contents: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[None]: - """Removes a content from AzureFrontDoor. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :param contents: The list of paths to the content and the list of linked domains to be purged. - Path can be a full URL, e.g. '/pictures/city.png' which removes a single file, or a directory - with a wildcard, e.g. '/pictures/*' which removes all folders and files in the directory. - Required. - :type contents: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_purge_content( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - contents: Union[_models.AfdPurgeParameters, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[None]: - """Removes a content from AzureFrontDoor. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :param contents: The list of paths to the content and the list of linked domains to be purged. - Path can be a full URL, e.g. '/pictures/city.png' which removes a single file, or a directory - with a wildcard, e.g. '/pictures/*' which removes all folders and files in the directory. Is - either a AfdPurgeParameters type or a IO[bytes] type. Required. - :type contents: ~azure.mgmt.cdn.models.AfdPurgeParameters or IO[bytes] - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._purge_content_initial( - resource_group_name=resource_group_name, - profile_name=profile_name, - endpoint_name=endpoint_name, - contents=contents, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, - AsyncARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - @distributed_trace - def list_resource_usage( - self, resource_group_name: str, profile_name: str, endpoint_name: str, **kwargs: Any - ) -> AsyncItemPaged["_models.Usage"]: - """Checks the quota and actual usage of endpoints under the given Azure Front Door profile. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :return: An iterator like instance of either Usage or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cdn.models.Usage] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.UsagesListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_resource_usage_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - endpoint_name=endpoint_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("UsagesListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @overload - async def validate_custom_domain( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - custom_domain_properties: _models.ValidateCustomDomainInput, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ValidateCustomDomainOutput: - """Validates the custom domain mapping to ensure it maps to the correct Azure Front Door endpoint - in DNS. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :param custom_domain_properties: Custom domain to be validated. Required. - :type custom_domain_properties: ~azure.mgmt.cdn.models.ValidateCustomDomainInput - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: ValidateCustomDomainOutput or the result of cls(response) - :rtype: ~azure.mgmt.cdn.models.ValidateCustomDomainOutput - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def validate_custom_domain( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - custom_domain_properties: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ValidateCustomDomainOutput: - """Validates the custom domain mapping to ensure it maps to the correct Azure Front Door endpoint - in DNS. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :param custom_domain_properties: Custom domain to be validated. Required. - :type custom_domain_properties: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: ValidateCustomDomainOutput or the result of cls(response) - :rtype: ~azure.mgmt.cdn.models.ValidateCustomDomainOutput - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def validate_custom_domain( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - custom_domain_properties: Union[_models.ValidateCustomDomainInput, IO[bytes]], - **kwargs: Any - ) -> _models.ValidateCustomDomainOutput: - """Validates the custom domain mapping to ensure it maps to the correct Azure Front Door endpoint - in DNS. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :param custom_domain_properties: Custom domain to be validated. Is either a - ValidateCustomDomainInput type or a IO[bytes] type. Required. - :type custom_domain_properties: ~azure.mgmt.cdn.models.ValidateCustomDomainInput or IO[bytes] - :return: ValidateCustomDomainOutput or the result of cls(response) - :rtype: ~azure.mgmt.cdn.models.ValidateCustomDomainOutput - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ValidateCustomDomainOutput] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(custom_domain_properties, (IOBase, bytes)): - _content = custom_domain_properties - else: - _json = self._serialize.body(custom_domain_properties, "ValidateCustomDomainInput") - - _request = build_validate_custom_domain_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - endpoint_name=endpoint_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("ValidateCustomDomainOutput", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_afd_origin_groups_operations.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_afd_origin_groups_operations.py deleted file mode 100644 index 4bb2b6d41ec5..000000000000 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_afd_origin_groups_operations.py +++ /dev/null @@ -1,879 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._afd_origin_groups_operations import ( - build_create_request, - build_delete_request, - build_get_request, - build_list_by_profile_request, - build_list_resource_usage_request, - build_update_request, -) -from .._configuration import CdnManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class AFDOriginGroupsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.cdn.aio.CdnManagementClient`'s - :attr:`afd_origin_groups` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: CdnManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_profile( - self, resource_group_name: str, profile_name: str, **kwargs: Any - ) -> AsyncItemPaged["_models.AFDOriginGroup"]: - """Lists all of the existing origin groups within a profile. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :return: An iterator like instance of either AFDOriginGroup or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cdn.models.AFDOriginGroup] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.AFDOriginGroupListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_profile_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("AFDOriginGroupListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get( - self, resource_group_name: str, profile_name: str, origin_group_name: str, **kwargs: Any - ) -> _models.AFDOriginGroup: - """Gets an existing origin group within a profile. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param origin_group_name: Name of the origin group which is unique within the endpoint. - Required. - :type origin_group_name: str - :return: AFDOriginGroup or the result of cls(response) - :rtype: ~azure.mgmt.cdn.models.AFDOriginGroup - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.AFDOriginGroup] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - origin_group_name=origin_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("AFDOriginGroup", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - async def _create_initial( - self, - resource_group_name: str, - profile_name: str, - origin_group_name: str, - origin_group: Union[_models.AFDOriginGroup, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(origin_group, (IOBase, bytes)): - _content = origin_group - else: - _json = self._serialize.body(origin_group, "AFDOriginGroup") - - _request = build_create_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - origin_group_name=origin_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_create( - self, - resource_group_name: str, - profile_name: str, - origin_group_name: str, - origin_group: _models.AFDOriginGroup, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.AFDOriginGroup]: - """Creates a new origin group within the specified profile. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param origin_group_name: Name of the origin group which is unique within the endpoint. - Required. - :type origin_group_name: str - :param origin_group: Origin group properties. Required. - :type origin_group: ~azure.mgmt.cdn.models.AFDOriginGroup - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either AFDOriginGroup or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.AFDOriginGroup] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_create( - self, - resource_group_name: str, - profile_name: str, - origin_group_name: str, - origin_group: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.AFDOriginGroup]: - """Creates a new origin group within the specified profile. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param origin_group_name: Name of the origin group which is unique within the endpoint. - Required. - :type origin_group_name: str - :param origin_group: Origin group properties. Required. - :type origin_group: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either AFDOriginGroup or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.AFDOriginGroup] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_create( - self, - resource_group_name: str, - profile_name: str, - origin_group_name: str, - origin_group: Union[_models.AFDOriginGroup, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.AFDOriginGroup]: - """Creates a new origin group within the specified profile. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param origin_group_name: Name of the origin group which is unique within the endpoint. - Required. - :type origin_group_name: str - :param origin_group: Origin group properties. Is either a AFDOriginGroup type or a IO[bytes] - type. Required. - :type origin_group: ~azure.mgmt.cdn.models.AFDOriginGroup or IO[bytes] - :return: An instance of AsyncLROPoller that returns either AFDOriginGroup or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.AFDOriginGroup] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.AFDOriginGroup] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._create_initial( - resource_group_name=resource_group_name, - profile_name=profile_name, - origin_group_name=origin_group_name, - origin_group=origin_group, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("AFDOriginGroup", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, - AsyncARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.AFDOriginGroup].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.AFDOriginGroup]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _update_initial( - self, - resource_group_name: str, - profile_name: str, - origin_group_name: str, - origin_group_update_properties: Union[_models.AFDOriginGroupUpdateParameters, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(origin_group_update_properties, (IOBase, bytes)): - _content = origin_group_update_properties - else: - _json = self._serialize.body(origin_group_update_properties, "AFDOriginGroupUpdateParameters") - - _request = build_update_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - origin_group_name=origin_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_update( - self, - resource_group_name: str, - profile_name: str, - origin_group_name: str, - origin_group_update_properties: _models.AFDOriginGroupUpdateParameters, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.AFDOriginGroup]: - """Updates an existing origin group within a profile. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param origin_group_name: Name of the origin group which is unique within the profile. - Required. - :type origin_group_name: str - :param origin_group_update_properties: Origin group properties. Required. - :type origin_group_update_properties: ~azure.mgmt.cdn.models.AFDOriginGroupUpdateParameters - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either AFDOriginGroup or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.AFDOriginGroup] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_update( - self, - resource_group_name: str, - profile_name: str, - origin_group_name: str, - origin_group_update_properties: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.AFDOriginGroup]: - """Updates an existing origin group within a profile. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param origin_group_name: Name of the origin group which is unique within the profile. - Required. - :type origin_group_name: str - :param origin_group_update_properties: Origin group properties. Required. - :type origin_group_update_properties: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either AFDOriginGroup or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.AFDOriginGroup] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_update( - self, - resource_group_name: str, - profile_name: str, - origin_group_name: str, - origin_group_update_properties: Union[_models.AFDOriginGroupUpdateParameters, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.AFDOriginGroup]: - """Updates an existing origin group within a profile. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param origin_group_name: Name of the origin group which is unique within the profile. - Required. - :type origin_group_name: str - :param origin_group_update_properties: Origin group properties. Is either a - AFDOriginGroupUpdateParameters type or a IO[bytes] type. Required. - :type origin_group_update_properties: ~azure.mgmt.cdn.models.AFDOriginGroupUpdateParameters or - IO[bytes] - :return: An instance of AsyncLROPoller that returns either AFDOriginGroup or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.AFDOriginGroup] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.AFDOriginGroup] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._update_initial( - resource_group_name=resource_group_name, - profile_name=profile_name, - origin_group_name=origin_group_name, - origin_group_update_properties=origin_group_update_properties, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("AFDOriginGroup", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, - AsyncARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.AFDOriginGroup].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.AFDOriginGroup]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _delete_initial( - self, resource_group_name: str, profile_name: str, origin_group_name: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - origin_group_name=origin_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_delete( - self, resource_group_name: str, profile_name: str, origin_group_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: - """Deletes an existing origin group within a profile. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param origin_group_name: Name of the origin group which is unique within the profile. - Required. - :type origin_group_name: str - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._delete_initial( - resource_group_name=resource_group_name, - profile_name=profile_name, - origin_group_name=origin_group_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, - AsyncARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - @distributed_trace - def list_resource_usage( - self, resource_group_name: str, profile_name: str, origin_group_name: str, **kwargs: Any - ) -> AsyncItemPaged["_models.Usage"]: - """Checks the quota and actual usage of endpoints under the given Azure Front Door profile.. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param origin_group_name: Name of the origin group which is unique within the endpoint. - Required. - :type origin_group_name: str - :return: An iterator like instance of either Usage or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cdn.models.Usage] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.UsagesListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_resource_usage_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - origin_group_name=origin_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("UsagesListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_afd_origins_operations.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_afd_origins_operations.py deleted file mode 100644 index 36a29d94b474..000000000000 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_afd_origins_operations.py +++ /dev/null @@ -1,819 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._afd_origins_operations import ( - build_create_request, - build_delete_request, - build_get_request, - build_list_by_origin_group_request, - build_update_request, -) -from .._configuration import CdnManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class AFDOriginsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.cdn.aio.CdnManagementClient`'s - :attr:`afd_origins` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: CdnManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_origin_group( - self, resource_group_name: str, profile_name: str, origin_group_name: str, **kwargs: Any - ) -> AsyncItemPaged["_models.AFDOrigin"]: - """Lists all of the existing origins within an origin group. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param origin_group_name: Name of the origin group which is unique within the profile. - Required. - :type origin_group_name: str - :return: An iterator like instance of either AFDOrigin or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cdn.models.AFDOrigin] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.AFDOriginListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_origin_group_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - origin_group_name=origin_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("AFDOriginListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get( - self, resource_group_name: str, profile_name: str, origin_group_name: str, origin_name: str, **kwargs: Any - ) -> _models.AFDOrigin: - """Gets an existing origin within an origin group. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param origin_group_name: Name of the origin group which is unique within the profile. - Required. - :type origin_group_name: str - :param origin_name: Name of the origin which is unique within the profile. Required. - :type origin_name: str - :return: AFDOrigin or the result of cls(response) - :rtype: ~azure.mgmt.cdn.models.AFDOrigin - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.AFDOrigin] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - origin_group_name=origin_group_name, - origin_name=origin_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("AFDOrigin", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - async def _create_initial( - self, - resource_group_name: str, - profile_name: str, - origin_group_name: str, - origin_name: str, - origin: Union[_models.AFDOrigin, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(origin, (IOBase, bytes)): - _content = origin - else: - _json = self._serialize.body(origin, "AFDOrigin") - - _request = build_create_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - origin_group_name=origin_group_name, - origin_name=origin_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_create( - self, - resource_group_name: str, - profile_name: str, - origin_group_name: str, - origin_name: str, - origin: _models.AFDOrigin, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.AFDOrigin]: - """Creates a new origin within the specified origin group. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param origin_group_name: Name of the origin group which is unique within the profile. - Required. - :type origin_group_name: str - :param origin_name: Name of the origin that is unique within the profile. Required. - :type origin_name: str - :param origin: Origin properties. Required. - :type origin: ~azure.mgmt.cdn.models.AFDOrigin - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either AFDOrigin or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.AFDOrigin] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_create( - self, - resource_group_name: str, - profile_name: str, - origin_group_name: str, - origin_name: str, - origin: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.AFDOrigin]: - """Creates a new origin within the specified origin group. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param origin_group_name: Name of the origin group which is unique within the profile. - Required. - :type origin_group_name: str - :param origin_name: Name of the origin that is unique within the profile. Required. - :type origin_name: str - :param origin: Origin properties. Required. - :type origin: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either AFDOrigin or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.AFDOrigin] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_create( - self, - resource_group_name: str, - profile_name: str, - origin_group_name: str, - origin_name: str, - origin: Union[_models.AFDOrigin, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.AFDOrigin]: - """Creates a new origin within the specified origin group. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param origin_group_name: Name of the origin group which is unique within the profile. - Required. - :type origin_group_name: str - :param origin_name: Name of the origin that is unique within the profile. Required. - :type origin_name: str - :param origin: Origin properties. Is either a AFDOrigin type or a IO[bytes] type. Required. - :type origin: ~azure.mgmt.cdn.models.AFDOrigin or IO[bytes] - :return: An instance of AsyncLROPoller that returns either AFDOrigin or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.AFDOrigin] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.AFDOrigin] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._create_initial( - resource_group_name=resource_group_name, - profile_name=profile_name, - origin_group_name=origin_group_name, - origin_name=origin_name, - origin=origin, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("AFDOrigin", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, - AsyncARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.AFDOrigin].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.AFDOrigin]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _update_initial( - self, - resource_group_name: str, - profile_name: str, - origin_group_name: str, - origin_name: str, - origin_update_properties: Union[_models.AFDOriginUpdateParameters, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(origin_update_properties, (IOBase, bytes)): - _content = origin_update_properties - else: - _json = self._serialize.body(origin_update_properties, "AFDOriginUpdateParameters") - - _request = build_update_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - origin_group_name=origin_group_name, - origin_name=origin_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_update( - self, - resource_group_name: str, - profile_name: str, - origin_group_name: str, - origin_name: str, - origin_update_properties: _models.AFDOriginUpdateParameters, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.AFDOrigin]: - """Updates an existing origin within an origin group. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param origin_group_name: Name of the origin group which is unique within the profile. - Required. - :type origin_group_name: str - :param origin_name: Name of the origin which is unique within the profile. Required. - :type origin_name: str - :param origin_update_properties: Origin properties. Required. - :type origin_update_properties: ~azure.mgmt.cdn.models.AFDOriginUpdateParameters - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either AFDOrigin or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.AFDOrigin] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_update( - self, - resource_group_name: str, - profile_name: str, - origin_group_name: str, - origin_name: str, - origin_update_properties: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.AFDOrigin]: - """Updates an existing origin within an origin group. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param origin_group_name: Name of the origin group which is unique within the profile. - Required. - :type origin_group_name: str - :param origin_name: Name of the origin which is unique within the profile. Required. - :type origin_name: str - :param origin_update_properties: Origin properties. Required. - :type origin_update_properties: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either AFDOrigin or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.AFDOrigin] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_update( - self, - resource_group_name: str, - profile_name: str, - origin_group_name: str, - origin_name: str, - origin_update_properties: Union[_models.AFDOriginUpdateParameters, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.AFDOrigin]: - """Updates an existing origin within an origin group. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param origin_group_name: Name of the origin group which is unique within the profile. - Required. - :type origin_group_name: str - :param origin_name: Name of the origin which is unique within the profile. Required. - :type origin_name: str - :param origin_update_properties: Origin properties. Is either a AFDOriginUpdateParameters type - or a IO[bytes] type. Required. - :type origin_update_properties: ~azure.mgmt.cdn.models.AFDOriginUpdateParameters or IO[bytes] - :return: An instance of AsyncLROPoller that returns either AFDOrigin or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.AFDOrigin] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.AFDOrigin] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._update_initial( - resource_group_name=resource_group_name, - profile_name=profile_name, - origin_group_name=origin_group_name, - origin_name=origin_name, - origin_update_properties=origin_update_properties, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("AFDOrigin", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, - AsyncARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.AFDOrigin].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.AFDOrigin]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _delete_initial( - self, resource_group_name: str, profile_name: str, origin_group_name: str, origin_name: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - origin_group_name=origin_group_name, - origin_name=origin_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_delete( - self, resource_group_name: str, profile_name: str, origin_group_name: str, origin_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: - """Deletes an existing origin within an origin group. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param origin_group_name: Name of the origin group which is unique within the profile. - Required. - :type origin_group_name: str - :param origin_name: Name of the origin which is unique within the profile. Required. - :type origin_name: str - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._delete_initial( - resource_group_name=resource_group_name, - profile_name=profile_name, - origin_group_name=origin_group_name, - origin_name=origin_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, - AsyncARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_afd_profiles_operations.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_afd_profiles_operations.py deleted file mode 100644 index 922c6a11625b..000000000000 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_afd_profiles_operations.py +++ /dev/null @@ -1,780 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._afd_profiles_operations import ( - build_check_endpoint_name_availability_request, - build_check_host_name_availability_request, - build_list_resource_usage_request, - build_upgrade_request, - build_validate_secret_request, -) -from .._configuration import CdnManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class AFDProfilesOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.cdn.aio.CdnManagementClient`'s - :attr:`afd_profiles` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: CdnManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @overload - async def check_endpoint_name_availability( - self, - resource_group_name: str, - profile_name: str, - check_endpoint_name_availability_input: _models.CheckEndpointNameAvailabilityInput, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.CheckEndpointNameAvailabilityOutput: - """Check the availability of an afdx endpoint name, and return the globally unique endpoint host - name. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param check_endpoint_name_availability_input: Input to check. Required. - :type check_endpoint_name_availability_input: - ~azure.mgmt.cdn.models.CheckEndpointNameAvailabilityInput - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: CheckEndpointNameAvailabilityOutput or the result of cls(response) - :rtype: ~azure.mgmt.cdn.models.CheckEndpointNameAvailabilityOutput - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def check_endpoint_name_availability( - self, - resource_group_name: str, - profile_name: str, - check_endpoint_name_availability_input: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.CheckEndpointNameAvailabilityOutput: - """Check the availability of an afdx endpoint name, and return the globally unique endpoint host - name. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param check_endpoint_name_availability_input: Input to check. Required. - :type check_endpoint_name_availability_input: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: CheckEndpointNameAvailabilityOutput or the result of cls(response) - :rtype: ~azure.mgmt.cdn.models.CheckEndpointNameAvailabilityOutput - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def check_endpoint_name_availability( - self, - resource_group_name: str, - profile_name: str, - check_endpoint_name_availability_input: Union[_models.CheckEndpointNameAvailabilityInput, IO[bytes]], - **kwargs: Any - ) -> _models.CheckEndpointNameAvailabilityOutput: - """Check the availability of an afdx endpoint name, and return the globally unique endpoint host - name. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param check_endpoint_name_availability_input: Input to check. Is either a - CheckEndpointNameAvailabilityInput type or a IO[bytes] type. Required. - :type check_endpoint_name_availability_input: - ~azure.mgmt.cdn.models.CheckEndpointNameAvailabilityInput or IO[bytes] - :return: CheckEndpointNameAvailabilityOutput or the result of cls(response) - :rtype: ~azure.mgmt.cdn.models.CheckEndpointNameAvailabilityOutput - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CheckEndpointNameAvailabilityOutput] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(check_endpoint_name_availability_input, (IOBase, bytes)): - _content = check_endpoint_name_availability_input - else: - _json = self._serialize.body(check_endpoint_name_availability_input, "CheckEndpointNameAvailabilityInput") - - _request = build_check_endpoint_name_availability_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("CheckEndpointNameAvailabilityOutput", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def list_resource_usage( - self, resource_group_name: str, profile_name: str, **kwargs: Any - ) -> AsyncItemPaged["_models.Usage"]: - """Checks the quota and actual usage of endpoints under the given Azure Front Door profile. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :return: An iterator like instance of either Usage or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cdn.models.Usage] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.UsagesListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_resource_usage_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("UsagesListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @overload - async def check_host_name_availability( - self, - resource_group_name: str, - profile_name: str, - check_host_name_availability_input: _models.CheckHostNameAvailabilityInput, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.CheckNameAvailabilityOutput: - """Validates the custom domain mapping to ensure it maps to the correct Azure Front Door endpoint - in DNS. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param check_host_name_availability_input: Custom domain to be validated. Required. - :type check_host_name_availability_input: ~azure.mgmt.cdn.models.CheckHostNameAvailabilityInput - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: CheckNameAvailabilityOutput or the result of cls(response) - :rtype: ~azure.mgmt.cdn.models.CheckNameAvailabilityOutput - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def check_host_name_availability( - self, - resource_group_name: str, - profile_name: str, - check_host_name_availability_input: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.CheckNameAvailabilityOutput: - """Validates the custom domain mapping to ensure it maps to the correct Azure Front Door endpoint - in DNS. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param check_host_name_availability_input: Custom domain to be validated. Required. - :type check_host_name_availability_input: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: CheckNameAvailabilityOutput or the result of cls(response) - :rtype: ~azure.mgmt.cdn.models.CheckNameAvailabilityOutput - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def check_host_name_availability( - self, - resource_group_name: str, - profile_name: str, - check_host_name_availability_input: Union[_models.CheckHostNameAvailabilityInput, IO[bytes]], - **kwargs: Any - ) -> _models.CheckNameAvailabilityOutput: - """Validates the custom domain mapping to ensure it maps to the correct Azure Front Door endpoint - in DNS. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param check_host_name_availability_input: Custom domain to be validated. Is either a - CheckHostNameAvailabilityInput type or a IO[bytes] type. Required. - :type check_host_name_availability_input: ~azure.mgmt.cdn.models.CheckHostNameAvailabilityInput - or IO[bytes] - :return: CheckNameAvailabilityOutput or the result of cls(response) - :rtype: ~azure.mgmt.cdn.models.CheckNameAvailabilityOutput - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CheckNameAvailabilityOutput] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(check_host_name_availability_input, (IOBase, bytes)): - _content = check_host_name_availability_input - else: - _json = self._serialize.body(check_host_name_availability_input, "CheckHostNameAvailabilityInput") - - _request = build_check_host_name_availability_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("CheckNameAvailabilityOutput", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - async def validate_secret( - self, - resource_group_name: str, - profile_name: str, - validate_secret_input: _models.ValidateSecretInput, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ValidateSecretOutput: - """Validate a Secret in the profile. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param validate_secret_input: The Secret source. Required. - :type validate_secret_input: ~azure.mgmt.cdn.models.ValidateSecretInput - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: ValidateSecretOutput or the result of cls(response) - :rtype: ~azure.mgmt.cdn.models.ValidateSecretOutput - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def validate_secret( - self, - resource_group_name: str, - profile_name: str, - validate_secret_input: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ValidateSecretOutput: - """Validate a Secret in the profile. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param validate_secret_input: The Secret source. Required. - :type validate_secret_input: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: ValidateSecretOutput or the result of cls(response) - :rtype: ~azure.mgmt.cdn.models.ValidateSecretOutput - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def validate_secret( - self, - resource_group_name: str, - profile_name: str, - validate_secret_input: Union[_models.ValidateSecretInput, IO[bytes]], - **kwargs: Any - ) -> _models.ValidateSecretOutput: - """Validate a Secret in the profile. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param validate_secret_input: The Secret source. Is either a ValidateSecretInput type or a - IO[bytes] type. Required. - :type validate_secret_input: ~azure.mgmt.cdn.models.ValidateSecretInput or IO[bytes] - :return: ValidateSecretOutput or the result of cls(response) - :rtype: ~azure.mgmt.cdn.models.ValidateSecretOutput - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ValidateSecretOutput] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(validate_secret_input, (IOBase, bytes)): - _content = validate_secret_input - else: - _json = self._serialize.body(validate_secret_input, "ValidateSecretInput") - - _request = build_validate_secret_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("ValidateSecretOutput", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - async def _upgrade_initial( - self, - resource_group_name: str, - profile_name: str, - profile_upgrade_parameters: Union[_models.ProfileUpgradeParameters, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(profile_upgrade_parameters, (IOBase, bytes)): - _content = profile_upgrade_parameters - else: - _json = self._serialize.body(profile_upgrade_parameters, "ProfileUpgradeParameters") - - _request = build_upgrade_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_upgrade( - self, - resource_group_name: str, - profile_name: str, - profile_upgrade_parameters: _models.ProfileUpgradeParameters, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.Profile]: - """Upgrade a profile from Standard_AzureFrontDoor to Premium_AzureFrontDoor. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param profile_upgrade_parameters: Profile upgrade input parameter. Required. - :type profile_upgrade_parameters: ~azure.mgmt.cdn.models.ProfileUpgradeParameters - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either Profile or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.Profile] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_upgrade( - self, - resource_group_name: str, - profile_name: str, - profile_upgrade_parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.Profile]: - """Upgrade a profile from Standard_AzureFrontDoor to Premium_AzureFrontDoor. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param profile_upgrade_parameters: Profile upgrade input parameter. Required. - :type profile_upgrade_parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either Profile or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.Profile] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_upgrade( - self, - resource_group_name: str, - profile_name: str, - profile_upgrade_parameters: Union[_models.ProfileUpgradeParameters, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.Profile]: - """Upgrade a profile from Standard_AzureFrontDoor to Premium_AzureFrontDoor. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param profile_upgrade_parameters: Profile upgrade input parameter. Is either a - ProfileUpgradeParameters type or a IO[bytes] type. Required. - :type profile_upgrade_parameters: ~azure.mgmt.cdn.models.ProfileUpgradeParameters or IO[bytes] - :return: An instance of AsyncLROPoller that returns either Profile or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.Profile] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.Profile] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._upgrade_initial( - resource_group_name=resource_group_name, - profile_name=profile_name, - profile_upgrade_parameters=profile_upgrade_parameters, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("Profile", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.Profile].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.Profile]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_cdn_management_client_operations.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_cdn_management_client_operations.py deleted file mode 100644 index e6785e5628e2..000000000000 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_cdn_management_client_operations.py +++ /dev/null @@ -1,498 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload - -from azure.core import AsyncPipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.utils import ClientMixinABC -from ...operations._cdn_management_client_operations import ( - build_check_endpoint_name_availability_request, - build_check_name_availability_request, - build_check_name_availability_with_subscription_request, - build_validate_probe_request, -) -from .._configuration import CdnManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class _CdnManagementClientOperationsMixin( - ClientMixinABC[AsyncPipelineClient[HttpRequest, AsyncHttpResponse], CdnManagementClientConfiguration] -): - - @overload - async def check_endpoint_name_availability( - self, - resource_group_name: str, - check_endpoint_name_availability_input: _models.CheckEndpointNameAvailabilityInput, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.CheckEndpointNameAvailabilityOutput: - """Check the availability of a resource name. This is needed for resources where name is globally - unique, such as a afdx endpoint. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param check_endpoint_name_availability_input: Input to check. Required. - :type check_endpoint_name_availability_input: - ~azure.mgmt.cdn.models.CheckEndpointNameAvailabilityInput - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: CheckEndpointNameAvailabilityOutput or the result of cls(response) - :rtype: ~azure.mgmt.cdn.models.CheckEndpointNameAvailabilityOutput - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def check_endpoint_name_availability( - self, - resource_group_name: str, - check_endpoint_name_availability_input: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.CheckEndpointNameAvailabilityOutput: - """Check the availability of a resource name. This is needed for resources where name is globally - unique, such as a afdx endpoint. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param check_endpoint_name_availability_input: Input to check. Required. - :type check_endpoint_name_availability_input: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: CheckEndpointNameAvailabilityOutput or the result of cls(response) - :rtype: ~azure.mgmt.cdn.models.CheckEndpointNameAvailabilityOutput - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def check_endpoint_name_availability( - self, - resource_group_name: str, - check_endpoint_name_availability_input: Union[_models.CheckEndpointNameAvailabilityInput, IO[bytes]], - **kwargs: Any - ) -> _models.CheckEndpointNameAvailabilityOutput: - """Check the availability of a resource name. This is needed for resources where name is globally - unique, such as a afdx endpoint. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param check_endpoint_name_availability_input: Input to check. Is either a - CheckEndpointNameAvailabilityInput type or a IO[bytes] type. Required. - :type check_endpoint_name_availability_input: - ~azure.mgmt.cdn.models.CheckEndpointNameAvailabilityInput or IO[bytes] - :return: CheckEndpointNameAvailabilityOutput or the result of cls(response) - :rtype: ~azure.mgmt.cdn.models.CheckEndpointNameAvailabilityOutput - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CheckEndpointNameAvailabilityOutput] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(check_endpoint_name_availability_input, (IOBase, bytes)): - _content = check_endpoint_name_availability_input - else: - _json = self._serialize.body(check_endpoint_name_availability_input, "CheckEndpointNameAvailabilityInput") - - _request = build_check_endpoint_name_availability_request( - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("CheckEndpointNameAvailabilityOutput", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - async def check_name_availability( - self, - check_name_availability_input: _models.CheckNameAvailabilityInput, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.CheckNameAvailabilityOutput: - """Check the availability of a resource name. This is needed for resources where name is globally - unique, such as a CDN endpoint. - - :param check_name_availability_input: Input to check. Required. - :type check_name_availability_input: ~azure.mgmt.cdn.models.CheckNameAvailabilityInput - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: CheckNameAvailabilityOutput or the result of cls(response) - :rtype: ~azure.mgmt.cdn.models.CheckNameAvailabilityOutput - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def check_name_availability( - self, check_name_availability_input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> _models.CheckNameAvailabilityOutput: - """Check the availability of a resource name. This is needed for resources where name is globally - unique, such as a CDN endpoint. - - :param check_name_availability_input: Input to check. Required. - :type check_name_availability_input: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: CheckNameAvailabilityOutput or the result of cls(response) - :rtype: ~azure.mgmt.cdn.models.CheckNameAvailabilityOutput - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def check_name_availability( - self, check_name_availability_input: Union[_models.CheckNameAvailabilityInput, IO[bytes]], **kwargs: Any - ) -> _models.CheckNameAvailabilityOutput: - """Check the availability of a resource name. This is needed for resources where name is globally - unique, such as a CDN endpoint. - - :param check_name_availability_input: Input to check. Is either a CheckNameAvailabilityInput - type or a IO[bytes] type. Required. - :type check_name_availability_input: ~azure.mgmt.cdn.models.CheckNameAvailabilityInput or - IO[bytes] - :return: CheckNameAvailabilityOutput or the result of cls(response) - :rtype: ~azure.mgmt.cdn.models.CheckNameAvailabilityOutput - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CheckNameAvailabilityOutput] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(check_name_availability_input, (IOBase, bytes)): - _content = check_name_availability_input - else: - _json = self._serialize.body(check_name_availability_input, "CheckNameAvailabilityInput") - - _request = build_check_name_availability_request( - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("CheckNameAvailabilityOutput", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - async def check_name_availability_with_subscription( # pylint: disable=name-too-long - self, - check_name_availability_input: _models.CheckNameAvailabilityInput, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.CheckNameAvailabilityOutput: - """Check the availability of a resource name. This is needed for resources where name is globally - unique, such as a CDN endpoint. - - :param check_name_availability_input: Input to check. Required. - :type check_name_availability_input: ~azure.mgmt.cdn.models.CheckNameAvailabilityInput - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: CheckNameAvailabilityOutput or the result of cls(response) - :rtype: ~azure.mgmt.cdn.models.CheckNameAvailabilityOutput - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def check_name_availability_with_subscription( # pylint: disable=name-too-long - self, check_name_availability_input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> _models.CheckNameAvailabilityOutput: - """Check the availability of a resource name. This is needed for resources where name is globally - unique, such as a CDN endpoint. - - :param check_name_availability_input: Input to check. Required. - :type check_name_availability_input: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: CheckNameAvailabilityOutput or the result of cls(response) - :rtype: ~azure.mgmt.cdn.models.CheckNameAvailabilityOutput - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def check_name_availability_with_subscription( # pylint: disable=name-too-long - self, check_name_availability_input: Union[_models.CheckNameAvailabilityInput, IO[bytes]], **kwargs: Any - ) -> _models.CheckNameAvailabilityOutput: - """Check the availability of a resource name. This is needed for resources where name is globally - unique, such as a CDN endpoint. - - :param check_name_availability_input: Input to check. Is either a CheckNameAvailabilityInput - type or a IO[bytes] type. Required. - :type check_name_availability_input: ~azure.mgmt.cdn.models.CheckNameAvailabilityInput or - IO[bytes] - :return: CheckNameAvailabilityOutput or the result of cls(response) - :rtype: ~azure.mgmt.cdn.models.CheckNameAvailabilityOutput - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CheckNameAvailabilityOutput] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(check_name_availability_input, (IOBase, bytes)): - _content = check_name_availability_input - else: - _json = self._serialize.body(check_name_availability_input, "CheckNameAvailabilityInput") - - _request = build_check_name_availability_with_subscription_request( - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("CheckNameAvailabilityOutput", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - async def validate_probe( - self, validate_probe_input: _models.ValidateProbeInput, *, content_type: str = "application/json", **kwargs: Any - ) -> _models.ValidateProbeOutput: - """Check if the probe path is a valid path and the file can be accessed. Probe path is the path to - a file hosted on the origin server to help accelerate the delivery of dynamic content via the - CDN endpoint. This path is relative to the origin path specified in the endpoint configuration. - - :param validate_probe_input: Input to check. Required. - :type validate_probe_input: ~azure.mgmt.cdn.models.ValidateProbeInput - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: ValidateProbeOutput or the result of cls(response) - :rtype: ~azure.mgmt.cdn.models.ValidateProbeOutput - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def validate_probe( - self, validate_probe_input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> _models.ValidateProbeOutput: - """Check if the probe path is a valid path and the file can be accessed. Probe path is the path to - a file hosted on the origin server to help accelerate the delivery of dynamic content via the - CDN endpoint. This path is relative to the origin path specified in the endpoint configuration. - - :param validate_probe_input: Input to check. Required. - :type validate_probe_input: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: ValidateProbeOutput or the result of cls(response) - :rtype: ~azure.mgmt.cdn.models.ValidateProbeOutput - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def validate_probe( - self, validate_probe_input: Union[_models.ValidateProbeInput, IO[bytes]], **kwargs: Any - ) -> _models.ValidateProbeOutput: - """Check if the probe path is a valid path and the file can be accessed. Probe path is the path to - a file hosted on the origin server to help accelerate the delivery of dynamic content via the - CDN endpoint. This path is relative to the origin path specified in the endpoint configuration. - - :param validate_probe_input: Input to check. Is either a ValidateProbeInput type or a IO[bytes] - type. Required. - :type validate_probe_input: ~azure.mgmt.cdn.models.ValidateProbeInput or IO[bytes] - :return: ValidateProbeOutput or the result of cls(response) - :rtype: ~azure.mgmt.cdn.models.ValidateProbeOutput - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ValidateProbeOutput] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(validate_probe_input, (IOBase, bytes)): - _content = validate_probe_input - else: - _json = self._serialize.body(validate_probe_input, "ValidateProbeInput") - - _request = build_validate_probe_request( - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("ValidateProbeOutput", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_custom_domains_operations.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_custom_domains_operations.py deleted file mode 100644 index ba14159eef78..000000000000 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_custom_domains_operations.py +++ /dev/null @@ -1,961 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._custom_domains_operations import ( - build_create_request, - build_delete_request, - build_disable_custom_https_request, - build_enable_custom_https_request, - build_get_request, - build_list_by_endpoint_request, -) -from .._configuration import CdnManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class CustomDomainsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.cdn.aio.CdnManagementClient`'s - :attr:`custom_domains` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: CdnManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_endpoint( - self, resource_group_name: str, profile_name: str, endpoint_name: str, **kwargs: Any - ) -> AsyncItemPaged["_models.CustomDomain"]: - """Lists all of the existing custom domains within an endpoint. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the CDN profile which is unique within the resource group. - Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :return: An iterator like instance of either CustomDomain or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cdn.models.CustomDomain] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.CustomDomainListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_endpoint_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - endpoint_name=endpoint_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("CustomDomainListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get( - self, resource_group_name: str, profile_name: str, endpoint_name: str, custom_domain_name: str, **kwargs: Any - ) -> _models.CustomDomain: - """Gets an existing custom domain within an endpoint. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the CDN profile which is unique within the resource group. - Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :param custom_domain_name: Name of the custom domain within an endpoint. Required. - :type custom_domain_name: str - :return: CustomDomain or the result of cls(response) - :rtype: ~azure.mgmt.cdn.models.CustomDomain - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.CustomDomain] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - endpoint_name=endpoint_name, - custom_domain_name=custom_domain_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("CustomDomain", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - async def _create_initial( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - custom_domain_name: str, - custom_domain_properties: Union[_models.CustomDomainParameters, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(custom_domain_properties, (IOBase, bytes)): - _content = custom_domain_properties - else: - _json = self._serialize.body(custom_domain_properties, "CustomDomainParameters") - - _request = build_create_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - endpoint_name=endpoint_name, - custom_domain_name=custom_domain_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_create( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - custom_domain_name: str, - custom_domain_properties: _models.CustomDomainParameters, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.CustomDomain]: - """Creates a new custom domain within an endpoint. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the CDN profile which is unique within the resource group. - Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :param custom_domain_name: Name of the custom domain within an endpoint. Required. - :type custom_domain_name: str - :param custom_domain_properties: Properties required to create a new custom domain. Required. - :type custom_domain_properties: ~azure.mgmt.cdn.models.CustomDomainParameters - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either CustomDomain or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.CustomDomain] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_create( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - custom_domain_name: str, - custom_domain_properties: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.CustomDomain]: - """Creates a new custom domain within an endpoint. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the CDN profile which is unique within the resource group. - Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :param custom_domain_name: Name of the custom domain within an endpoint. Required. - :type custom_domain_name: str - :param custom_domain_properties: Properties required to create a new custom domain. Required. - :type custom_domain_properties: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either CustomDomain or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.CustomDomain] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_create( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - custom_domain_name: str, - custom_domain_properties: Union[_models.CustomDomainParameters, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.CustomDomain]: - """Creates a new custom domain within an endpoint. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the CDN profile which is unique within the resource group. - Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :param custom_domain_name: Name of the custom domain within an endpoint. Required. - :type custom_domain_name: str - :param custom_domain_properties: Properties required to create a new custom domain. Is either a - CustomDomainParameters type or a IO[bytes] type. Required. - :type custom_domain_properties: ~azure.mgmt.cdn.models.CustomDomainParameters or IO[bytes] - :return: An instance of AsyncLROPoller that returns either CustomDomain or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.CustomDomain] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CustomDomain] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._create_initial( - resource_group_name=resource_group_name, - profile_name=profile_name, - endpoint_name=endpoint_name, - custom_domain_name=custom_domain_name, - custom_domain_properties=custom_domain_properties, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CustomDomain", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.CustomDomain].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.CustomDomain]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _delete_initial( - self, resource_group_name: str, profile_name: str, endpoint_name: str, custom_domain_name: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - endpoint_name=endpoint_name, - custom_domain_name=custom_domain_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_delete( - self, resource_group_name: str, profile_name: str, endpoint_name: str, custom_domain_name: str, **kwargs: Any - ) -> AsyncLROPoller[_models.CustomDomain]: - """Deletes an existing custom domain within an endpoint. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the CDN profile which is unique within the resource group. - Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :param custom_domain_name: Name of the custom domain within an endpoint. Required. - :type custom_domain_name: str - :return: An instance of AsyncLROPoller that returns either CustomDomain or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.CustomDomain] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._delete_initial( - resource_group_name=resource_group_name, - profile_name=profile_name, - endpoint_name=endpoint_name, - custom_domain_name=custom_domain_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - response_headers = {} - response = pipeline_response.http_response - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = self._deserialize("CustomDomain", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.CustomDomain].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.CustomDomain]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _disable_custom_https_initial( - self, resource_group_name: str, profile_name: str, endpoint_name: str, custom_domain_name: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_disable_custom_https_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - endpoint_name=endpoint_name, - custom_domain_name=custom_domain_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_disable_custom_https( - self, resource_group_name: str, profile_name: str, endpoint_name: str, custom_domain_name: str, **kwargs: Any - ) -> AsyncLROPoller[_models.CustomDomain]: - """Disable https delivery of the custom domain. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the CDN profile which is unique within the resource group. - Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :param custom_domain_name: Name of the custom domain within an endpoint. Required. - :type custom_domain_name: str - :return: An instance of AsyncLROPoller that returns either CustomDomain or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.CustomDomain] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.CustomDomain] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._disable_custom_https_initial( - resource_group_name=resource_group_name, - profile_name=profile_name, - endpoint_name=endpoint_name, - custom_domain_name=custom_domain_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CustomDomain", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.CustomDomain].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.CustomDomain]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _enable_custom_https_initial( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - custom_domain_name: str, - custom_domain_https_parameters: Optional[Union[_models.CustomDomainHttpsParameters, IO[bytes]]] = None, - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - content_type = content_type if custom_domain_https_parameters else None - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" if custom_domain_https_parameters else None - _json = None - _content = None - if isinstance(custom_domain_https_parameters, (IOBase, bytes)): - _content = custom_domain_https_parameters - else: - if custom_domain_https_parameters is not None: - _json = self._serialize.body(custom_domain_https_parameters, "CustomDomainHttpsParameters") - else: - _json = None - - _request = build_enable_custom_https_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - endpoint_name=endpoint_name, - custom_domain_name=custom_domain_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_enable_custom_https( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - custom_domain_name: str, - custom_domain_https_parameters: Optional[_models.CustomDomainHttpsParameters] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.CustomDomain]: - """Enable https delivery of the custom domain. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the CDN profile which is unique within the resource group. - Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :param custom_domain_name: Name of the custom domain within an endpoint. Required. - :type custom_domain_name: str - :param custom_domain_https_parameters: The configuration specifying how to enable HTTPS for the - custom domain - using CDN managed certificate or user's own certificate. If not specified, - enabling ssl uses CDN managed certificate by default. Default value is None. - :type custom_domain_https_parameters: ~azure.mgmt.cdn.models.CustomDomainHttpsParameters - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either CustomDomain or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.CustomDomain] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_enable_custom_https( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - custom_domain_name: str, - custom_domain_https_parameters: Optional[IO[bytes]] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.CustomDomain]: - """Enable https delivery of the custom domain. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the CDN profile which is unique within the resource group. - Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :param custom_domain_name: Name of the custom domain within an endpoint. Required. - :type custom_domain_name: str - :param custom_domain_https_parameters: The configuration specifying how to enable HTTPS for the - custom domain - using CDN managed certificate or user's own certificate. If not specified, - enabling ssl uses CDN managed certificate by default. Default value is None. - :type custom_domain_https_parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either CustomDomain or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.CustomDomain] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_enable_custom_https( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - custom_domain_name: str, - custom_domain_https_parameters: Optional[Union[_models.CustomDomainHttpsParameters, IO[bytes]]] = None, - **kwargs: Any - ) -> AsyncLROPoller[_models.CustomDomain]: - """Enable https delivery of the custom domain. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the CDN profile which is unique within the resource group. - Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :param custom_domain_name: Name of the custom domain within an endpoint. Required. - :type custom_domain_name: str - :param custom_domain_https_parameters: The configuration specifying how to enable HTTPS for the - custom domain - using CDN managed certificate or user's own certificate. If not specified, - enabling ssl uses CDN managed certificate by default. Is either a CustomDomainHttpsParameters - type or a IO[bytes] type. Default value is None. - :type custom_domain_https_parameters: ~azure.mgmt.cdn.models.CustomDomainHttpsParameters or - IO[bytes] - :return: An instance of AsyncLROPoller that returns either CustomDomain or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.CustomDomain] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - content_type = content_type if custom_domain_https_parameters else None - cls: ClsType[_models.CustomDomain] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._enable_custom_https_initial( - resource_group_name=resource_group_name, - profile_name=profile_name, - endpoint_name=endpoint_name, - custom_domain_name=custom_domain_name, - custom_domain_https_parameters=custom_domain_https_parameters, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CustomDomain", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.CustomDomain].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.CustomDomain]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_edge_nodes_operations.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_edge_nodes_operations.py deleted file mode 100644 index 6255889900f8..000000000000 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_edge_nodes_operations.py +++ /dev/null @@ -1,133 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from typing import Any, Callable, Optional, TypeVar -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._edge_nodes_operations import build_list_request -from .._configuration import CdnManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class EdgeNodesOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.cdn.aio.CdnManagementClient`'s - :attr:`edge_nodes` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: CdnManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list(self, **kwargs: Any) -> AsyncItemPaged["_models.EdgeNode"]: - """Edgenodes are the global Point of Presence (POP) locations used to deliver CDN content to end - users. - - :return: An iterator like instance of either EdgeNode or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cdn.models.EdgeNode] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.EdgenodeResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_request( - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("EdgenodeResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_endpoints_operations.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_endpoints_operations.py deleted file mode 100644 index 6373f55c9d8c..000000000000 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_endpoints_operations.py +++ /dev/null @@ -1,1717 +0,0 @@ -# pylint: disable=too-many-lines -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._endpoints_operations import ( - build_create_request, - build_delete_request, - build_get_request, - build_list_by_profile_request, - build_list_resource_usage_request, - build_load_content_request, - build_purge_content_request, - build_start_request, - build_stop_request, - build_update_request, - build_validate_custom_domain_request, -) -from .._configuration import CdnManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class EndpointsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.cdn.aio.CdnManagementClient`'s - :attr:`endpoints` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: CdnManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_profile( - self, resource_group_name: str, profile_name: str, **kwargs: Any - ) -> AsyncItemPaged["_models.Endpoint"]: - """Lists existing CDN endpoints. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the CDN profile which is unique within the resource group. - Required. - :type profile_name: str - :return: An iterator like instance of either Endpoint or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cdn.models.Endpoint] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.EndpointListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_profile_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("EndpointListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get( - self, resource_group_name: str, profile_name: str, endpoint_name: str, **kwargs: Any - ) -> _models.Endpoint: - """Gets an existing CDN endpoint with the specified endpoint name under the specified - subscription, resource group and profile. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the CDN profile which is unique within the resource group. - Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :return: Endpoint or the result of cls(response) - :rtype: ~azure.mgmt.cdn.models.Endpoint - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.Endpoint] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - endpoint_name=endpoint_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("Endpoint", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - async def _create_initial( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - endpoint: Union[_models.Endpoint, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(endpoint, (IOBase, bytes)): - _content = endpoint - else: - _json = self._serialize.body(endpoint, "Endpoint") - - _request = build_create_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - endpoint_name=endpoint_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_create( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - endpoint: _models.Endpoint, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.Endpoint]: - """Creates a new CDN endpoint with the specified endpoint name under the specified subscription, - resource group and profile. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the CDN profile which is unique within the resource group. - Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :param endpoint: Endpoint properties. Required. - :type endpoint: ~azure.mgmt.cdn.models.Endpoint - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either Endpoint or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.Endpoint] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_create( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - endpoint: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.Endpoint]: - """Creates a new CDN endpoint with the specified endpoint name under the specified subscription, - resource group and profile. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the CDN profile which is unique within the resource group. - Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :param endpoint: Endpoint properties. Required. - :type endpoint: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either Endpoint or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.Endpoint] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_create( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - endpoint: Union[_models.Endpoint, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.Endpoint]: - """Creates a new CDN endpoint with the specified endpoint name under the specified subscription, - resource group and profile. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the CDN profile which is unique within the resource group. - Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :param endpoint: Endpoint properties. Is either a Endpoint type or a IO[bytes] type. Required. - :type endpoint: ~azure.mgmt.cdn.models.Endpoint or IO[bytes] - :return: An instance of AsyncLROPoller that returns either Endpoint or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.Endpoint] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.Endpoint] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._create_initial( - resource_group_name=resource_group_name, - profile_name=profile_name, - endpoint_name=endpoint_name, - endpoint=endpoint, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("Endpoint", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.Endpoint].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.Endpoint]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _update_initial( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - endpoint_update_properties: Union[_models.EndpointUpdateParameters, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(endpoint_update_properties, (IOBase, bytes)): - _content = endpoint_update_properties - else: - _json = self._serialize.body(endpoint_update_properties, "EndpointUpdateParameters") - - _request = build_update_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - endpoint_name=endpoint_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_update( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - endpoint_update_properties: _models.EndpointUpdateParameters, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.Endpoint]: - """Updates an existing CDN endpoint with the specified endpoint name under the specified - subscription, resource group and profile. Only tags can be updated after creating an endpoint. - To update origins, use the Update Origin operation. To update origin groups, use the Update - Origin group operation. To update custom domains, use the Update Custom Domain operation. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the CDN profile which is unique within the resource group. - Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :param endpoint_update_properties: Endpoint update properties. Required. - :type endpoint_update_properties: ~azure.mgmt.cdn.models.EndpointUpdateParameters - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either Endpoint or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.Endpoint] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_update( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - endpoint_update_properties: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.Endpoint]: - """Updates an existing CDN endpoint with the specified endpoint name under the specified - subscription, resource group and profile. Only tags can be updated after creating an endpoint. - To update origins, use the Update Origin operation. To update origin groups, use the Update - Origin group operation. To update custom domains, use the Update Custom Domain operation. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the CDN profile which is unique within the resource group. - Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :param endpoint_update_properties: Endpoint update properties. Required. - :type endpoint_update_properties: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either Endpoint or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.Endpoint] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_update( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - endpoint_update_properties: Union[_models.EndpointUpdateParameters, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.Endpoint]: - """Updates an existing CDN endpoint with the specified endpoint name under the specified - subscription, resource group and profile. Only tags can be updated after creating an endpoint. - To update origins, use the Update Origin operation. To update origin groups, use the Update - Origin group operation. To update custom domains, use the Update Custom Domain operation. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the CDN profile which is unique within the resource group. - Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :param endpoint_update_properties: Endpoint update properties. Is either a - EndpointUpdateParameters type or a IO[bytes] type. Required. - :type endpoint_update_properties: ~azure.mgmt.cdn.models.EndpointUpdateParameters or IO[bytes] - :return: An instance of AsyncLROPoller that returns either Endpoint or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.Endpoint] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.Endpoint] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._update_initial( - resource_group_name=resource_group_name, - profile_name=profile_name, - endpoint_name=endpoint_name, - endpoint_update_properties=endpoint_update_properties, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("Endpoint", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.Endpoint].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.Endpoint]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _delete_initial( - self, resource_group_name: str, profile_name: str, endpoint_name: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - endpoint_name=endpoint_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_delete( - self, resource_group_name: str, profile_name: str, endpoint_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: - """Deletes an existing CDN endpoint with the specified endpoint name under the specified - subscription, resource group and profile. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the CDN profile which is unique within the resource group. - Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._delete_initial( - resource_group_name=resource_group_name, - profile_name=profile_name, - endpoint_name=endpoint_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - async def _start_initial( - self, resource_group_name: str, profile_name: str, endpoint_name: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_start_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - endpoint_name=endpoint_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_start( - self, resource_group_name: str, profile_name: str, endpoint_name: str, **kwargs: Any - ) -> AsyncLROPoller[_models.Endpoint]: - """Starts an existing CDN endpoint that is on a stopped state. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the CDN profile which is unique within the resource group. - Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :return: An instance of AsyncLROPoller that returns either Endpoint or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.Endpoint] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.Endpoint] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._start_initial( - resource_group_name=resource_group_name, - profile_name=profile_name, - endpoint_name=endpoint_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("Endpoint", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.Endpoint].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.Endpoint]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _stop_initial( - self, resource_group_name: str, profile_name: str, endpoint_name: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_stop_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - endpoint_name=endpoint_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_stop( - self, resource_group_name: str, profile_name: str, endpoint_name: str, **kwargs: Any - ) -> AsyncLROPoller[_models.Endpoint]: - """Stops an existing running CDN endpoint. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the CDN profile which is unique within the resource group. - Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :return: An instance of AsyncLROPoller that returns either Endpoint or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.Endpoint] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.Endpoint] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._stop_initial( - resource_group_name=resource_group_name, - profile_name=profile_name, - endpoint_name=endpoint_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("Endpoint", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.Endpoint].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.Endpoint]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _purge_content_initial( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - content_file_paths: Union[_models.PurgeParameters, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(content_file_paths, (IOBase, bytes)): - _content = content_file_paths - else: - _json = self._serialize.body(content_file_paths, "PurgeParameters") - - _request = build_purge_content_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - endpoint_name=endpoint_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_purge_content( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - content_file_paths: _models.PurgeParameters, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[None]: - """Removes a content from CDN. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the CDN profile which is unique within the resource group. - Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :param content_file_paths: The path to the content to be purged. Path can be a full URL, e.g. - '/pictures/city.png' which removes a single file, or a directory with a wildcard, e.g. - '/pictures/*' which removes all folders and files in the directory. Required. - :type content_file_paths: ~azure.mgmt.cdn.models.PurgeParameters - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_purge_content( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - content_file_paths: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[None]: - """Removes a content from CDN. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the CDN profile which is unique within the resource group. - Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :param content_file_paths: The path to the content to be purged. Path can be a full URL, e.g. - '/pictures/city.png' which removes a single file, or a directory with a wildcard, e.g. - '/pictures/*' which removes all folders and files in the directory. Required. - :type content_file_paths: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_purge_content( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - content_file_paths: Union[_models.PurgeParameters, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[None]: - """Removes a content from CDN. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the CDN profile which is unique within the resource group. - Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :param content_file_paths: The path to the content to be purged. Path can be a full URL, e.g. - '/pictures/city.png' which removes a single file, or a directory with a wildcard, e.g. - '/pictures/*' which removes all folders and files in the directory. Is either a PurgeParameters - type or a IO[bytes] type. Required. - :type content_file_paths: ~azure.mgmt.cdn.models.PurgeParameters or IO[bytes] - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._purge_content_initial( - resource_group_name=resource_group_name, - profile_name=profile_name, - endpoint_name=endpoint_name, - content_file_paths=content_file_paths, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - async def _load_content_initial( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - content_file_paths: Union[_models.LoadParameters, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(content_file_paths, (IOBase, bytes)): - _content = content_file_paths - else: - _json = self._serialize.body(content_file_paths, "LoadParameters") - - _request = build_load_content_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - endpoint_name=endpoint_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_load_content( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - content_file_paths: _models.LoadParameters, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[None]: - """Pre-loads a content to CDN. Available for Verizon Profiles. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the CDN profile which is unique within the resource group. - Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :param content_file_paths: The path to the content to be loaded. Path should be a full URL, - e.g. ‘/pictures/city.png' which loads a single file. Required. - :type content_file_paths: ~azure.mgmt.cdn.models.LoadParameters - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_load_content( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - content_file_paths: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[None]: - """Pre-loads a content to CDN. Available for Verizon Profiles. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the CDN profile which is unique within the resource group. - Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :param content_file_paths: The path to the content to be loaded. Path should be a full URL, - e.g. ‘/pictures/city.png' which loads a single file. Required. - :type content_file_paths: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_load_content( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - content_file_paths: Union[_models.LoadParameters, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[None]: - """Pre-loads a content to CDN. Available for Verizon Profiles. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the CDN profile which is unique within the resource group. - Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :param content_file_paths: The path to the content to be loaded. Path should be a full URL, - e.g. ‘/pictures/city.png' which loads a single file. Is either a LoadParameters type or a - IO[bytes] type. Required. - :type content_file_paths: ~azure.mgmt.cdn.models.LoadParameters or IO[bytes] - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._load_content_initial( - resource_group_name=resource_group_name, - profile_name=profile_name, - endpoint_name=endpoint_name, - content_file_paths=content_file_paths, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - @overload - async def validate_custom_domain( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - custom_domain_properties: _models.ValidateCustomDomainInput, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ValidateCustomDomainOutput: - """Validates the custom domain mapping to ensure it maps to the correct CDN endpoint in DNS. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the CDN profile which is unique within the resource group. - Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :param custom_domain_properties: Custom domain to be validated. Required. - :type custom_domain_properties: ~azure.mgmt.cdn.models.ValidateCustomDomainInput - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: ValidateCustomDomainOutput or the result of cls(response) - :rtype: ~azure.mgmt.cdn.models.ValidateCustomDomainOutput - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def validate_custom_domain( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - custom_domain_properties: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ValidateCustomDomainOutput: - """Validates the custom domain mapping to ensure it maps to the correct CDN endpoint in DNS. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the CDN profile which is unique within the resource group. - Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :param custom_domain_properties: Custom domain to be validated. Required. - :type custom_domain_properties: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: ValidateCustomDomainOutput or the result of cls(response) - :rtype: ~azure.mgmt.cdn.models.ValidateCustomDomainOutput - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def validate_custom_domain( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - custom_domain_properties: Union[_models.ValidateCustomDomainInput, IO[bytes]], - **kwargs: Any - ) -> _models.ValidateCustomDomainOutput: - """Validates the custom domain mapping to ensure it maps to the correct CDN endpoint in DNS. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the CDN profile which is unique within the resource group. - Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :param custom_domain_properties: Custom domain to be validated. Is either a - ValidateCustomDomainInput type or a IO[bytes] type. Required. - :type custom_domain_properties: ~azure.mgmt.cdn.models.ValidateCustomDomainInput or IO[bytes] - :return: ValidateCustomDomainOutput or the result of cls(response) - :rtype: ~azure.mgmt.cdn.models.ValidateCustomDomainOutput - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ValidateCustomDomainOutput] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(custom_domain_properties, (IOBase, bytes)): - _content = custom_domain_properties - else: - _json = self._serialize.body(custom_domain_properties, "ValidateCustomDomainInput") - - _request = build_validate_custom_domain_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - endpoint_name=endpoint_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("ValidateCustomDomainOutput", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def list_resource_usage( - self, resource_group_name: str, profile_name: str, endpoint_name: str, **kwargs: Any - ) -> AsyncItemPaged["_models.ResourceUsage"]: - """Checks the quota and usage of geo filters and custom domains under the given endpoint. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the CDN profile which is unique within the resource group. - Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :return: An iterator like instance of either ResourceUsage or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cdn.models.ResourceUsage] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ResourceUsageListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_resource_usage_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - endpoint_name=endpoint_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("ResourceUsageListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_log_analytics_operations.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_log_analytics_operations.py deleted file mode 100644 index ffaa9f52a5f9..000000000000 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_log_analytics_operations.py +++ /dev/null @@ -1,561 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -import datetime -from typing import Any, Callable, Optional, TypeVar, Union - -from azure.core import AsyncPipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._log_analytics_operations import ( - build_get_log_analytics_locations_request, - build_get_log_analytics_metrics_request, - build_get_log_analytics_rankings_request, - build_get_log_analytics_resources_request, - build_get_waf_log_analytics_metrics_request, - build_get_waf_log_analytics_rankings_request, -) -from .._configuration import CdnManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class LogAnalyticsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.cdn.aio.CdnManagementClient`'s - :attr:`log_analytics` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: CdnManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace_async - async def get_log_analytics_metrics( # pylint: disable=too-many-locals - self, - resource_group_name: str, - profile_name: str, - metrics: List[Union[str, _models.LogMetric]], - date_time_begin: datetime.datetime, - date_time_end: datetime.datetime, - granularity: Union[str, _models.LogMetricsGranularity], - custom_domains: List[str], - protocols: List[str], - group_by: Optional[List[Union[str, _models.LogMetricsGroupBy]]] = None, - continents: Optional[List[str]] = None, - country_or_regions: Optional[List[str]] = None, - **kwargs: Any - ) -> _models.MetricsResponse: - """Get log report for AFD profile. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. which is unique within the resource group. Required. - :type profile_name: str - :param metrics: Required. - :type metrics: list[str or ~azure.mgmt.cdn.models.LogMetric] - :param date_time_begin: Required. - :type date_time_begin: ~datetime.datetime - :param date_time_end: Required. - :type date_time_end: ~datetime.datetime - :param granularity: Known values are: "PT5M", "PT1H", and "P1D". Required. - :type granularity: str or ~azure.mgmt.cdn.models.LogMetricsGranularity - :param custom_domains: Required. - :type custom_domains: list[str] - :param protocols: Required. - :type protocols: list[str] - :param group_by: Default value is None. - :type group_by: list[str or ~azure.mgmt.cdn.models.LogMetricsGroupBy] - :param continents: Default value is None. - :type continents: list[str] - :param country_or_regions: Default value is None. - :type country_or_regions: list[str] - :return: MetricsResponse or the result of cls(response) - :rtype: ~azure.mgmt.cdn.models.MetricsResponse - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.MetricsResponse] = kwargs.pop("cls", None) - - _request = build_get_log_analytics_metrics_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - subscription_id=self._config.subscription_id, - metrics=metrics, - date_time_begin=date_time_begin, - date_time_end=date_time_end, - granularity=granularity, - custom_domains=custom_domains, - protocols=protocols, - group_by=group_by, - continents=continents, - country_or_regions=country_or_regions, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("MetricsResponse", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def get_log_analytics_rankings( - self, - resource_group_name: str, - profile_name: str, - rankings: List[Union[str, _models.LogRanking]], - metrics: List[Union[str, _models.LogRankingMetric]], - max_ranking: int, - date_time_begin: datetime.datetime, - date_time_end: datetime.datetime, - custom_domains: Optional[List[str]] = None, - **kwargs: Any - ) -> _models.RankingsResponse: - """Get log analytics ranking report for AFD profile. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. which is unique within the resource group. Required. - :type profile_name: str - :param rankings: Required. - :type rankings: list[str or ~azure.mgmt.cdn.models.LogRanking] - :param metrics: Required. - :type metrics: list[str or ~azure.mgmt.cdn.models.LogRankingMetric] - :param max_ranking: Required. - :type max_ranking: int - :param date_time_begin: Required. - :type date_time_begin: ~datetime.datetime - :param date_time_end: Required. - :type date_time_end: ~datetime.datetime - :param custom_domains: Default value is None. - :type custom_domains: list[str] - :return: RankingsResponse or the result of cls(response) - :rtype: ~azure.mgmt.cdn.models.RankingsResponse - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.RankingsResponse] = kwargs.pop("cls", None) - - _request = build_get_log_analytics_rankings_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - subscription_id=self._config.subscription_id, - rankings=rankings, - metrics=metrics, - max_ranking=max_ranking, - date_time_begin=date_time_begin, - date_time_end=date_time_end, - custom_domains=custom_domains, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("RankingsResponse", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def get_log_analytics_locations( - self, resource_group_name: str, profile_name: str, **kwargs: Any - ) -> _models.ContinentsResponse: - """Get all available location names for AFD log analytics report. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. which is unique within the resource group. Required. - :type profile_name: str - :return: ContinentsResponse or the result of cls(response) - :rtype: ~azure.mgmt.cdn.models.ContinentsResponse - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ContinentsResponse] = kwargs.pop("cls", None) - - _request = build_get_log_analytics_locations_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("ContinentsResponse", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def get_log_analytics_resources( - self, resource_group_name: str, profile_name: str, **kwargs: Any - ) -> _models.ResourcesResponse: - """Get all endpoints and custom domains available for AFD log report. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. which is unique within the resource group. Required. - :type profile_name: str - :return: ResourcesResponse or the result of cls(response) - :rtype: ~azure.mgmt.cdn.models.ResourcesResponse - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ResourcesResponse] = kwargs.pop("cls", None) - - _request = build_get_log_analytics_resources_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("ResourcesResponse", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def get_waf_log_analytics_metrics( - self, - resource_group_name: str, - profile_name: str, - metrics: List[Union[str, _models.WafMetric]], - date_time_begin: datetime.datetime, - date_time_end: datetime.datetime, - granularity: Union[str, _models.WafGranularity], - actions: Optional[List[Union[str, _models.WafAction]]] = None, - group_by: Optional[List[Union[str, _models.WafRankingGroupBy]]] = None, - rule_types: Optional[List[Union[str, _models.WafRuleType]]] = None, - **kwargs: Any - ) -> _models.WafMetricsResponse: - """Get Waf related log analytics report for AFD profile. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. which is unique within the resource group. Required. - :type profile_name: str - :param metrics: Required. - :type metrics: list[str or ~azure.mgmt.cdn.models.WafMetric] - :param date_time_begin: Required. - :type date_time_begin: ~datetime.datetime - :param date_time_end: Required. - :type date_time_end: ~datetime.datetime - :param granularity: Known values are: "PT5M", "PT1H", and "P1D". Required. - :type granularity: str or ~azure.mgmt.cdn.models.WafGranularity - :param actions: Default value is None. - :type actions: list[str or ~azure.mgmt.cdn.models.WafAction] - :param group_by: Default value is None. - :type group_by: list[str or ~azure.mgmt.cdn.models.WafRankingGroupBy] - :param rule_types: Default value is None. - :type rule_types: list[str or ~azure.mgmt.cdn.models.WafRuleType] - :return: WafMetricsResponse or the result of cls(response) - :rtype: ~azure.mgmt.cdn.models.WafMetricsResponse - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.WafMetricsResponse] = kwargs.pop("cls", None) - - _request = build_get_waf_log_analytics_metrics_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - subscription_id=self._config.subscription_id, - metrics=metrics, - date_time_begin=date_time_begin, - date_time_end=date_time_end, - granularity=granularity, - actions=actions, - group_by=group_by, - rule_types=rule_types, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("WafMetricsResponse", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def get_waf_log_analytics_rankings( - self, - resource_group_name: str, - profile_name: str, - metrics: List[Union[str, _models.WafMetric]], - date_time_begin: datetime.datetime, - date_time_end: datetime.datetime, - max_ranking: int, - rankings: List[Union[str, _models.WafRankingType]], - actions: Optional[List[Union[str, _models.WafAction]]] = None, - rule_types: Optional[List[Union[str, _models.WafRuleType]]] = None, - **kwargs: Any - ) -> _models.WafRankingsResponse: - """Get WAF log analytics charts for AFD profile. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. which is unique within the resource group. Required. - :type profile_name: str - :param metrics: Required. - :type metrics: list[str or ~azure.mgmt.cdn.models.WafMetric] - :param date_time_begin: Required. - :type date_time_begin: ~datetime.datetime - :param date_time_end: Required. - :type date_time_end: ~datetime.datetime - :param max_ranking: Required. - :type max_ranking: int - :param rankings: Required. - :type rankings: list[str or ~azure.mgmt.cdn.models.WafRankingType] - :param actions: Default value is None. - :type actions: list[str or ~azure.mgmt.cdn.models.WafAction] - :param rule_types: Default value is None. - :type rule_types: list[str or ~azure.mgmt.cdn.models.WafRuleType] - :return: WafRankingsResponse or the result of cls(response) - :rtype: ~azure.mgmt.cdn.models.WafRankingsResponse - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.WafRankingsResponse] = kwargs.pop("cls", None) - - _request = build_get_waf_log_analytics_rankings_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - subscription_id=self._config.subscription_id, - metrics=metrics, - date_time_begin=date_time_begin, - date_time_end=date_time_end, - max_ranking=max_ranking, - rankings=rankings, - actions=actions, - rule_types=rule_types, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("WafRankingsResponse", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_managed_rule_sets_operations.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_managed_rule_sets_operations.py deleted file mode 100644 index 3845558fea88..000000000000 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_managed_rule_sets_operations.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from typing import Any, Callable, Optional, TypeVar -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._managed_rule_sets_operations import build_list_request -from .._configuration import CdnManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class ManagedRuleSetsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.cdn.aio.CdnManagementClient`'s - :attr:`managed_rule_sets` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: CdnManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list(self, **kwargs: Any) -> AsyncItemPaged["_models.ManagedRuleSetDefinition"]: - """Lists all available managed rule sets. - - :return: An iterator like instance of either ManagedRuleSetDefinition or the result of - cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cdn.models.ManagedRuleSetDefinition] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ManagedRuleSetDefinitionList] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_request( - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("ManagedRuleSetDefinitionList", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_operations.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_operations.py index 5ec16bc445b6..502997f8b6e8 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_operations.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_operations.py @@ -1,12 +1,16 @@ +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from collections.abc import MutableMapping -from typing import Any, Callable, Optional, TypeVar +import datetime +from io import IOBase +import json +from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core import AsyncPipelineClient @@ -17,21 +21,145 @@ ResourceExistsError, ResourceNotFoundError, ResourceNotModifiedError, + StreamClosedError, + StreamConsumedError, map_error, ) from azure.core.pipeline import PipelineResponse +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod from azure.core.rest import AsyncHttpResponse, HttpRequest from azure.core.tracing.decorator import distributed_trace +from azure.core.tracing.decorator_async import distributed_trace_async from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models +from ..._utils.model_base import SdkJSONEncoder, _deserialize, _failsafe_deserialize from ..._utils.serialization import Deserializer, Serializer -from ...operations._operations import build_list_request -from .._configuration import CdnManagementClientConfiguration +from ..._utils.utils import ClientMixinABC +from ...operations._operations import ( + build_afd_custom_domains_create_request, + build_afd_custom_domains_delete_request, + build_afd_custom_domains_get_request, + build_afd_custom_domains_list_by_profile_request, + build_afd_custom_domains_refresh_validation_token_request, + build_afd_custom_domains_update_request, + build_afd_endpoints_create_request, + build_afd_endpoints_delete_request, + build_afd_endpoints_get_request, + build_afd_endpoints_list_by_profile_request, + build_afd_endpoints_list_resource_usage_request, + build_afd_endpoints_purge_content_request, + build_afd_endpoints_update_request, + build_afd_endpoints_validate_custom_domain_request, + build_afd_origin_groups_create_request, + build_afd_origin_groups_delete_request, + build_afd_origin_groups_get_request, + build_afd_origin_groups_list_by_profile_request, + build_afd_origin_groups_list_resource_usage_request, + build_afd_origin_groups_update_request, + build_afd_origins_create_request, + build_afd_origins_delete_request, + build_afd_origins_get_request, + build_afd_origins_list_by_origin_group_request, + build_afd_origins_update_request, + build_afd_profiles_check_endpoint_name_availability_request, + build_afd_profiles_check_host_name_availability_request, + build_afd_profiles_list_resource_usage_request, + build_afd_profiles_upgrade_request, + build_afd_profiles_validate_secret_request, + build_cdn_check_endpoint_name_availability_request, + build_cdn_check_name_availability_request, + build_cdn_check_name_availability_with_subscription_request, + build_cdn_validate_probe_request, + build_custom_domains_create_request, + build_custom_domains_delete_request, + build_custom_domains_disable_custom_https_request, + build_custom_domains_enable_custom_https_request, + build_custom_domains_get_request, + build_custom_domains_list_by_endpoint_request, + build_edge_nodes_list_request, + build_endpoints_create_request, + build_endpoints_delete_request, + build_endpoints_get_request, + build_endpoints_list_by_profile_request, + build_endpoints_list_resource_usage_request, + build_endpoints_load_content_request, + build_endpoints_purge_content_request, + build_endpoints_start_request, + build_endpoints_stop_request, + build_endpoints_update_request, + build_endpoints_validate_custom_domain_request, + build_log_analytics_get_log_analytics_locations_request, + build_log_analytics_get_log_analytics_metrics_request, + build_log_analytics_get_log_analytics_rankings_request, + build_log_analytics_get_log_analytics_resources_request, + build_log_analytics_get_waf_log_analytics_metrics_request, + build_log_analytics_get_waf_log_analytics_rankings_request, + build_managed_rule_sets_list_request, + build_operations_list_request, + build_origin_groups_create_request, + build_origin_groups_delete_request, + build_origin_groups_get_request, + build_origin_groups_list_by_endpoint_request, + build_origin_groups_update_request, + build_origins_create_request, + build_origins_delete_request, + build_origins_get_request, + build_origins_list_by_endpoint_request, + build_origins_update_request, + build_policies_create_or_update_request, + build_policies_delete_request, + build_policies_get_request, + build_policies_list_request, + build_policies_update_request, + build_profiles_can_migrate_request, + build_profiles_cdn_can_migrate_to_afd_request, + build_profiles_cdn_migrate_to_afd_request, + build_profiles_create_request, + build_profiles_delete_request, + build_profiles_generate_sso_uri_request, + build_profiles_get_request, + build_profiles_list_by_resource_group_request, + build_profiles_list_request, + build_profiles_list_resource_usage_request, + build_profiles_list_supported_optimization_types_request, + build_profiles_migrate_request, + build_profiles_migration_abort_request, + build_profiles_migration_commit_request, + build_profiles_update_request, + build_resource_usage_list_request, + build_routes_create_request, + build_routes_delete_request, + build_routes_get_request, + build_routes_list_by_endpoint_request, + build_routes_update_request, + build_rule_sets_create_request, + build_rule_sets_delete_request, + build_rule_sets_get_request, + build_rule_sets_list_by_profile_request, + build_rule_sets_list_resource_usage_request, + build_rules_create_request, + build_rules_delete_request, + build_rules_get_request, + build_rules_list_by_rule_set_request, + build_rules_update_request, + build_secrets_create_request, + build_secrets_delete_request, + build_secrets_get_request, + build_secrets_list_by_profile_request, + build_security_policies_create_request, + build_security_policies_delete_request, + build_security_policies_get_request, + build_security_policies_list_by_profile_request, + build_security_policies_patch_request, +) +from .._configuration import CdnClientConfiguration T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +JSON = MutableMapping[str, Any] List = list @@ -41,32 +169,822 @@ class Operations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~azure.mgmt.cdn.aio.CdnManagementClient`'s + :class:`~azure.mgmt.cdn.aio.CdnClient`'s :attr:`operations` attribute. """ - models = _models - def __init__(self, *args, **kwargs) -> None: input_args = list(args) self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: CdnManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._config: CdnClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list(self, **kwargs: Any) -> AsyncItemPaged["_models.Operation"]: - """Lists all of the available CDN REST API operations. + """List the operations for the provider. - :return: An iterator like instance of either Operation or the result of cls(response) + :return: An iterator like instance of Operation :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cdn.models.Operation] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.Operation]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_operations_list_request( + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.Operation], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class ProfilesOperations: # pylint: disable=too-many-public-methods + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.cdn.aio.CdnClient`'s + :attr:`profiles` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CdnClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get(self, resource_group_name: str, profile_name: str, **kwargs: Any) -> _models.Profile: + """Gets an Azure Front Door Standard or Azure Front Door Premium or CDN profile with the specified + profile name under the specified subscription and resource group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :return: Profile. The Profile is compatible with MutableMapping + :rtype: ~azure.mgmt.cdn.models.Profile + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.Profile] = kwargs.pop("cls", None) + + _request = build_profiles_get_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.Profile, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + async def _create_initial( + self, + resource_group_name: str, + profile_name: str, + profile: Union[_models.Profile, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(profile, (IOBase, bytes)): + _content = profile + else: + _content = json.dumps(profile, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_profiles_create_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 201: + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_create( + self, + resource_group_name: str, + profile_name: str, + profile: _models.Profile, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.Profile]: + """Creates a new Azure Front Door Standard or Azure Front Door Premium or CDN profile with a + profile name under the specified subscription and resource group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param profile: Profile properties needed to create a new profile. Required. + :type profile: ~azure.mgmt.cdn.models.Profile + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns Profile. The Profile is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.Profile] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create( + self, + resource_group_name: str, + profile_name: str, + profile: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.Profile]: + """Creates a new Azure Front Door Standard or Azure Front Door Premium or CDN profile with a + profile name under the specified subscription and resource group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param profile: Profile properties needed to create a new profile. Required. + :type profile: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns Profile. The Profile is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.Profile] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create( + self, + resource_group_name: str, + profile_name: str, + profile: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.Profile]: + """Creates a new Azure Front Door Standard or Azure Front Door Premium or CDN profile with a + profile name under the specified subscription and resource group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param profile: Profile properties needed to create a new profile. Required. + :type profile: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns Profile. The Profile is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.Profile] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_create( + self, + resource_group_name: str, + profile_name: str, + profile: Union[_models.Profile, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.Profile]: + """Creates a new Azure Front Door Standard or Azure Front Door Premium or CDN profile with a + profile name under the specified subscription and resource group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param profile: Profile properties needed to create a new profile. Is one of the following + types: Profile, JSON, IO[bytes] Required. + :type profile: ~azure.mgmt.cdn.models.Profile or JSON or IO[bytes] + :return: An instance of AsyncLROPoller that returns Profile. The Profile is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.Profile] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.Profile] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._create_initial( + resource_group_name=resource_group_name, + profile_name=profile_name, + profile=profile, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.Profile, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.Profile].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.Profile]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _update_initial( + self, + resource_group_name: str, + profile_name: str, + profile_update_parameters: Union[_models.ProfileUpdateParameters, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(profile_update_parameters, (IOBase, bytes)): + _content = profile_update_parameters + else: + _content = json.dumps(profile_update_parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_profiles_update_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_update( + self, + resource_group_name: str, + profile_name: str, + profile_update_parameters: _models.ProfileUpdateParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.Profile]: + """Updates an existing Azure Front Door Standard or Azure Front Door Premium or CDN profile with + the specified profile name under the specified subscription and resource group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param profile_update_parameters: Profile properties needed to update an existing profile. + Required. + :type profile_update_parameters: ~azure.mgmt.cdn.models.ProfileUpdateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns Profile. The Profile is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.Profile] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update( + self, + resource_group_name: str, + profile_name: str, + profile_update_parameters: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.Profile]: + """Updates an existing Azure Front Door Standard or Azure Front Door Premium or CDN profile with + the specified profile name under the specified subscription and resource group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param profile_update_parameters: Profile properties needed to update an existing profile. + Required. + :type profile_update_parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns Profile. The Profile is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.Profile] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update( + self, + resource_group_name: str, + profile_name: str, + profile_update_parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.Profile]: + """Updates an existing Azure Front Door Standard or Azure Front Door Premium or CDN profile with + the specified profile name under the specified subscription and resource group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param profile_update_parameters: Profile properties needed to update an existing profile. + Required. + :type profile_update_parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns Profile. The Profile is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.Profile] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_update( + self, + resource_group_name: str, + profile_name: str, + profile_update_parameters: Union[_models.ProfileUpdateParameters, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.Profile]: + """Updates an existing Azure Front Door Standard or Azure Front Door Premium or CDN profile with + the specified profile name under the specified subscription and resource group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param profile_update_parameters: Profile properties needed to update an existing profile. Is + one of the following types: ProfileUpdateParameters, JSON, IO[bytes] Required. + :type profile_update_parameters: ~azure.mgmt.cdn.models.ProfileUpdateParameters or JSON or + IO[bytes] + :return: An instance of AsyncLROPoller that returns Profile. The Profile is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.Profile] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.Profile] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._update_initial( + resource_group_name=resource_group_name, + profile_name=profile_name, + profile_update_parameters=profile_update_parameters, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.Profile, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.Profile].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.Profile]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _delete_initial(self, resource_group_name: str, profile_name: str, **kwargs: Any) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_profiles_delete_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_delete(self, resource_group_name: str, profile_name: str, **kwargs: Any) -> AsyncLROPoller[None]: + """Deletes an existing Azure Front Door Standard or Azure Front Door Premium or CDN profile with + the specified parameters. Deleting a profile will result in the deletion of all of the + sub-resources including endpoints, origins and custom domains. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + profile_name=profile_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> AsyncItemPaged["_models.Profile"]: + """Lists all of the Azure Front Door Standard, Azure Front Door Premium, and CDN profiles within a + resource group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: An iterator like instance of Profile + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cdn.models.Profile] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.OperationsListResult] = kwargs.pop("cls", None) + cls: ClsType[List[_models.Profile]] = kwargs.pop("cls", None) error_map: MutableMapping = { 401: ClientAuthenticationError, @@ -79,12 +997,19 @@ def list(self, **kwargs: Any) -> AsyncItemPaged["_models.Operation"]: def prepare_request(next_link=None): if not next_link: - _request = build_list_request( - api_version=api_version, + _request = build_profiles_list_by_resource_group_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, headers=_headers, params=_params, ) - _request.url = self._client.format_url(_request.url) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) else: # make call to next link with the client's api-version @@ -97,18 +1022,29 @@ def prepare_request(next_link=None): ) _next_request_params["api-version"] = self._config.api_version _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + return _request async def extract_data(pipeline_response): - deserialized = self._deserialize("OperationsListResult", pipeline_response) - list_of_elem = deserialized.value + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.Profile], + deserialized.get("value", []), + ) if cls: list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) async def get_next(next_link=None): _request = prepare_request(next_link) @@ -121,12 +1057,17293 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( + error = _failsafe_deserialize( _models.ErrorResponse, - pipeline_response, + response, ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return AsyncItemPaged(get_next, extract_data) + + @distributed_trace + def list(self, **kwargs: Any) -> AsyncItemPaged["_models.Profile"]: + """Lists all of the Azure Front Door Standard, Azure Front Door Premium, and CDN profiles within + an Azure subscription. + + :return: An iterator like instance of Profile + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cdn.models.Profile] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.Profile]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_profiles_list_request( + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.Profile], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + async def _migration_commit_initial( + self, resource_group_name: str, profile_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_profiles_migration_commit_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_migration_commit( + self, resource_group_name: str, profile_name: str, **kwargs: Any + ) -> AsyncLROPoller[None]: + """Commit the migrated Azure Frontdoor(Standard/Premium) profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._migration_commit_initial( + resource_group_name=resource_group_name, + profile_name=profile_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace_async + async def generate_sso_uri(self, resource_group_name: str, profile_name: str, **kwargs: Any) -> _models.SsoUri: + """Generates a dynamic SSO URI used to sign in to the CDN supplemental portal. Supplemental portal + is used to configure advanced feature capabilities that are not yet available in the Azure + portal, such as core reports in a standard profile; rules engine, advanced HTTP reports, and + real-time stats and alerts in a premium profile. The SSO URI changes approximately every 10 + minutes. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :return: SsoUri. The SsoUri is compatible with MutableMapping + :rtype: ~azure.mgmt.cdn.models.SsoUri + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.SsoUri] = kwargs.pop("cls", None) + + _request = build_profiles_generate_sso_uri_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.SsoUri, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def list_supported_optimization_types( + self, resource_group_name: str, profile_name: str, **kwargs: Any + ) -> _models.SupportedOptimizationTypesListResult: + """Gets the supported optimization types for the current profile. A user can create an endpoint + with an optimization type from the listed values. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :return: SupportedOptimizationTypesListResult. The SupportedOptimizationTypesListResult is + compatible with MutableMapping + :rtype: ~azure.mgmt.cdn.models.SupportedOptimizationTypesListResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.SupportedOptimizationTypesListResult] = kwargs.pop("cls", None) + + _request = build_profiles_list_supported_optimization_types_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.SupportedOptimizationTypesListResult, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def list_resource_usage( + self, resource_group_name: str, profile_name: str, **kwargs: Any + ) -> AsyncItemPaged["_models.ResourceUsage"]: + """Checks the quota and actual usage of endpoints under the given Azure Front Door Standard or + Azure Front Door Premium or CDN profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :return: An iterator like instance of ResourceUsage + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cdn.models.ResourceUsage] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.ResourceUsage]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_profiles_list_resource_usage_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.ResourceUsage], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + async def _cdn_can_migrate_to_afd_initial( + self, resource_group_name: str, profile_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_profiles_cdn_can_migrate_to_afd_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_cdn_can_migrate_to_afd( + self, resource_group_name: str, profile_name: str, **kwargs: Any + ) -> AsyncLROPoller[_models.CanMigrateResult]: + """Checks if CDN profile can be migrated to Azure Frontdoor(Standard/Premium) profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :return: An instance of AsyncLROPoller that returns CanMigrateResult. The CanMigrateResult is + compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.CanMigrateResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.CanMigrateResult] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._cdn_can_migrate_to_afd_initial( + resource_group_name=resource_group_name, + profile_name=profile_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.CanMigrateResult, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.CanMigrateResult].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.CanMigrateResult]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _cdn_migrate_to_afd_initial( + self, + resource_group_name: str, + profile_name: str, + migration_parameters: Union[_models.CdnMigrationToAfdParameters, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(migration_parameters, (IOBase, bytes)): + _content = migration_parameters + else: + _content = json.dumps(migration_parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_profiles_cdn_migrate_to_afd_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_cdn_migrate_to_afd( + self, + resource_group_name: str, + profile_name: str, + migration_parameters: _models.CdnMigrationToAfdParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.MigrateResult]: + """Migrate the CDN profile to Azure Frontdoor(Standard/Premium) profile. This step prepares the + profile for migration and will be followed by Commit to finalize the migration. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param migration_parameters: Properties needed to migrate the profile. Required. + :type migration_parameters: ~azure.mgmt.cdn.models.CdnMigrationToAfdParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns MigrateResult. The MigrateResult is + compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.MigrateResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_cdn_migrate_to_afd( + self, + resource_group_name: str, + profile_name: str, + migration_parameters: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.MigrateResult]: + """Migrate the CDN profile to Azure Frontdoor(Standard/Premium) profile. This step prepares the + profile for migration and will be followed by Commit to finalize the migration. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param migration_parameters: Properties needed to migrate the profile. Required. + :type migration_parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns MigrateResult. The MigrateResult is + compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.MigrateResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_cdn_migrate_to_afd( + self, + resource_group_name: str, + profile_name: str, + migration_parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.MigrateResult]: + """Migrate the CDN profile to Azure Frontdoor(Standard/Premium) profile. This step prepares the + profile for migration and will be followed by Commit to finalize the migration. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param migration_parameters: Properties needed to migrate the profile. Required. + :type migration_parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns MigrateResult. The MigrateResult is + compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.MigrateResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_cdn_migrate_to_afd( + self, + resource_group_name: str, + profile_name: str, + migration_parameters: Union[_models.CdnMigrationToAfdParameters, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.MigrateResult]: + """Migrate the CDN profile to Azure Frontdoor(Standard/Premium) profile. This step prepares the + profile for migration and will be followed by Commit to finalize the migration. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param migration_parameters: Properties needed to migrate the profile. Is one of the following + types: CdnMigrationToAfdParameters, JSON, IO[bytes] Required. + :type migration_parameters: ~azure.mgmt.cdn.models.CdnMigrationToAfdParameters or JSON or + IO[bytes] + :return: An instance of AsyncLROPoller that returns MigrateResult. The MigrateResult is + compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.MigrateResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.MigrateResult] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._cdn_migrate_to_afd_initial( + resource_group_name=resource_group_name, + profile_name=profile_name, + migration_parameters=migration_parameters, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.MigrateResult, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.MigrateResult].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.MigrateResult]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _migration_abort_initial( + self, resource_group_name: str, profile_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_profiles_migration_abort_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_migration_abort( + self, resource_group_name: str, profile_name: str, **kwargs: Any + ) -> AsyncLROPoller[None]: + """Abort the migration to Azure Frontdoor Premium/Standard. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._migration_abort_initial( + resource_group_name=resource_group_name, + profile_name=profile_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + async def _can_migrate_initial( + self, + resource_group_name: str, + can_migrate_parameters: Union[_models.CanMigrateParameters, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(can_migrate_parameters, (IOBase, bytes)): + _content = can_migrate_parameters + else: + _content = json.dumps(can_migrate_parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_profiles_can_migrate_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_can_migrate( + self, + resource_group_name: str, + can_migrate_parameters: _models.CanMigrateParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.CanMigrateResult]: + """Checks if CDN profile can be migrated to Azure Frontdoor(Standard/Premium) profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param can_migrate_parameters: Properties needed to check if cdn profile or classic frontdoor + can be migrated. Required. + :type can_migrate_parameters: ~azure.mgmt.cdn.models.CanMigrateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns CanMigrateResult. The CanMigrateResult is + compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.CanMigrateResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_can_migrate( + self, + resource_group_name: str, + can_migrate_parameters: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.CanMigrateResult]: + """Checks if CDN profile can be migrated to Azure Frontdoor(Standard/Premium) profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param can_migrate_parameters: Properties needed to check if cdn profile or classic frontdoor + can be migrated. Required. + :type can_migrate_parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns CanMigrateResult. The CanMigrateResult is + compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.CanMigrateResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_can_migrate( + self, + resource_group_name: str, + can_migrate_parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.CanMigrateResult]: + """Checks if CDN profile can be migrated to Azure Frontdoor(Standard/Premium) profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param can_migrate_parameters: Properties needed to check if cdn profile or classic frontdoor + can be migrated. Required. + :type can_migrate_parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns CanMigrateResult. The CanMigrateResult is + compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.CanMigrateResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_can_migrate( + self, + resource_group_name: str, + can_migrate_parameters: Union[_models.CanMigrateParameters, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.CanMigrateResult]: + """Checks if CDN profile can be migrated to Azure Frontdoor(Standard/Premium) profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param can_migrate_parameters: Properties needed to check if cdn profile or classic frontdoor + can be migrated. Is one of the following types: CanMigrateParameters, JSON, IO[bytes] Required. + :type can_migrate_parameters: ~azure.mgmt.cdn.models.CanMigrateParameters or JSON or IO[bytes] + :return: An instance of AsyncLROPoller that returns CanMigrateResult. The CanMigrateResult is + compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.CanMigrateResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.CanMigrateResult] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._can_migrate_initial( + resource_group_name=resource_group_name, + can_migrate_parameters=can_migrate_parameters, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.CanMigrateResult, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.CanMigrateResult].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.CanMigrateResult]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _migrate_initial( + self, + resource_group_name: str, + migration_parameters: Union[_models.MigrationParameters, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(migration_parameters, (IOBase, bytes)): + _content = migration_parameters + else: + _content = json.dumps(migration_parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_profiles_migrate_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_migrate( + self, + resource_group_name: str, + migration_parameters: _models.MigrationParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.MigrateResult]: + """Migrate the CDN profile to Azure Frontdoor(Standard/Premium) profile. The change need to be + committed after this. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param migration_parameters: Properties needed to migrate the profile. Required. + :type migration_parameters: ~azure.mgmt.cdn.models.MigrationParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns MigrateResult. The MigrateResult is + compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.MigrateResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_migrate( + self, + resource_group_name: str, + migration_parameters: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.MigrateResult]: + """Migrate the CDN profile to Azure Frontdoor(Standard/Premium) profile. The change need to be + committed after this. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param migration_parameters: Properties needed to migrate the profile. Required. + :type migration_parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns MigrateResult. The MigrateResult is + compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.MigrateResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_migrate( + self, + resource_group_name: str, + migration_parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.MigrateResult]: + """Migrate the CDN profile to Azure Frontdoor(Standard/Premium) profile. The change need to be + committed after this. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param migration_parameters: Properties needed to migrate the profile. Required. + :type migration_parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns MigrateResult. The MigrateResult is + compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.MigrateResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_migrate( + self, + resource_group_name: str, + migration_parameters: Union[_models.MigrationParameters, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.MigrateResult]: + """Migrate the CDN profile to Azure Frontdoor(Standard/Premium) profile. The change need to be + committed after this. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param migration_parameters: Properties needed to migrate the profile. Is one of the following + types: MigrationParameters, JSON, IO[bytes] Required. + :type migration_parameters: ~azure.mgmt.cdn.models.MigrationParameters or JSON or IO[bytes] + :return: An instance of AsyncLROPoller that returns MigrateResult. The MigrateResult is + compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.MigrateResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.MigrateResult] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._migrate_initial( + resource_group_name=resource_group_name, + migration_parameters=migration_parameters, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.MigrateResult, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.MigrateResult].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.MigrateResult]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + +class AFDEndpointsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.cdn.aio.CdnClient`'s + :attr:`afd_endpoints` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CdnClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, resource_group_name: str, profile_name: str, endpoint_name: str, **kwargs: Any + ) -> _models.AFDEndpoint: + """Gets an existing AzureFrontDoor endpoint with the specified endpoint name under the specified + subscription, resource group and profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :return: AFDEndpoint. The AFDEndpoint is compatible with MutableMapping + :rtype: ~azure.mgmt.cdn.models.AFDEndpoint + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.AFDEndpoint] = kwargs.pop("cls", None) + + _request = build_afd_endpoints_get_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.AFDEndpoint, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + async def _create_initial( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + endpoint: Union[_models.AFDEndpoint, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(endpoint, (IOBase, bytes)): + _content = endpoint + else: + _content = json.dumps(endpoint, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_afd_endpoints_create_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 201: + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_create( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + endpoint: _models.AFDEndpoint, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.AFDEndpoint]: + """Creates a new AzureFrontDoor endpoint with the specified endpoint name under the specified + subscription, resource group and profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param endpoint: Endpoint properties. Required. + :type endpoint: ~azure.mgmt.cdn.models.AFDEndpoint + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns AFDEndpoint. The AFDEndpoint is compatible + with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.AFDEndpoint] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + endpoint: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.AFDEndpoint]: + """Creates a new AzureFrontDoor endpoint with the specified endpoint name under the specified + subscription, resource group and profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param endpoint: Endpoint properties. Required. + :type endpoint: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns AFDEndpoint. The AFDEndpoint is compatible + with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.AFDEndpoint] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + endpoint: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.AFDEndpoint]: + """Creates a new AzureFrontDoor endpoint with the specified endpoint name under the specified + subscription, resource group and profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param endpoint: Endpoint properties. Required. + :type endpoint: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns AFDEndpoint. The AFDEndpoint is compatible + with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.AFDEndpoint] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_create( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + endpoint: Union[_models.AFDEndpoint, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.AFDEndpoint]: + """Creates a new AzureFrontDoor endpoint with the specified endpoint name under the specified + subscription, resource group and profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param endpoint: Endpoint properties. Is one of the following types: AFDEndpoint, JSON, + IO[bytes] Required. + :type endpoint: ~azure.mgmt.cdn.models.AFDEndpoint or JSON or IO[bytes] + :return: An instance of AsyncLROPoller that returns AFDEndpoint. The AFDEndpoint is compatible + with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.AFDEndpoint] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.AFDEndpoint] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._create_initial( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + endpoint=endpoint, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.AFDEndpoint, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.AFDEndpoint].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.AFDEndpoint]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _update_initial( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + endpoint_update_properties: Union[_models.AFDEndpointUpdateParameters, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(endpoint_update_properties, (IOBase, bytes)): + _content = endpoint_update_properties + else: + _content = json.dumps(endpoint_update_properties, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_afd_endpoints_update_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_update( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + endpoint_update_properties: _models.AFDEndpointUpdateParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.AFDEndpoint]: + """Updates an existing AzureFrontDoor endpoint with the specified endpoint name under the + specified subscription, resource group and profile. Only tags can be updated after creating an + endpoint. To update origins, use the Update Origin operation. To update origin groups, use the + Update Origin group operation. To update domains, use the Update Custom Domain operation. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param endpoint_update_properties: Endpoint update properties. Required. + :type endpoint_update_properties: ~azure.mgmt.cdn.models.AFDEndpointUpdateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns AFDEndpoint. The AFDEndpoint is compatible + with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.AFDEndpoint] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + endpoint_update_properties: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.AFDEndpoint]: + """Updates an existing AzureFrontDoor endpoint with the specified endpoint name under the + specified subscription, resource group and profile. Only tags can be updated after creating an + endpoint. To update origins, use the Update Origin operation. To update origin groups, use the + Update Origin group operation. To update domains, use the Update Custom Domain operation. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param endpoint_update_properties: Endpoint update properties. Required. + :type endpoint_update_properties: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns AFDEndpoint. The AFDEndpoint is compatible + with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.AFDEndpoint] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + endpoint_update_properties: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.AFDEndpoint]: + """Updates an existing AzureFrontDoor endpoint with the specified endpoint name under the + specified subscription, resource group and profile. Only tags can be updated after creating an + endpoint. To update origins, use the Update Origin operation. To update origin groups, use the + Update Origin group operation. To update domains, use the Update Custom Domain operation. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param endpoint_update_properties: Endpoint update properties. Required. + :type endpoint_update_properties: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns AFDEndpoint. The AFDEndpoint is compatible + with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.AFDEndpoint] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_update( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + endpoint_update_properties: Union[_models.AFDEndpointUpdateParameters, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.AFDEndpoint]: + """Updates an existing AzureFrontDoor endpoint with the specified endpoint name under the + specified subscription, resource group and profile. Only tags can be updated after creating an + endpoint. To update origins, use the Update Origin operation. To update origin groups, use the + Update Origin group operation. To update domains, use the Update Custom Domain operation. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param endpoint_update_properties: Endpoint update properties. Is one of the following types: + AFDEndpointUpdateParameters, JSON, IO[bytes] Required. + :type endpoint_update_properties: ~azure.mgmt.cdn.models.AFDEndpointUpdateParameters or JSON or + IO[bytes] + :return: An instance of AsyncLROPoller that returns AFDEndpoint. The AFDEndpoint is compatible + with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.AFDEndpoint] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.AFDEndpoint] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._update_initial( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + endpoint_update_properties=endpoint_update_properties, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.AFDEndpoint, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.AFDEndpoint].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.AFDEndpoint]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _delete_initial( + self, resource_group_name: str, profile_name: str, endpoint_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_afd_endpoints_delete_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_delete( + self, resource_group_name: str, profile_name: str, endpoint_name: str, **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes an existing AzureFrontDoor endpoint with the specified endpoint name under the + specified subscription, resource group and profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_by_profile( + self, resource_group_name: str, profile_name: str, **kwargs: Any + ) -> AsyncItemPaged["_models.AFDEndpoint"]: + """Lists existing AzureFrontDoor endpoints. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :return: An iterator like instance of AFDEndpoint + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cdn.models.AFDEndpoint] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.AFDEndpoint]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_afd_endpoints_list_by_profile_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.AFDEndpoint], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + async def _purge_content_initial( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + contents: Union[_models.AfdPurgeParameters, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(contents, (IOBase, bytes)): + _content = contents + else: + _content = json.dumps(contents, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_afd_endpoints_purge_content_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_purge_content( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + contents: _models.AfdPurgeParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Removes a content from AzureFrontDoor. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param contents: The list of paths to the content and the list of linked domains to be purged. + Path can be a full URL, e.g. '/pictures/city.png' which removes a single file, or a directory + with a wildcard, e.g. '/pictures/*' which removes all folders and files in the directory. + Required. + :type contents: ~azure.mgmt.cdn.models.AfdPurgeParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_purge_content( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + contents: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Removes a content from AzureFrontDoor. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param contents: The list of paths to the content and the list of linked domains to be purged. + Path can be a full URL, e.g. '/pictures/city.png' which removes a single file, or a directory + with a wildcard, e.g. '/pictures/*' which removes all folders and files in the directory. + Required. + :type contents: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_purge_content( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + contents: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Removes a content from AzureFrontDoor. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param contents: The list of paths to the content and the list of linked domains to be purged. + Path can be a full URL, e.g. '/pictures/city.png' which removes a single file, or a directory + with a wildcard, e.g. '/pictures/*' which removes all folders and files in the directory. + Required. + :type contents: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_purge_content( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + contents: Union[_models.AfdPurgeParameters, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Removes a content from AzureFrontDoor. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param contents: The list of paths to the content and the list of linked domains to be purged. + Path can be a full URL, e.g. '/pictures/city.png' which removes a single file, or a directory + with a wildcard, e.g. '/pictures/*' which removes all folders and files in the directory. Is + one of the following types: AfdPurgeParameters, JSON, IO[bytes] Required. + :type contents: ~azure.mgmt.cdn.models.AfdPurgeParameters or JSON or IO[bytes] + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._purge_content_initial( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + contents=contents, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_resource_usage( + self, resource_group_name: str, profile_name: str, endpoint_name: str, **kwargs: Any + ) -> AsyncItemPaged["_models.Usage"]: + """Checks the quota and actual usage of endpoints under the given Azure Front Door profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :return: An iterator like instance of Usage + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cdn.models.Usage] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.Usage]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_afd_endpoints_list_resource_usage_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.Usage], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @overload + async def validate_custom_domain( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + custom_domain_properties: _models.ValidateCustomDomainInput, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ValidateCustomDomainOutput: + """Validates the custom domain mapping to ensure it maps to the correct Azure Front Door endpoint + in DNS. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param custom_domain_properties: Custom domain to be validated. Required. + :type custom_domain_properties: ~azure.mgmt.cdn.models.ValidateCustomDomainInput + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ValidateCustomDomainOutput. The ValidateCustomDomainOutput is compatible with + MutableMapping + :rtype: ~azure.mgmt.cdn.models.ValidateCustomDomainOutput + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def validate_custom_domain( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + custom_domain_properties: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ValidateCustomDomainOutput: + """Validates the custom domain mapping to ensure it maps to the correct Azure Front Door endpoint + in DNS. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param custom_domain_properties: Custom domain to be validated. Required. + :type custom_domain_properties: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ValidateCustomDomainOutput. The ValidateCustomDomainOutput is compatible with + MutableMapping + :rtype: ~azure.mgmt.cdn.models.ValidateCustomDomainOutput + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def validate_custom_domain( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + custom_domain_properties: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ValidateCustomDomainOutput: + """Validates the custom domain mapping to ensure it maps to the correct Azure Front Door endpoint + in DNS. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param custom_domain_properties: Custom domain to be validated. Required. + :type custom_domain_properties: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: ValidateCustomDomainOutput. The ValidateCustomDomainOutput is compatible with + MutableMapping + :rtype: ~azure.mgmt.cdn.models.ValidateCustomDomainOutput + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def validate_custom_domain( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + custom_domain_properties: Union[_models.ValidateCustomDomainInput, JSON, IO[bytes]], + **kwargs: Any + ) -> _models.ValidateCustomDomainOutput: + """Validates the custom domain mapping to ensure it maps to the correct Azure Front Door endpoint + in DNS. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param custom_domain_properties: Custom domain to be validated. Is one of the following types: + ValidateCustomDomainInput, JSON, IO[bytes] Required. + :type custom_domain_properties: ~azure.mgmt.cdn.models.ValidateCustomDomainInput or JSON or + IO[bytes] + :return: ValidateCustomDomainOutput. The ValidateCustomDomainOutput is compatible with + MutableMapping + :rtype: ~azure.mgmt.cdn.models.ValidateCustomDomainOutput + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ValidateCustomDomainOutput] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(custom_domain_properties, (IOBase, bytes)): + _content = custom_domain_properties + else: + _content = json.dumps(custom_domain_properties, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_afd_endpoints_validate_custom_domain_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ValidateCustomDomainOutput, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + +class AFDOriginGroupsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.cdn.aio.CdnClient`'s + :attr:`afd_origin_groups` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CdnClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, resource_group_name: str, profile_name: str, origin_group_name: str, **kwargs: Any + ) -> _models.AFDOriginGroup: + """Gets an existing origin group within a profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param origin_group_name: Name of the origin group which is unique within the endpoint. + Required. + :type origin_group_name: str + :return: AFDOriginGroup. The AFDOriginGroup is compatible with MutableMapping + :rtype: ~azure.mgmt.cdn.models.AFDOriginGroup + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.AFDOriginGroup] = kwargs.pop("cls", None) + + _request = build_afd_origin_groups_get_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + origin_group_name=origin_group_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.AFDOriginGroup, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + async def _create_initial( + self, + resource_group_name: str, + profile_name: str, + origin_group_name: str, + origin_group: Union[_models.AFDOriginGroup, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(origin_group, (IOBase, bytes)): + _content = origin_group + else: + _content = json.dumps(origin_group, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_afd_origin_groups_create_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + origin_group_name=origin_group_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 201: + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_create( + self, + resource_group_name: str, + profile_name: str, + origin_group_name: str, + origin_group: _models.AFDOriginGroup, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.AFDOriginGroup]: + """Creates a new origin group within the specified profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param origin_group_name: Name of the origin group which is unique within the endpoint. + Required. + :type origin_group_name: str + :param origin_group: Origin group properties. Required. + :type origin_group: ~azure.mgmt.cdn.models.AFDOriginGroup + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns AFDOriginGroup. The AFDOriginGroup is + compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.AFDOriginGroup] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create( + self, + resource_group_name: str, + profile_name: str, + origin_group_name: str, + origin_group: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.AFDOriginGroup]: + """Creates a new origin group within the specified profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param origin_group_name: Name of the origin group which is unique within the endpoint. + Required. + :type origin_group_name: str + :param origin_group: Origin group properties. Required. + :type origin_group: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns AFDOriginGroup. The AFDOriginGroup is + compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.AFDOriginGroup] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create( + self, + resource_group_name: str, + profile_name: str, + origin_group_name: str, + origin_group: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.AFDOriginGroup]: + """Creates a new origin group within the specified profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param origin_group_name: Name of the origin group which is unique within the endpoint. + Required. + :type origin_group_name: str + :param origin_group: Origin group properties. Required. + :type origin_group: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns AFDOriginGroup. The AFDOriginGroup is + compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.AFDOriginGroup] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_create( + self, + resource_group_name: str, + profile_name: str, + origin_group_name: str, + origin_group: Union[_models.AFDOriginGroup, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.AFDOriginGroup]: + """Creates a new origin group within the specified profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param origin_group_name: Name of the origin group which is unique within the endpoint. + Required. + :type origin_group_name: str + :param origin_group: Origin group properties. Is one of the following types: AFDOriginGroup, + JSON, IO[bytes] Required. + :type origin_group: ~azure.mgmt.cdn.models.AFDOriginGroup or JSON or IO[bytes] + :return: An instance of AsyncLROPoller that returns AFDOriginGroup. The AFDOriginGroup is + compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.AFDOriginGroup] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.AFDOriginGroup] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._create_initial( + resource_group_name=resource_group_name, + profile_name=profile_name, + origin_group_name=origin_group_name, + origin_group=origin_group, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.AFDOriginGroup, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.AFDOriginGroup].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.AFDOriginGroup]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _update_initial( + self, + resource_group_name: str, + profile_name: str, + origin_group_name: str, + origin_group_update_properties: Union[_models.AFDOriginGroupUpdateParameters, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(origin_group_update_properties, (IOBase, bytes)): + _content = origin_group_update_properties + else: + _content = json.dumps(origin_group_update_properties, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_afd_origin_groups_update_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + origin_group_name=origin_group_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_update( + self, + resource_group_name: str, + profile_name: str, + origin_group_name: str, + origin_group_update_properties: _models.AFDOriginGroupUpdateParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.AFDOriginGroup]: + """Updates an existing origin group within a profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param origin_group_name: Name of the origin group which is unique within the endpoint. + Required. + :type origin_group_name: str + :param origin_group_update_properties: Origin group properties. Required. + :type origin_group_update_properties: ~azure.mgmt.cdn.models.AFDOriginGroupUpdateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns AFDOriginGroup. The AFDOriginGroup is + compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.AFDOriginGroup] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update( + self, + resource_group_name: str, + profile_name: str, + origin_group_name: str, + origin_group_update_properties: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.AFDOriginGroup]: + """Updates an existing origin group within a profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param origin_group_name: Name of the origin group which is unique within the endpoint. + Required. + :type origin_group_name: str + :param origin_group_update_properties: Origin group properties. Required. + :type origin_group_update_properties: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns AFDOriginGroup. The AFDOriginGroup is + compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.AFDOriginGroup] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update( + self, + resource_group_name: str, + profile_name: str, + origin_group_name: str, + origin_group_update_properties: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.AFDOriginGroup]: + """Updates an existing origin group within a profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param origin_group_name: Name of the origin group which is unique within the endpoint. + Required. + :type origin_group_name: str + :param origin_group_update_properties: Origin group properties. Required. + :type origin_group_update_properties: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns AFDOriginGroup. The AFDOriginGroup is + compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.AFDOriginGroup] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_update( + self, + resource_group_name: str, + profile_name: str, + origin_group_name: str, + origin_group_update_properties: Union[_models.AFDOriginGroupUpdateParameters, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.AFDOriginGroup]: + """Updates an existing origin group within a profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param origin_group_name: Name of the origin group which is unique within the endpoint. + Required. + :type origin_group_name: str + :param origin_group_update_properties: Origin group properties. Is one of the following types: + AFDOriginGroupUpdateParameters, JSON, IO[bytes] Required. + :type origin_group_update_properties: ~azure.mgmt.cdn.models.AFDOriginGroupUpdateParameters or + JSON or IO[bytes] + :return: An instance of AsyncLROPoller that returns AFDOriginGroup. The AFDOriginGroup is + compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.AFDOriginGroup] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.AFDOriginGroup] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._update_initial( + resource_group_name=resource_group_name, + profile_name=profile_name, + origin_group_name=origin_group_name, + origin_group_update_properties=origin_group_update_properties, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.AFDOriginGroup, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.AFDOriginGroup].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.AFDOriginGroup]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _delete_initial( + self, resource_group_name: str, profile_name: str, origin_group_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_afd_origin_groups_delete_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + origin_group_name=origin_group_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_delete( + self, resource_group_name: str, profile_name: str, origin_group_name: str, **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes an existing origin group within a profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param origin_group_name: Name of the origin group which is unique within the endpoint. + Required. + :type origin_group_name: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + profile_name=profile_name, + origin_group_name=origin_group_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_by_profile( + self, resource_group_name: str, profile_name: str, **kwargs: Any + ) -> AsyncItemPaged["_models.AFDOriginGroup"]: + """Lists all of the existing origin groups within a profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :return: An iterator like instance of AFDOriginGroup + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cdn.models.AFDOriginGroup] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.AFDOriginGroup]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_afd_origin_groups_list_by_profile_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.AFDOriginGroup], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @distributed_trace + def list_resource_usage( + self, resource_group_name: str, profile_name: str, origin_group_name: str, **kwargs: Any + ) -> AsyncItemPaged["_models.Usage"]: + """Checks the quota and actual usage of endpoints under the given Azure Front Door profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param origin_group_name: Name of the origin group which is unique within the endpoint. + Required. + :type origin_group_name: str + :return: An iterator like instance of Usage + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cdn.models.Usage] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.Usage]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_afd_origin_groups_list_resource_usage_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + origin_group_name=origin_group_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.Usage], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class AFDOriginsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.cdn.aio.CdnClient`'s + :attr:`afd_origins` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CdnClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, resource_group_name: str, profile_name: str, origin_group_name: str, origin_name: str, **kwargs: Any + ) -> _models.AFDOrigin: + """Gets an existing origin within an origin group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param origin_group_name: Name of the origin group which is unique within the endpoint. + Required. + :type origin_group_name: str + :param origin_name: Name of the origin which is unique within the profile. Required. + :type origin_name: str + :return: AFDOrigin. The AFDOrigin is compatible with MutableMapping + :rtype: ~azure.mgmt.cdn.models.AFDOrigin + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.AFDOrigin] = kwargs.pop("cls", None) + + _request = build_afd_origins_get_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + origin_group_name=origin_group_name, + origin_name=origin_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.AFDOrigin, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + async def _create_initial( + self, + resource_group_name: str, + profile_name: str, + origin_group_name: str, + origin_name: str, + origin: Union[_models.AFDOrigin, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(origin, (IOBase, bytes)): + _content = origin + else: + _content = json.dumps(origin, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_afd_origins_create_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + origin_group_name=origin_group_name, + origin_name=origin_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 201: + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_create( + self, + resource_group_name: str, + profile_name: str, + origin_group_name: str, + origin_name: str, + origin: _models.AFDOrigin, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.AFDOrigin]: + """Creates a new origin within the specified origin group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param origin_group_name: Name of the origin group which is unique within the endpoint. + Required. + :type origin_group_name: str + :param origin_name: Name of the origin which is unique within the profile. Required. + :type origin_name: str + :param origin: Origin properties. Required. + :type origin: ~azure.mgmt.cdn.models.AFDOrigin + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns AFDOrigin. The AFDOrigin is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.AFDOrigin] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create( + self, + resource_group_name: str, + profile_name: str, + origin_group_name: str, + origin_name: str, + origin: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.AFDOrigin]: + """Creates a new origin within the specified origin group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param origin_group_name: Name of the origin group which is unique within the endpoint. + Required. + :type origin_group_name: str + :param origin_name: Name of the origin which is unique within the profile. Required. + :type origin_name: str + :param origin: Origin properties. Required. + :type origin: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns AFDOrigin. The AFDOrigin is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.AFDOrigin] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create( + self, + resource_group_name: str, + profile_name: str, + origin_group_name: str, + origin_name: str, + origin: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.AFDOrigin]: + """Creates a new origin within the specified origin group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param origin_group_name: Name of the origin group which is unique within the endpoint. + Required. + :type origin_group_name: str + :param origin_name: Name of the origin which is unique within the profile. Required. + :type origin_name: str + :param origin: Origin properties. Required. + :type origin: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns AFDOrigin. The AFDOrigin is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.AFDOrigin] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_create( + self, + resource_group_name: str, + profile_name: str, + origin_group_name: str, + origin_name: str, + origin: Union[_models.AFDOrigin, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.AFDOrigin]: + """Creates a new origin within the specified origin group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param origin_group_name: Name of the origin group which is unique within the endpoint. + Required. + :type origin_group_name: str + :param origin_name: Name of the origin which is unique within the profile. Required. + :type origin_name: str + :param origin: Origin properties. Is one of the following types: AFDOrigin, JSON, IO[bytes] + Required. + :type origin: ~azure.mgmt.cdn.models.AFDOrigin or JSON or IO[bytes] + :return: An instance of AsyncLROPoller that returns AFDOrigin. The AFDOrigin is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.AFDOrigin] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.AFDOrigin] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._create_initial( + resource_group_name=resource_group_name, + profile_name=profile_name, + origin_group_name=origin_group_name, + origin_name=origin_name, + origin=origin, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.AFDOrigin, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.AFDOrigin].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.AFDOrigin]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _update_initial( + self, + resource_group_name: str, + profile_name: str, + origin_group_name: str, + origin_name: str, + origin_update_properties: Union[_models.AFDOriginUpdateParameters, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(origin_update_properties, (IOBase, bytes)): + _content = origin_update_properties + else: + _content = json.dumps(origin_update_properties, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_afd_origins_update_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + origin_group_name=origin_group_name, + origin_name=origin_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_update( + self, + resource_group_name: str, + profile_name: str, + origin_group_name: str, + origin_name: str, + origin_update_properties: _models.AFDOriginUpdateParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.AFDOrigin]: + """Updates an existing origin within an origin group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param origin_group_name: Name of the origin group which is unique within the endpoint. + Required. + :type origin_group_name: str + :param origin_name: Name of the origin which is unique within the profile. Required. + :type origin_name: str + :param origin_update_properties: Origin properties. Required. + :type origin_update_properties: ~azure.mgmt.cdn.models.AFDOriginUpdateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns AFDOrigin. The AFDOrigin is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.AFDOrigin] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update( + self, + resource_group_name: str, + profile_name: str, + origin_group_name: str, + origin_name: str, + origin_update_properties: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.AFDOrigin]: + """Updates an existing origin within an origin group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param origin_group_name: Name of the origin group which is unique within the endpoint. + Required. + :type origin_group_name: str + :param origin_name: Name of the origin which is unique within the profile. Required. + :type origin_name: str + :param origin_update_properties: Origin properties. Required. + :type origin_update_properties: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns AFDOrigin. The AFDOrigin is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.AFDOrigin] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update( + self, + resource_group_name: str, + profile_name: str, + origin_group_name: str, + origin_name: str, + origin_update_properties: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.AFDOrigin]: + """Updates an existing origin within an origin group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param origin_group_name: Name of the origin group which is unique within the endpoint. + Required. + :type origin_group_name: str + :param origin_name: Name of the origin which is unique within the profile. Required. + :type origin_name: str + :param origin_update_properties: Origin properties. Required. + :type origin_update_properties: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns AFDOrigin. The AFDOrigin is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.AFDOrigin] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_update( + self, + resource_group_name: str, + profile_name: str, + origin_group_name: str, + origin_name: str, + origin_update_properties: Union[_models.AFDOriginUpdateParameters, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.AFDOrigin]: + """Updates an existing origin within an origin group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param origin_group_name: Name of the origin group which is unique within the endpoint. + Required. + :type origin_group_name: str + :param origin_name: Name of the origin which is unique within the profile. Required. + :type origin_name: str + :param origin_update_properties: Origin properties. Is one of the following types: + AFDOriginUpdateParameters, JSON, IO[bytes] Required. + :type origin_update_properties: ~azure.mgmt.cdn.models.AFDOriginUpdateParameters or JSON or + IO[bytes] + :return: An instance of AsyncLROPoller that returns AFDOrigin. The AFDOrigin is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.AFDOrigin] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.AFDOrigin] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._update_initial( + resource_group_name=resource_group_name, + profile_name=profile_name, + origin_group_name=origin_group_name, + origin_name=origin_name, + origin_update_properties=origin_update_properties, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.AFDOrigin, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.AFDOrigin].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.AFDOrigin]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _delete_initial( + self, resource_group_name: str, profile_name: str, origin_group_name: str, origin_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_afd_origins_delete_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + origin_group_name=origin_group_name, + origin_name=origin_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_delete( + self, resource_group_name: str, profile_name: str, origin_group_name: str, origin_name: str, **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes an existing origin within an origin group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param origin_group_name: Name of the origin group which is unique within the endpoint. + Required. + :type origin_group_name: str + :param origin_name: Name of the origin which is unique within the profile. Required. + :type origin_name: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + profile_name=profile_name, + origin_group_name=origin_group_name, + origin_name=origin_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_by_origin_group( + self, resource_group_name: str, profile_name: str, origin_group_name: str, **kwargs: Any + ) -> AsyncItemPaged["_models.AFDOrigin"]: + """Lists all of the existing origins within an origin group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param origin_group_name: Name of the origin group which is unique within the endpoint. + Required. + :type origin_group_name: str + :return: An iterator like instance of AFDOrigin + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cdn.models.AFDOrigin] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.AFDOrigin]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_afd_origins_list_by_origin_group_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + origin_group_name=origin_group_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.AFDOrigin], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class RoutesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.cdn.aio.CdnClient`'s + :attr:`routes` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CdnClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, resource_group_name: str, profile_name: str, endpoint_name: str, route_name: str, **kwargs: Any + ) -> _models.Route: + """Gets an existing route with the specified route name under the specified subscription, resource + group, profile, and AzureFrontDoor endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param route_name: Name of the routing rule. Required. + :type route_name: str + :return: Route. The Route is compatible with MutableMapping + :rtype: ~azure.mgmt.cdn.models.Route + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.Route] = kwargs.pop("cls", None) + + _request = build_routes_get_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + route_name=route_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.Route, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + async def _create_initial( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + route_name: str, + route: Union[_models.Route, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(route, (IOBase, bytes)): + _content = route + else: + _content = json.dumps(route, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_routes_create_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + route_name=route_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 201: + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_create( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + route_name: str, + route: _models.Route, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.Route]: + """Creates a new route with the specified route name under the specified subscription, resource + group, profile, and AzureFrontDoor endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param route_name: Name of the routing rule. Required. + :type route_name: str + :param route: Route properties. Required. + :type route: ~azure.mgmt.cdn.models.Route + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns Route. The Route is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.Route] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + route_name: str, + route: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.Route]: + """Creates a new route with the specified route name under the specified subscription, resource + group, profile, and AzureFrontDoor endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param route_name: Name of the routing rule. Required. + :type route_name: str + :param route: Route properties. Required. + :type route: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns Route. The Route is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.Route] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + route_name: str, + route: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.Route]: + """Creates a new route with the specified route name under the specified subscription, resource + group, profile, and AzureFrontDoor endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param route_name: Name of the routing rule. Required. + :type route_name: str + :param route: Route properties. Required. + :type route: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns Route. The Route is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.Route] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_create( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + route_name: str, + route: Union[_models.Route, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.Route]: + """Creates a new route with the specified route name under the specified subscription, resource + group, profile, and AzureFrontDoor endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param route_name: Name of the routing rule. Required. + :type route_name: str + :param route: Route properties. Is one of the following types: Route, JSON, IO[bytes] Required. + :type route: ~azure.mgmt.cdn.models.Route or JSON or IO[bytes] + :return: An instance of AsyncLROPoller that returns Route. The Route is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.Route] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.Route] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._create_initial( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + route_name=route_name, + route=route, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.Route, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.Route].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.Route]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _update_initial( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + route_name: str, + route_update_properties: Union[_models.RouteUpdateParameters, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(route_update_properties, (IOBase, bytes)): + _content = route_update_properties + else: + _content = json.dumps(route_update_properties, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_routes_update_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + route_name=route_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_update( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + route_name: str, + route_update_properties: _models.RouteUpdateParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.Route]: + """Updates an existing route with the specified route name under the specified subscription, + resource group, profile, and AzureFrontDoor endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param route_name: Name of the routing rule. Required. + :type route_name: str + :param route_update_properties: Route update properties. Required. + :type route_update_properties: ~azure.mgmt.cdn.models.RouteUpdateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns Route. The Route is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.Route] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + route_name: str, + route_update_properties: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.Route]: + """Updates an existing route with the specified route name under the specified subscription, + resource group, profile, and AzureFrontDoor endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param route_name: Name of the routing rule. Required. + :type route_name: str + :param route_update_properties: Route update properties. Required. + :type route_update_properties: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns Route. The Route is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.Route] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + route_name: str, + route_update_properties: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.Route]: + """Updates an existing route with the specified route name under the specified subscription, + resource group, profile, and AzureFrontDoor endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param route_name: Name of the routing rule. Required. + :type route_name: str + :param route_update_properties: Route update properties. Required. + :type route_update_properties: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns Route. The Route is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.Route] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_update( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + route_name: str, + route_update_properties: Union[_models.RouteUpdateParameters, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.Route]: + """Updates an existing route with the specified route name under the specified subscription, + resource group, profile, and AzureFrontDoor endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param route_name: Name of the routing rule. Required. + :type route_name: str + :param route_update_properties: Route update properties. Is one of the following types: + RouteUpdateParameters, JSON, IO[bytes] Required. + :type route_update_properties: ~azure.mgmt.cdn.models.RouteUpdateParameters or JSON or + IO[bytes] + :return: An instance of AsyncLROPoller that returns Route. The Route is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.Route] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.Route] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._update_initial( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + route_name=route_name, + route_update_properties=route_update_properties, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.Route, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.Route].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.Route]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _delete_initial( + self, resource_group_name: str, profile_name: str, endpoint_name: str, route_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_routes_delete_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + route_name=route_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_delete( + self, resource_group_name: str, profile_name: str, endpoint_name: str, route_name: str, **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes an existing route with the specified route name under the specified subscription, + resource group, profile, and AzureFrontDoor endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param route_name: Name of the routing rule. Required. + :type route_name: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + route_name=route_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_by_endpoint( + self, resource_group_name: str, profile_name: str, endpoint_name: str, **kwargs: Any + ) -> AsyncItemPaged["_models.Route"]: + """Lists all of the existing origins within a profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :return: An iterator like instance of Route + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cdn.models.Route] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.Route]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_routes_list_by_endpoint_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.Route], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class RuleSetsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.cdn.aio.CdnClient`'s + :attr:`rule_sets` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CdnClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, resource_group_name: str, profile_name: str, rule_set_name: str, **kwargs: Any + ) -> _models.RuleSet: + """Gets an existing AzureFrontDoor rule set with the specified rule set name under the specified + subscription, resource group and profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param rule_set_name: Name of the rule set under the profile which is unique globally. + Required. + :type rule_set_name: str + :return: RuleSet. The RuleSet is compatible with MutableMapping + :rtype: ~azure.mgmt.cdn.models.RuleSet + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.RuleSet] = kwargs.pop("cls", None) + + _request = build_rule_sets_get_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + rule_set_name=rule_set_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.RuleSet, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def create( + self, resource_group_name: str, profile_name: str, rule_set_name: str, **kwargs: Any + ) -> _models.RuleSet: + """Creates a new rule set within the specified profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param rule_set_name: Name of the rule set under the profile which is unique globally. + Required. + :type rule_set_name: str + :return: RuleSet. The RuleSet is compatible with MutableMapping + :rtype: ~azure.mgmt.cdn.models.RuleSet + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.RuleSet] = kwargs.pop("cls", None) + + _request = build_rule_sets_create_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + rule_set_name=rule_set_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 201: + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.RuleSet, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + async def _delete_initial( + self, resource_group_name: str, profile_name: str, rule_set_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_rule_sets_delete_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + rule_set_name=rule_set_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_delete( + self, resource_group_name: str, profile_name: str, rule_set_name: str, **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes an existing AzureFrontDoor rule set with the specified rule set name under the + specified subscription, resource group and profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param rule_set_name: Name of the rule set under the profile which is unique globally. + Required. + :type rule_set_name: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + profile_name=profile_name, + rule_set_name=rule_set_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_by_profile( + self, resource_group_name: str, profile_name: str, **kwargs: Any + ) -> AsyncItemPaged["_models.RuleSet"]: + """Lists existing AzureFrontDoor rule sets within a profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :return: An iterator like instance of RuleSet + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cdn.models.RuleSet] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.RuleSet]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_rule_sets_list_by_profile_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.RuleSet], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @distributed_trace + def list_resource_usage( + self, resource_group_name: str, profile_name: str, rule_set_name: str, **kwargs: Any + ) -> AsyncItemPaged["_models.Usage"]: + """Checks the quota and actual usage of endpoints under the given Azure Front Door profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param rule_set_name: Name of the rule set under the profile which is unique globally. + Required. + :type rule_set_name: str + :return: An iterator like instance of Usage + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cdn.models.Usage] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.Usage]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_rule_sets_list_resource_usage_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + rule_set_name=rule_set_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.Usage], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class RulesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.cdn.aio.CdnClient`'s + :attr:`rules` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CdnClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, resource_group_name: str, profile_name: str, rule_set_name: str, rule_name: str, **kwargs: Any + ) -> _models.Rule: + """Gets an existing delivery rule within a rule set. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param rule_set_name: Name of the rule set under the profile which is unique globally. + Required. + :type rule_set_name: str + :param rule_name: Name of the delivery rule which is unique within the endpoint. Required. + :type rule_name: str + :return: Rule. The Rule is compatible with MutableMapping + :rtype: ~azure.mgmt.cdn.models.Rule + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.Rule] = kwargs.pop("cls", None) + + _request = build_rules_get_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + rule_set_name=rule_set_name, + rule_name=rule_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.Rule, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + async def _create_initial( + self, + resource_group_name: str, + profile_name: str, + rule_set_name: str, + rule_name: str, + rule: Union[_models.Rule, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(rule, (IOBase, bytes)): + _content = rule + else: + _content = json.dumps(rule, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_rules_create_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + rule_set_name=rule_set_name, + rule_name=rule_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 201: + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_create( + self, + resource_group_name: str, + profile_name: str, + rule_set_name: str, + rule_name: str, + rule: _models.Rule, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.Rule]: + """Creates a new delivery rule within the specified rule set. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param rule_set_name: Name of the rule set under the profile which is unique globally. + Required. + :type rule_set_name: str + :param rule_name: Name of the delivery rule which is unique within the endpoint. Required. + :type rule_name: str + :param rule: The delivery rule properties. Required. + :type rule: ~azure.mgmt.cdn.models.Rule + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns Rule. The Rule is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.Rule] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create( + self, + resource_group_name: str, + profile_name: str, + rule_set_name: str, + rule_name: str, + rule: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.Rule]: + """Creates a new delivery rule within the specified rule set. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param rule_set_name: Name of the rule set under the profile which is unique globally. + Required. + :type rule_set_name: str + :param rule_name: Name of the delivery rule which is unique within the endpoint. Required. + :type rule_name: str + :param rule: The delivery rule properties. Required. + :type rule: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns Rule. The Rule is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.Rule] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create( + self, + resource_group_name: str, + profile_name: str, + rule_set_name: str, + rule_name: str, + rule: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.Rule]: + """Creates a new delivery rule within the specified rule set. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param rule_set_name: Name of the rule set under the profile which is unique globally. + Required. + :type rule_set_name: str + :param rule_name: Name of the delivery rule which is unique within the endpoint. Required. + :type rule_name: str + :param rule: The delivery rule properties. Required. + :type rule: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns Rule. The Rule is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.Rule] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_create( + self, + resource_group_name: str, + profile_name: str, + rule_set_name: str, + rule_name: str, + rule: Union[_models.Rule, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.Rule]: + """Creates a new delivery rule within the specified rule set. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param rule_set_name: Name of the rule set under the profile which is unique globally. + Required. + :type rule_set_name: str + :param rule_name: Name of the delivery rule which is unique within the endpoint. Required. + :type rule_name: str + :param rule: The delivery rule properties. Is one of the following types: Rule, JSON, IO[bytes] + Required. + :type rule: ~azure.mgmt.cdn.models.Rule or JSON or IO[bytes] + :return: An instance of AsyncLROPoller that returns Rule. The Rule is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.Rule] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.Rule] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._create_initial( + resource_group_name=resource_group_name, + profile_name=profile_name, + rule_set_name=rule_set_name, + rule_name=rule_name, + rule=rule, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.Rule, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.Rule].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.Rule]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _update_initial( + self, + resource_group_name: str, + profile_name: str, + rule_set_name: str, + rule_name: str, + rule_update_properties: Union[_models.RuleUpdateParameters, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(rule_update_properties, (IOBase, bytes)): + _content = rule_update_properties + else: + _content = json.dumps(rule_update_properties, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_rules_update_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + rule_set_name=rule_set_name, + rule_name=rule_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_update( + self, + resource_group_name: str, + profile_name: str, + rule_set_name: str, + rule_name: str, + rule_update_properties: _models.RuleUpdateParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.Rule]: + """Updates an existing delivery rule within a rule set. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param rule_set_name: Name of the rule set under the profile which is unique globally. + Required. + :type rule_set_name: str + :param rule_name: Name of the delivery rule which is unique within the endpoint. Required. + :type rule_name: str + :param rule_update_properties: Delivery rule properties. Required. + :type rule_update_properties: ~azure.mgmt.cdn.models.RuleUpdateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns Rule. The Rule is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.Rule] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update( + self, + resource_group_name: str, + profile_name: str, + rule_set_name: str, + rule_name: str, + rule_update_properties: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.Rule]: + """Updates an existing delivery rule within a rule set. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param rule_set_name: Name of the rule set under the profile which is unique globally. + Required. + :type rule_set_name: str + :param rule_name: Name of the delivery rule which is unique within the endpoint. Required. + :type rule_name: str + :param rule_update_properties: Delivery rule properties. Required. + :type rule_update_properties: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns Rule. The Rule is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.Rule] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update( + self, + resource_group_name: str, + profile_name: str, + rule_set_name: str, + rule_name: str, + rule_update_properties: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.Rule]: + """Updates an existing delivery rule within a rule set. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param rule_set_name: Name of the rule set under the profile which is unique globally. + Required. + :type rule_set_name: str + :param rule_name: Name of the delivery rule which is unique within the endpoint. Required. + :type rule_name: str + :param rule_update_properties: Delivery rule properties. Required. + :type rule_update_properties: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns Rule. The Rule is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.Rule] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_update( + self, + resource_group_name: str, + profile_name: str, + rule_set_name: str, + rule_name: str, + rule_update_properties: Union[_models.RuleUpdateParameters, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.Rule]: + """Updates an existing delivery rule within a rule set. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param rule_set_name: Name of the rule set under the profile which is unique globally. + Required. + :type rule_set_name: str + :param rule_name: Name of the delivery rule which is unique within the endpoint. Required. + :type rule_name: str + :param rule_update_properties: Delivery rule properties. Is one of the following types: + RuleUpdateParameters, JSON, IO[bytes] Required. + :type rule_update_properties: ~azure.mgmt.cdn.models.RuleUpdateParameters or JSON or IO[bytes] + :return: An instance of AsyncLROPoller that returns Rule. The Rule is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.Rule] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.Rule] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._update_initial( + resource_group_name=resource_group_name, + profile_name=profile_name, + rule_set_name=rule_set_name, + rule_name=rule_name, + rule_update_properties=rule_update_properties, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.Rule, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.Rule].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.Rule]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _delete_initial( + self, resource_group_name: str, profile_name: str, rule_set_name: str, rule_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_rules_delete_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + rule_set_name=rule_set_name, + rule_name=rule_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_delete( + self, resource_group_name: str, profile_name: str, rule_set_name: str, rule_name: str, **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes an existing delivery rule within a rule set. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param rule_set_name: Name of the rule set under the profile which is unique globally. + Required. + :type rule_set_name: str + :param rule_name: Name of the delivery rule which is unique within the endpoint. Required. + :type rule_name: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + profile_name=profile_name, + rule_set_name=rule_set_name, + rule_name=rule_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_by_rule_set( + self, resource_group_name: str, profile_name: str, rule_set_name: str, **kwargs: Any + ) -> AsyncItemPaged["_models.Rule"]: + """Lists all of the existing delivery rules within a rule set. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param rule_set_name: Name of the rule set under the profile which is unique globally. + Required. + :type rule_set_name: str + :return: An iterator like instance of Rule + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cdn.models.Rule] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.Rule]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_rules_list_by_rule_set_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + rule_set_name=rule_set_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.Rule], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class SecurityPoliciesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.cdn.aio.CdnClient`'s + :attr:`security_policies` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CdnClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, resource_group_name: str, profile_name: str, security_policy_name: str, **kwargs: Any + ) -> _models.SecurityPolicy: + """Gets an existing security policy within a profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param security_policy_name: Name of the security policy under the profile. Required. + :type security_policy_name: str + :return: SecurityPolicy. The SecurityPolicy is compatible with MutableMapping + :rtype: ~azure.mgmt.cdn.models.SecurityPolicy + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.SecurityPolicy] = kwargs.pop("cls", None) + + _request = build_security_policies_get_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + security_policy_name=security_policy_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.SecurityPolicy, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + async def _create_initial( + self, + resource_group_name: str, + profile_name: str, + security_policy_name: str, + security_policy: Union[_models.SecurityPolicy, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(security_policy, (IOBase, bytes)): + _content = security_policy + else: + _content = json.dumps(security_policy, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_security_policies_create_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + security_policy_name=security_policy_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 201: + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_create( + self, + resource_group_name: str, + profile_name: str, + security_policy_name: str, + security_policy: _models.SecurityPolicy, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.SecurityPolicy]: + """Creates a new security policy within the specified profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param security_policy_name: Name of the security policy under the profile. Required. + :type security_policy_name: str + :param security_policy: The security policy properties. Required. + :type security_policy: ~azure.mgmt.cdn.models.SecurityPolicy + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns SecurityPolicy. The SecurityPolicy is + compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.SecurityPolicy] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create( + self, + resource_group_name: str, + profile_name: str, + security_policy_name: str, + security_policy: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.SecurityPolicy]: + """Creates a new security policy within the specified profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param security_policy_name: Name of the security policy under the profile. Required. + :type security_policy_name: str + :param security_policy: The security policy properties. Required. + :type security_policy: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns SecurityPolicy. The SecurityPolicy is + compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.SecurityPolicy] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create( + self, + resource_group_name: str, + profile_name: str, + security_policy_name: str, + security_policy: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.SecurityPolicy]: + """Creates a new security policy within the specified profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param security_policy_name: Name of the security policy under the profile. Required. + :type security_policy_name: str + :param security_policy: The security policy properties. Required. + :type security_policy: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns SecurityPolicy. The SecurityPolicy is + compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.SecurityPolicy] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_create( + self, + resource_group_name: str, + profile_name: str, + security_policy_name: str, + security_policy: Union[_models.SecurityPolicy, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.SecurityPolicy]: + """Creates a new security policy within the specified profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param security_policy_name: Name of the security policy under the profile. Required. + :type security_policy_name: str + :param security_policy: The security policy properties. Is one of the following types: + SecurityPolicy, JSON, IO[bytes] Required. + :type security_policy: ~azure.mgmt.cdn.models.SecurityPolicy or JSON or IO[bytes] + :return: An instance of AsyncLROPoller that returns SecurityPolicy. The SecurityPolicy is + compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.SecurityPolicy] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.SecurityPolicy] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._create_initial( + resource_group_name=resource_group_name, + profile_name=profile_name, + security_policy_name=security_policy_name, + security_policy=security_policy, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.SecurityPolicy, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.SecurityPolicy].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.SecurityPolicy]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _patch_initial( + self, + resource_group_name: str, + profile_name: str, + security_policy_name: str, + security_policy_update_properties: Union[_models.SecurityPolicyUpdateParameters, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(security_policy_update_properties, (IOBase, bytes)): + _content = security_policy_update_properties + else: + _content = json.dumps(security_policy_update_properties, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_security_policies_patch_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + security_policy_name=security_policy_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_patch( + self, + resource_group_name: str, + profile_name: str, + security_policy_name: str, + security_policy_update_properties: _models.SecurityPolicyUpdateParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.SecurityPolicy]: + """Updates an existing security policy within a profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param security_policy_name: Name of the security policy under the profile. Required. + :type security_policy_name: str + :param security_policy_update_properties: Security policy update properties. Required. + :type security_policy_update_properties: ~azure.mgmt.cdn.models.SecurityPolicyUpdateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns SecurityPolicy. The SecurityPolicy is + compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.SecurityPolicy] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_patch( + self, + resource_group_name: str, + profile_name: str, + security_policy_name: str, + security_policy_update_properties: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.SecurityPolicy]: + """Updates an existing security policy within a profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param security_policy_name: Name of the security policy under the profile. Required. + :type security_policy_name: str + :param security_policy_update_properties: Security policy update properties. Required. + :type security_policy_update_properties: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns SecurityPolicy. The SecurityPolicy is + compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.SecurityPolicy] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_patch( + self, + resource_group_name: str, + profile_name: str, + security_policy_name: str, + security_policy_update_properties: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.SecurityPolicy]: + """Updates an existing security policy within a profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param security_policy_name: Name of the security policy under the profile. Required. + :type security_policy_name: str + :param security_policy_update_properties: Security policy update properties. Required. + :type security_policy_update_properties: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns SecurityPolicy. The SecurityPolicy is + compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.SecurityPolicy] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_patch( + self, + resource_group_name: str, + profile_name: str, + security_policy_name: str, + security_policy_update_properties: Union[_models.SecurityPolicyUpdateParameters, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.SecurityPolicy]: + """Updates an existing security policy within a profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param security_policy_name: Name of the security policy under the profile. Required. + :type security_policy_name: str + :param security_policy_update_properties: Security policy update properties. Is one of the + following types: SecurityPolicyUpdateParameters, JSON, IO[bytes] Required. + :type security_policy_update_properties: ~azure.mgmt.cdn.models.SecurityPolicyUpdateParameters + or JSON or IO[bytes] + :return: An instance of AsyncLROPoller that returns SecurityPolicy. The SecurityPolicy is + compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.SecurityPolicy] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.SecurityPolicy] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._patch_initial( + resource_group_name=resource_group_name, + profile_name=profile_name, + security_policy_name=security_policy_name, + security_policy_update_properties=security_policy_update_properties, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.SecurityPolicy, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.SecurityPolicy].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.SecurityPolicy]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _delete_initial( + self, resource_group_name: str, profile_name: str, security_policy_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_security_policies_delete_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + security_policy_name=security_policy_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_delete( + self, resource_group_name: str, profile_name: str, security_policy_name: str, **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes an existing security policy within profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param security_policy_name: Name of the security policy under the profile. Required. + :type security_policy_name: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + profile_name=profile_name, + security_policy_name=security_policy_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_by_profile( + self, resource_group_name: str, profile_name: str, **kwargs: Any + ) -> AsyncItemPaged["_models.SecurityPolicy"]: + """Lists security policies associated with the profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :return: An iterator like instance of SecurityPolicy + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cdn.models.SecurityPolicy] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.SecurityPolicy]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_security_policies_list_by_profile_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.SecurityPolicy], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class SecretsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.cdn.aio.CdnClient`'s + :attr:`secrets` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CdnClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get(self, resource_group_name: str, profile_name: str, secret_name: str, **kwargs: Any) -> _models.Secret: + """Gets an existing Secret within a profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param secret_name: Name of the Secret under the profile. Required. + :type secret_name: str + :return: Secret. The Secret is compatible with MutableMapping + :rtype: ~azure.mgmt.cdn.models.Secret + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.Secret] = kwargs.pop("cls", None) + + _request = build_secrets_get_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + secret_name=secret_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.Secret, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + async def _create_initial( + self, + resource_group_name: str, + profile_name: str, + secret_name: str, + secret: Union[_models.Secret, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(secret, (IOBase, bytes)): + _content = secret + else: + _content = json.dumps(secret, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_secrets_create_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + secret_name=secret_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 201: + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_create( + self, + resource_group_name: str, + profile_name: str, + secret_name: str, + secret: _models.Secret, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.Secret]: + """Creates a new Secret within the specified profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param secret_name: Name of the Secret under the profile. Required. + :type secret_name: str + :param secret: The Secret properties. Required. + :type secret: ~azure.mgmt.cdn.models.Secret + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns Secret. The Secret is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.Secret] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create( + self, + resource_group_name: str, + profile_name: str, + secret_name: str, + secret: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.Secret]: + """Creates a new Secret within the specified profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param secret_name: Name of the Secret under the profile. Required. + :type secret_name: str + :param secret: The Secret properties. Required. + :type secret: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns Secret. The Secret is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.Secret] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create( + self, + resource_group_name: str, + profile_name: str, + secret_name: str, + secret: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.Secret]: + """Creates a new Secret within the specified profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param secret_name: Name of the Secret under the profile. Required. + :type secret_name: str + :param secret: The Secret properties. Required. + :type secret: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns Secret. The Secret is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.Secret] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_create( + self, + resource_group_name: str, + profile_name: str, + secret_name: str, + secret: Union[_models.Secret, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.Secret]: + """Creates a new Secret within the specified profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param secret_name: Name of the Secret under the profile. Required. + :type secret_name: str + :param secret: The Secret properties. Is one of the following types: Secret, JSON, IO[bytes] + Required. + :type secret: ~azure.mgmt.cdn.models.Secret or JSON or IO[bytes] + :return: An instance of AsyncLROPoller that returns Secret. The Secret is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.Secret] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.Secret] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._create_initial( + resource_group_name=resource_group_name, + profile_name=profile_name, + secret_name=secret_name, + secret=secret, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.Secret, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.Secret].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.Secret]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _delete_initial( + self, resource_group_name: str, profile_name: str, secret_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_secrets_delete_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + secret_name=secret_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_delete( + self, resource_group_name: str, profile_name: str, secret_name: str, **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes an existing Secret within profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param secret_name: Name of the Secret under the profile. Required. + :type secret_name: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + profile_name=profile_name, + secret_name=secret_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_by_profile( + self, resource_group_name: str, profile_name: str, **kwargs: Any + ) -> AsyncItemPaged["_models.Secret"]: + """Lists existing AzureFrontDoor secrets. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :return: An iterator like instance of Secret + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cdn.models.Secret] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.Secret]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_secrets_list_by_profile_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.Secret], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class EndpointsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.cdn.aio.CdnClient`'s + :attr:`endpoints` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CdnClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, resource_group_name: str, profile_name: str, endpoint_name: str, **kwargs: Any + ) -> _models.Endpoint: + """Gets an existing CDN endpoint with the specified endpoint name under the specified + subscription, resource group and profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :return: Endpoint. The Endpoint is compatible with MutableMapping + :rtype: ~azure.mgmt.cdn.models.Endpoint + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.Endpoint] = kwargs.pop("cls", None) + + _request = build_endpoints_get_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.Endpoint, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + async def _create_initial( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + endpoint: Union[_models.Endpoint, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(endpoint, (IOBase, bytes)): + _content = endpoint + else: + _content = json.dumps(endpoint, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_endpoints_create_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 201: + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_create( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + endpoint: _models.Endpoint, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.Endpoint]: + """Creates a new CDN endpoint with the specified endpoint name under the specified subscription, + resource group and profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param endpoint: Endpoint properties. Required. + :type endpoint: ~azure.mgmt.cdn.models.Endpoint + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns Endpoint. The Endpoint is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.Endpoint] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + endpoint: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.Endpoint]: + """Creates a new CDN endpoint with the specified endpoint name under the specified subscription, + resource group and profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param endpoint: Endpoint properties. Required. + :type endpoint: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns Endpoint. The Endpoint is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.Endpoint] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + endpoint: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.Endpoint]: + """Creates a new CDN endpoint with the specified endpoint name under the specified subscription, + resource group and profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param endpoint: Endpoint properties. Required. + :type endpoint: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns Endpoint. The Endpoint is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.Endpoint] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_create( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + endpoint: Union[_models.Endpoint, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.Endpoint]: + """Creates a new CDN endpoint with the specified endpoint name under the specified subscription, + resource group and profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param endpoint: Endpoint properties. Is one of the following types: Endpoint, JSON, IO[bytes] + Required. + :type endpoint: ~azure.mgmt.cdn.models.Endpoint or JSON or IO[bytes] + :return: An instance of AsyncLROPoller that returns Endpoint. The Endpoint is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.Endpoint] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.Endpoint] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._create_initial( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + endpoint=endpoint, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.Endpoint, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.Endpoint].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.Endpoint]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _update_initial( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + endpoint_update_properties: Union[_models.EndpointUpdateParameters, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(endpoint_update_properties, (IOBase, bytes)): + _content = endpoint_update_properties + else: + _content = json.dumps(endpoint_update_properties, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_endpoints_update_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_update( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + endpoint_update_properties: _models.EndpointUpdateParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.Endpoint]: + """Updates an existing CDN endpoint with the specified endpoint name under the specified + subscription, resource group and profile. Only tags can be updated after creating an endpoint. + To update origins, use the Update Origin operation. To update origin groups, use the Update + Origin group operation. To update custom domains, use the Update Custom Domain operation. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param endpoint_update_properties: Endpoint update properties. Required. + :type endpoint_update_properties: ~azure.mgmt.cdn.models.EndpointUpdateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns Endpoint. The Endpoint is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.Endpoint] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + endpoint_update_properties: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.Endpoint]: + """Updates an existing CDN endpoint with the specified endpoint name under the specified + subscription, resource group and profile. Only tags can be updated after creating an endpoint. + To update origins, use the Update Origin operation. To update origin groups, use the Update + Origin group operation. To update custom domains, use the Update Custom Domain operation. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param endpoint_update_properties: Endpoint update properties. Required. + :type endpoint_update_properties: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns Endpoint. The Endpoint is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.Endpoint] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + endpoint_update_properties: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.Endpoint]: + """Updates an existing CDN endpoint with the specified endpoint name under the specified + subscription, resource group and profile. Only tags can be updated after creating an endpoint. + To update origins, use the Update Origin operation. To update origin groups, use the Update + Origin group operation. To update custom domains, use the Update Custom Domain operation. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param endpoint_update_properties: Endpoint update properties. Required. + :type endpoint_update_properties: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns Endpoint. The Endpoint is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.Endpoint] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_update( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + endpoint_update_properties: Union[_models.EndpointUpdateParameters, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.Endpoint]: + """Updates an existing CDN endpoint with the specified endpoint name under the specified + subscription, resource group and profile. Only tags can be updated after creating an endpoint. + To update origins, use the Update Origin operation. To update origin groups, use the Update + Origin group operation. To update custom domains, use the Update Custom Domain operation. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param endpoint_update_properties: Endpoint update properties. Is one of the following types: + EndpointUpdateParameters, JSON, IO[bytes] Required. + :type endpoint_update_properties: ~azure.mgmt.cdn.models.EndpointUpdateParameters or JSON or + IO[bytes] + :return: An instance of AsyncLROPoller that returns Endpoint. The Endpoint is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.Endpoint] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.Endpoint] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._update_initial( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + endpoint_update_properties=endpoint_update_properties, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.Endpoint, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.Endpoint].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.Endpoint]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _delete_initial( + self, resource_group_name: str, profile_name: str, endpoint_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_endpoints_delete_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_delete( + self, resource_group_name: str, profile_name: str, endpoint_name: str, **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes an existing CDN endpoint with the specified endpoint name under the specified + subscription, resource group and profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_by_profile( + self, resource_group_name: str, profile_name: str, **kwargs: Any + ) -> AsyncItemPaged["_models.Endpoint"]: + """Lists existing CDN endpoints. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :return: An iterator like instance of Endpoint + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cdn.models.Endpoint] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.Endpoint]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_endpoints_list_by_profile_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.Endpoint], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + async def _start_initial( + self, resource_group_name: str, profile_name: str, endpoint_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_endpoints_start_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_start( + self, resource_group_name: str, profile_name: str, endpoint_name: str, **kwargs: Any + ) -> AsyncLROPoller[_models.Endpoint]: + """Starts an existing CDN endpoint that is on a stopped state. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :return: An instance of AsyncLROPoller that returns Endpoint. The Endpoint is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.Endpoint] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.Endpoint] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._start_initial( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response_headers = {} + response = pipeline_response.http_response + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = _deserialize(_models.Endpoint, response.json()) + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.Endpoint].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.Endpoint]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _stop_initial( + self, resource_group_name: str, profile_name: str, endpoint_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_endpoints_stop_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_stop( + self, resource_group_name: str, profile_name: str, endpoint_name: str, **kwargs: Any + ) -> AsyncLROPoller[_models.Endpoint]: + """Stops an existing running CDN endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :return: An instance of AsyncLROPoller that returns Endpoint. The Endpoint is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.Endpoint] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.Endpoint] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._stop_initial( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response_headers = {} + response = pipeline_response.http_response + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = _deserialize(_models.Endpoint, response.json()) + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.Endpoint].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.Endpoint]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _purge_content_initial( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + content_file_paths: Union[_models.PurgeParameters, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(content_file_paths, (IOBase, bytes)): + _content = content_file_paths + else: + _content = json.dumps(content_file_paths, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_endpoints_purge_content_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_purge_content( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + content_file_paths: _models.PurgeParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Removes a content from CDN. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param content_file_paths: The path to the content to be purged. Path can be a full URL, e.g. + '/pictures/city.png' which removes a single file, or a directory with a wildcard, e.g. + '/pictures/*' which removes all folders and files in the directory. Required. + :type content_file_paths: ~azure.mgmt.cdn.models.PurgeParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_purge_content( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + content_file_paths: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Removes a content from CDN. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param content_file_paths: The path to the content to be purged. Path can be a full URL, e.g. + '/pictures/city.png' which removes a single file, or a directory with a wildcard, e.g. + '/pictures/*' which removes all folders and files in the directory. Required. + :type content_file_paths: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_purge_content( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + content_file_paths: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Removes a content from CDN. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param content_file_paths: The path to the content to be purged. Path can be a full URL, e.g. + '/pictures/city.png' which removes a single file, or a directory with a wildcard, e.g. + '/pictures/*' which removes all folders and files in the directory. Required. + :type content_file_paths: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_purge_content( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + content_file_paths: Union[_models.PurgeParameters, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Removes a content from CDN. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param content_file_paths: The path to the content to be purged. Path can be a full URL, e.g. + '/pictures/city.png' which removes a single file, or a directory with a wildcard, e.g. + '/pictures/*' which removes all folders and files in the directory. Is one of the following + types: PurgeParameters, JSON, IO[bytes] Required. + :type content_file_paths: ~azure.mgmt.cdn.models.PurgeParameters or JSON or IO[bytes] + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._purge_content_initial( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + content_file_paths=content_file_paths, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + async def _load_content_initial( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + content_file_paths: Union[_models.LoadParameters, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(content_file_paths, (IOBase, bytes)): + _content = content_file_paths + else: + _content = json.dumps(content_file_paths, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_endpoints_load_content_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_load_content( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + content_file_paths: _models.LoadParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Pre-loads a content to CDN. Available for Verizon Profiles. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param content_file_paths: The path to the content to be loaded. Path should be a full URL, + e.g. ‘/pictures/city.png' which loads a single file. Required. + :type content_file_paths: ~azure.mgmt.cdn.models.LoadParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_load_content( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + content_file_paths: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Pre-loads a content to CDN. Available for Verizon Profiles. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param content_file_paths: The path to the content to be loaded. Path should be a full URL, + e.g. ‘/pictures/city.png' which loads a single file. Required. + :type content_file_paths: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_load_content( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + content_file_paths: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Pre-loads a content to CDN. Available for Verizon Profiles. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param content_file_paths: The path to the content to be loaded. Path should be a full URL, + e.g. ‘/pictures/city.png' which loads a single file. Required. + :type content_file_paths: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_load_content( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + content_file_paths: Union[_models.LoadParameters, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Pre-loads a content to CDN. Available for Verizon Profiles. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param content_file_paths: The path to the content to be loaded. Path should be a full URL, + e.g. ‘/pictures/city.png' which loads a single file. Is one of the following types: + LoadParameters, JSON, IO[bytes] Required. + :type content_file_paths: ~azure.mgmt.cdn.models.LoadParameters or JSON or IO[bytes] + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._load_content_initial( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + content_file_paths=content_file_paths, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @overload + async def validate_custom_domain( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + custom_domain_properties: _models.ValidateCustomDomainInput, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ValidateCustomDomainOutput: + """Validates the custom domain mapping to ensure it maps to the correct CDN endpoint in DNS. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param custom_domain_properties: Custom domain to be validated. Required. + :type custom_domain_properties: ~azure.mgmt.cdn.models.ValidateCustomDomainInput + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ValidateCustomDomainOutput. The ValidateCustomDomainOutput is compatible with + MutableMapping + :rtype: ~azure.mgmt.cdn.models.ValidateCustomDomainOutput + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def validate_custom_domain( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + custom_domain_properties: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ValidateCustomDomainOutput: + """Validates the custom domain mapping to ensure it maps to the correct CDN endpoint in DNS. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param custom_domain_properties: Custom domain to be validated. Required. + :type custom_domain_properties: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ValidateCustomDomainOutput. The ValidateCustomDomainOutput is compatible with + MutableMapping + :rtype: ~azure.mgmt.cdn.models.ValidateCustomDomainOutput + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def validate_custom_domain( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + custom_domain_properties: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ValidateCustomDomainOutput: + """Validates the custom domain mapping to ensure it maps to the correct CDN endpoint in DNS. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param custom_domain_properties: Custom domain to be validated. Required. + :type custom_domain_properties: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: ValidateCustomDomainOutput. The ValidateCustomDomainOutput is compatible with + MutableMapping + :rtype: ~azure.mgmt.cdn.models.ValidateCustomDomainOutput + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def validate_custom_domain( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + custom_domain_properties: Union[_models.ValidateCustomDomainInput, JSON, IO[bytes]], + **kwargs: Any + ) -> _models.ValidateCustomDomainOutput: + """Validates the custom domain mapping to ensure it maps to the correct CDN endpoint in DNS. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param custom_domain_properties: Custom domain to be validated. Is one of the following types: + ValidateCustomDomainInput, JSON, IO[bytes] Required. + :type custom_domain_properties: ~azure.mgmt.cdn.models.ValidateCustomDomainInput or JSON or + IO[bytes] + :return: ValidateCustomDomainOutput. The ValidateCustomDomainOutput is compatible with + MutableMapping + :rtype: ~azure.mgmt.cdn.models.ValidateCustomDomainOutput + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ValidateCustomDomainOutput] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(custom_domain_properties, (IOBase, bytes)): + _content = custom_domain_properties + else: + _content = json.dumps(custom_domain_properties, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_endpoints_validate_custom_domain_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ValidateCustomDomainOutput, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def list_resource_usage( + self, resource_group_name: str, profile_name: str, endpoint_name: str, **kwargs: Any + ) -> AsyncItemPaged["_models.ResourceUsage"]: + """Checks the quota and usage of geo filters and custom domains under the given endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :return: An iterator like instance of ResourceUsage + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cdn.models.ResourceUsage] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.ResourceUsage]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_endpoints_list_resource_usage_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.ResourceUsage], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class OriginsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.cdn.aio.CdnClient`'s + :attr:`origins` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CdnClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, resource_group_name: str, profile_name: str, endpoint_name: str, origin_name: str, **kwargs: Any + ) -> _models.Origin: + """Gets an existing origin within an endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param origin_name: Name of the origin which is unique within the endpoint. Required. + :type origin_name: str + :return: Origin. The Origin is compatible with MutableMapping + :rtype: ~azure.mgmt.cdn.models.Origin + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.Origin] = kwargs.pop("cls", None) + + _request = build_origins_get_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + origin_name=origin_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.Origin, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + async def _create_initial( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + origin_name: str, + origin: Union[_models.Origin, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(origin, (IOBase, bytes)): + _content = origin + else: + _content = json.dumps(origin, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_origins_create_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + origin_name=origin_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 201: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_create( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + origin_name: str, + origin: _models.Origin, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.Origin]: + """Creates a new origin within the specified endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param origin_name: Name of the origin which is unique within the endpoint. Required. + :type origin_name: str + :param origin: Origin properties. Required. + :type origin: ~azure.mgmt.cdn.models.Origin + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns Origin. The Origin is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.Origin] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + origin_name: str, + origin: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.Origin]: + """Creates a new origin within the specified endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param origin_name: Name of the origin which is unique within the endpoint. Required. + :type origin_name: str + :param origin: Origin properties. Required. + :type origin: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns Origin. The Origin is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.Origin] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + origin_name: str, + origin: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.Origin]: + """Creates a new origin within the specified endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param origin_name: Name of the origin which is unique within the endpoint. Required. + :type origin_name: str + :param origin: Origin properties. Required. + :type origin: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns Origin. The Origin is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.Origin] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_create( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + origin_name: str, + origin: Union[_models.Origin, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.Origin]: + """Creates a new origin within the specified endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param origin_name: Name of the origin which is unique within the endpoint. Required. + :type origin_name: str + :param origin: Origin properties. Is one of the following types: Origin, JSON, IO[bytes] + Required. + :type origin: ~azure.mgmt.cdn.models.Origin or JSON or IO[bytes] + :return: An instance of AsyncLROPoller that returns Origin. The Origin is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.Origin] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.Origin] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._create_initial( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + origin_name=origin_name, + origin=origin, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.Origin, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.Origin].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.Origin]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _update_initial( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + origin_name: str, + origin_update_properties: Union[_models.OriginUpdateParameters, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(origin_update_properties, (IOBase, bytes)): + _content = origin_update_properties + else: + _content = json.dumps(origin_update_properties, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_origins_update_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + origin_name=origin_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_update( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + origin_name: str, + origin_update_properties: _models.OriginUpdateParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.Origin]: + """Updates an existing origin within an endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param origin_name: Name of the origin which is unique within the endpoint. Required. + :type origin_name: str + :param origin_update_properties: Origin properties. Required. + :type origin_update_properties: ~azure.mgmt.cdn.models.OriginUpdateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns Origin. The Origin is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.Origin] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + origin_name: str, + origin_update_properties: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.Origin]: + """Updates an existing origin within an endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param origin_name: Name of the origin which is unique within the endpoint. Required. + :type origin_name: str + :param origin_update_properties: Origin properties. Required. + :type origin_update_properties: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns Origin. The Origin is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.Origin] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + origin_name: str, + origin_update_properties: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.Origin]: + """Updates an existing origin within an endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param origin_name: Name of the origin which is unique within the endpoint. Required. + :type origin_name: str + :param origin_update_properties: Origin properties. Required. + :type origin_update_properties: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns Origin. The Origin is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.Origin] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_update( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + origin_name: str, + origin_update_properties: Union[_models.OriginUpdateParameters, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.Origin]: + """Updates an existing origin within an endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param origin_name: Name of the origin which is unique within the endpoint. Required. + :type origin_name: str + :param origin_update_properties: Origin properties. Is one of the following types: + OriginUpdateParameters, JSON, IO[bytes] Required. + :type origin_update_properties: ~azure.mgmt.cdn.models.OriginUpdateParameters or JSON or + IO[bytes] + :return: An instance of AsyncLROPoller that returns Origin. The Origin is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.Origin] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.Origin] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._update_initial( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + origin_name=origin_name, + origin_update_properties=origin_update_properties, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.Origin, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.Origin].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.Origin]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _delete_initial( + self, resource_group_name: str, profile_name: str, endpoint_name: str, origin_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_origins_delete_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + origin_name=origin_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_delete( + self, resource_group_name: str, profile_name: str, endpoint_name: str, origin_name: str, **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes an existing origin within an endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param origin_name: Name of the origin which is unique within the endpoint. Required. + :type origin_name: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + origin_name=origin_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_by_endpoint( + self, resource_group_name: str, profile_name: str, endpoint_name: str, **kwargs: Any + ) -> AsyncItemPaged["_models.Origin"]: + """Lists all of the existing origins within an endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :return: An iterator like instance of Origin + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cdn.models.Origin] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.Origin]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_origins_list_by_endpoint_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.Origin], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class OriginGroupsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.cdn.aio.CdnClient`'s + :attr:`origin_groups` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CdnClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, resource_group_name: str, profile_name: str, endpoint_name: str, origin_group_name: str, **kwargs: Any + ) -> _models.OriginGroup: + """Gets an existing origin group within an endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param origin_group_name: Name of the origin group which is unique within the endpoint. + Required. + :type origin_group_name: str + :return: OriginGroup. The OriginGroup is compatible with MutableMapping + :rtype: ~azure.mgmt.cdn.models.OriginGroup + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.OriginGroup] = kwargs.pop("cls", None) + + _request = build_origin_groups_get_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + origin_group_name=origin_group_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.OriginGroup, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + async def _create_initial( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + origin_group_name: str, + origin_group: Union[_models.OriginGroup, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(origin_group, (IOBase, bytes)): + _content = origin_group + else: + _content = json.dumps(origin_group, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_origin_groups_create_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + origin_group_name=origin_group_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 201: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_create( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + origin_group_name: str, + origin_group: _models.OriginGroup, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.OriginGroup]: + """Creates a new origin group within the specified endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param origin_group_name: Name of the origin group which is unique within the endpoint. + Required. + :type origin_group_name: str + :param origin_group: Origin group properties. Required. + :type origin_group: ~azure.mgmt.cdn.models.OriginGroup + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns OriginGroup. The OriginGroup is compatible + with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.OriginGroup] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + origin_group_name: str, + origin_group: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.OriginGroup]: + """Creates a new origin group within the specified endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param origin_group_name: Name of the origin group which is unique within the endpoint. + Required. + :type origin_group_name: str + :param origin_group: Origin group properties. Required. + :type origin_group: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns OriginGroup. The OriginGroup is compatible + with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.OriginGroup] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + origin_group_name: str, + origin_group: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.OriginGroup]: + """Creates a new origin group within the specified endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param origin_group_name: Name of the origin group which is unique within the endpoint. + Required. + :type origin_group_name: str + :param origin_group: Origin group properties. Required. + :type origin_group: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns OriginGroup. The OriginGroup is compatible + with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.OriginGroup] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_create( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + origin_group_name: str, + origin_group: Union[_models.OriginGroup, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.OriginGroup]: + """Creates a new origin group within the specified endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param origin_group_name: Name of the origin group which is unique within the endpoint. + Required. + :type origin_group_name: str + :param origin_group: Origin group properties. Is one of the following types: OriginGroup, JSON, + IO[bytes] Required. + :type origin_group: ~azure.mgmt.cdn.models.OriginGroup or JSON or IO[bytes] + :return: An instance of AsyncLROPoller that returns OriginGroup. The OriginGroup is compatible + with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.OriginGroup] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.OriginGroup] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._create_initial( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + origin_group_name=origin_group_name, + origin_group=origin_group, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.OriginGroup, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.OriginGroup].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.OriginGroup]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _update_initial( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + origin_group_name: str, + origin_group_update_properties: Union[_models.OriginGroupUpdateParameters, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(origin_group_update_properties, (IOBase, bytes)): + _content = origin_group_update_properties + else: + _content = json.dumps(origin_group_update_properties, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_origin_groups_update_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + origin_group_name=origin_group_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_update( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + origin_group_name: str, + origin_group_update_properties: _models.OriginGroupUpdateParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.OriginGroup]: + """Updates an existing origin group within an endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param origin_group_name: Name of the origin group which is unique within the endpoint. + Required. + :type origin_group_name: str + :param origin_group_update_properties: Origin group properties. Required. + :type origin_group_update_properties: ~azure.mgmt.cdn.models.OriginGroupUpdateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns OriginGroup. The OriginGroup is compatible + with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.OriginGroup] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + origin_group_name: str, + origin_group_update_properties: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.OriginGroup]: + """Updates an existing origin group within an endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param origin_group_name: Name of the origin group which is unique within the endpoint. + Required. + :type origin_group_name: str + :param origin_group_update_properties: Origin group properties. Required. + :type origin_group_update_properties: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns OriginGroup. The OriginGroup is compatible + with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.OriginGroup] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + origin_group_name: str, + origin_group_update_properties: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.OriginGroup]: + """Updates an existing origin group within an endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param origin_group_name: Name of the origin group which is unique within the endpoint. + Required. + :type origin_group_name: str + :param origin_group_update_properties: Origin group properties. Required. + :type origin_group_update_properties: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns OriginGroup. The OriginGroup is compatible + with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.OriginGroup] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_update( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + origin_group_name: str, + origin_group_update_properties: Union[_models.OriginGroupUpdateParameters, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.OriginGroup]: + """Updates an existing origin group within an endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param origin_group_name: Name of the origin group which is unique within the endpoint. + Required. + :type origin_group_name: str + :param origin_group_update_properties: Origin group properties. Is one of the following types: + OriginGroupUpdateParameters, JSON, IO[bytes] Required. + :type origin_group_update_properties: ~azure.mgmt.cdn.models.OriginGroupUpdateParameters or + JSON or IO[bytes] + :return: An instance of AsyncLROPoller that returns OriginGroup. The OriginGroup is compatible + with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.OriginGroup] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.OriginGroup] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._update_initial( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + origin_group_name=origin_group_name, + origin_group_update_properties=origin_group_update_properties, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.OriginGroup, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.OriginGroup].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.OriginGroup]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _delete_initial( + self, resource_group_name: str, profile_name: str, endpoint_name: str, origin_group_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_origin_groups_delete_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + origin_group_name=origin_group_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_delete( + self, resource_group_name: str, profile_name: str, endpoint_name: str, origin_group_name: str, **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes an existing origin group within an endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param origin_group_name: Name of the origin group which is unique within the endpoint. + Required. + :type origin_group_name: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + origin_group_name=origin_group_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_by_endpoint( + self, resource_group_name: str, profile_name: str, endpoint_name: str, **kwargs: Any + ) -> AsyncItemPaged["_models.OriginGroup"]: + """Lists all of the existing origin groups within an endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :return: An iterator like instance of OriginGroup + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cdn.models.OriginGroup] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.OriginGroup]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_origin_groups_list_by_endpoint_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.OriginGroup], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class CustomDomainsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.cdn.aio.CdnClient`'s + :attr:`custom_domains` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CdnClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, resource_group_name: str, profile_name: str, endpoint_name: str, custom_domain_name: str, **kwargs: Any + ) -> _models.CustomDomain: + """Gets an existing custom domain within an endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param custom_domain_name: Name of the custom domain within an endpoint. Required. + :type custom_domain_name: str + :return: CustomDomain. The CustomDomain is compatible with MutableMapping + :rtype: ~azure.mgmt.cdn.models.CustomDomain + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.CustomDomain] = kwargs.pop("cls", None) + + _request = build_custom_domains_get_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + custom_domain_name=custom_domain_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.CustomDomain, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + async def _create_initial( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + custom_domain_name: str, + custom_domain_properties: Union[_models.CustomDomainParameters, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(custom_domain_properties, (IOBase, bytes)): + _content = custom_domain_properties + else: + _content = json.dumps(custom_domain_properties, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_custom_domains_create_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + custom_domain_name=custom_domain_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 201: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_create( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + custom_domain_name: str, + custom_domain_properties: _models.CustomDomainParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.CustomDomain]: + """Creates a new custom domain within an endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param custom_domain_name: Name of the custom domain within an endpoint. Required. + :type custom_domain_name: str + :param custom_domain_properties: Properties required to create a new custom domain. Required. + :type custom_domain_properties: ~azure.mgmt.cdn.models.CustomDomainParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns CustomDomain. The CustomDomain is + compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.CustomDomain] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + custom_domain_name: str, + custom_domain_properties: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.CustomDomain]: + """Creates a new custom domain within an endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param custom_domain_name: Name of the custom domain within an endpoint. Required. + :type custom_domain_name: str + :param custom_domain_properties: Properties required to create a new custom domain. Required. + :type custom_domain_properties: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns CustomDomain. The CustomDomain is + compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.CustomDomain] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + custom_domain_name: str, + custom_domain_properties: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.CustomDomain]: + """Creates a new custom domain within an endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param custom_domain_name: Name of the custom domain within an endpoint. Required. + :type custom_domain_name: str + :param custom_domain_properties: Properties required to create a new custom domain. Required. + :type custom_domain_properties: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns CustomDomain. The CustomDomain is + compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.CustomDomain] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_create( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + custom_domain_name: str, + custom_domain_properties: Union[_models.CustomDomainParameters, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.CustomDomain]: + """Creates a new custom domain within an endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param custom_domain_name: Name of the custom domain within an endpoint. Required. + :type custom_domain_name: str + :param custom_domain_properties: Properties required to create a new custom domain. Is one of + the following types: CustomDomainParameters, JSON, IO[bytes] Required. + :type custom_domain_properties: ~azure.mgmt.cdn.models.CustomDomainParameters or JSON or + IO[bytes] + :return: An instance of AsyncLROPoller that returns CustomDomain. The CustomDomain is + compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.CustomDomain] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.CustomDomain] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._create_initial( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + custom_domain_name=custom_domain_name, + custom_domain_properties=custom_domain_properties, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.CustomDomain, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.CustomDomain].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.CustomDomain]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _delete_initial( + self, resource_group_name: str, profile_name: str, endpoint_name: str, custom_domain_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_custom_domains_delete_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + custom_domain_name=custom_domain_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_delete( + self, resource_group_name: str, profile_name: str, endpoint_name: str, custom_domain_name: str, **kwargs: Any + ) -> AsyncLROPoller[_models.CustomDomain]: + """Deletes an existing custom domain within an endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param custom_domain_name: Name of the custom domain within an endpoint. Required. + :type custom_domain_name: str + :return: An instance of AsyncLROPoller that returns CustomDomain. The CustomDomain is + compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.CustomDomain] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.CustomDomain] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + custom_domain_name=custom_domain_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.CustomDomain, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.CustomDomain].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.CustomDomain]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @distributed_trace + def list_by_endpoint( + self, resource_group_name: str, profile_name: str, endpoint_name: str, **kwargs: Any + ) -> AsyncItemPaged["_models.CustomDomain"]: + """Lists all of the existing custom domains within an endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :return: An iterator like instance of CustomDomain + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cdn.models.CustomDomain] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.CustomDomain]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_custom_domains_list_by_endpoint_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.CustomDomain], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + async def _disable_custom_https_initial( + self, resource_group_name: str, profile_name: str, endpoint_name: str, custom_domain_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_custom_domains_disable_custom_https_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + custom_domain_name=custom_domain_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_disable_custom_https( + self, resource_group_name: str, profile_name: str, endpoint_name: str, custom_domain_name: str, **kwargs: Any + ) -> AsyncLROPoller[_models.CustomDomain]: + """Disable https delivery of the custom domain. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param custom_domain_name: Name of the custom domain within an endpoint. Required. + :type custom_domain_name: str + :return: An instance of AsyncLROPoller that returns CustomDomain. The CustomDomain is + compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.CustomDomain] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.CustomDomain] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._disable_custom_https_initial( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + custom_domain_name=custom_domain_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.CustomDomain, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.CustomDomain].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.CustomDomain]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _enable_custom_https_initial( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + custom_domain_name: str, + custom_domain_https_parameters: Optional[Union[_models.CustomDomainHttpsParameters, JSON, IO[bytes]]] = None, + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + content_type = content_type if custom_domain_https_parameters else None + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" if custom_domain_https_parameters else None + _content = None + if isinstance(custom_domain_https_parameters, (IOBase, bytes)): + _content = custom_domain_https_parameters + else: + if custom_domain_https_parameters is not None: + _content = json.dumps(custom_domain_https_parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + else: + _content = None + + _request = build_custom_domains_enable_custom_https_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + custom_domain_name=custom_domain_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_enable_custom_https( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + custom_domain_name: str, + custom_domain_https_parameters: Optional[_models.CustomDomainHttpsParameters] = None, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.CustomDomain]: + """Enable https delivery of the custom domain. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param custom_domain_name: Name of the custom domain within an endpoint. Required. + :type custom_domain_name: str + :param custom_domain_https_parameters: The configuration specifying how to enable HTTPS for the + custom domain - using CDN managed certificate or user's own certificate. If not specified, + enabling ssl uses CDN managed certificate by default. Default value is None. + :type custom_domain_https_parameters: ~azure.mgmt.cdn.models.CustomDomainHttpsParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns CustomDomain. The CustomDomain is + compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.CustomDomain] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_enable_custom_https( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + custom_domain_name: str, + custom_domain_https_parameters: Optional[JSON] = None, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.CustomDomain]: + """Enable https delivery of the custom domain. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param custom_domain_name: Name of the custom domain within an endpoint. Required. + :type custom_domain_name: str + :param custom_domain_https_parameters: The configuration specifying how to enable HTTPS for the + custom domain - using CDN managed certificate or user's own certificate. If not specified, + enabling ssl uses CDN managed certificate by default. Default value is None. + :type custom_domain_https_parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns CustomDomain. The CustomDomain is + compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.CustomDomain] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_enable_custom_https( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + custom_domain_name: str, + custom_domain_https_parameters: Optional[IO[bytes]] = None, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.CustomDomain]: + """Enable https delivery of the custom domain. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param custom_domain_name: Name of the custom domain within an endpoint. Required. + :type custom_domain_name: str + :param custom_domain_https_parameters: The configuration specifying how to enable HTTPS for the + custom domain - using CDN managed certificate or user's own certificate. If not specified, + enabling ssl uses CDN managed certificate by default. Default value is None. + :type custom_domain_https_parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns CustomDomain. The CustomDomain is + compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.CustomDomain] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_enable_custom_https( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + custom_domain_name: str, + custom_domain_https_parameters: Optional[Union[_models.CustomDomainHttpsParameters, JSON, IO[bytes]]] = None, + **kwargs: Any + ) -> AsyncLROPoller[_models.CustomDomain]: + """Enable https delivery of the custom domain. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param custom_domain_name: Name of the custom domain within an endpoint. Required. + :type custom_domain_name: str + :param custom_domain_https_parameters: The configuration specifying how to enable HTTPS for the + custom domain - using CDN managed certificate or user's own certificate. If not specified, + enabling ssl uses CDN managed certificate by default. Is one of the following types: + CustomDomainHttpsParameters, JSON, IO[bytes] Default value is None. + :type custom_domain_https_parameters: ~azure.mgmt.cdn.models.CustomDomainHttpsParameters or + JSON or IO[bytes] + :return: An instance of AsyncLROPoller that returns CustomDomain. The CustomDomain is + compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.CustomDomain] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + content_type = content_type if custom_domain_https_parameters else None + cls: ClsType[_models.CustomDomain] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._enable_custom_https_initial( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + custom_domain_name=custom_domain_name, + custom_domain_https_parameters=custom_domain_https_parameters, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.CustomDomain, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.CustomDomain].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.CustomDomain]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + +class AFDCustomDomainsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.cdn.aio.CdnClient`'s + :attr:`afd_custom_domains` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CdnClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, resource_group_name: str, profile_name: str, custom_domain_name: str, **kwargs: Any + ) -> _models.AFDDomain: + """Gets an existing AzureFrontDoor domain with the specified domain name under the specified + subscription, resource group and profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param custom_domain_name: Name of the domain under the profile which is unique globally. + Required. + :type custom_domain_name: str + :return: AFDDomain. The AFDDomain is compatible with MutableMapping + :rtype: ~azure.mgmt.cdn.models.AFDDomain + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.AFDDomain] = kwargs.pop("cls", None) + + _request = build_afd_custom_domains_get_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + custom_domain_name=custom_domain_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.AFDDomain, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + async def _create_initial( + self, + resource_group_name: str, + profile_name: str, + custom_domain_name: str, + custom_domain: Union[_models.AFDDomain, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(custom_domain, (IOBase, bytes)): + _content = custom_domain + else: + _content = json.dumps(custom_domain, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_afd_custom_domains_create_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + custom_domain_name=custom_domain_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 201: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_create( + self, + resource_group_name: str, + profile_name: str, + custom_domain_name: str, + custom_domain: _models.AFDDomain, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.AFDDomain]: + """Creates a new domain within the specified profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param custom_domain_name: Name of the domain under the profile which is unique globally. + Required. + :type custom_domain_name: str + :param custom_domain: Domain properties. Required. + :type custom_domain: ~azure.mgmt.cdn.models.AFDDomain + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns AFDDomain. The AFDDomain is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.AFDDomain] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create( + self, + resource_group_name: str, + profile_name: str, + custom_domain_name: str, + custom_domain: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.AFDDomain]: + """Creates a new domain within the specified profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param custom_domain_name: Name of the domain under the profile which is unique globally. + Required. + :type custom_domain_name: str + :param custom_domain: Domain properties. Required. + :type custom_domain: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns AFDDomain. The AFDDomain is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.AFDDomain] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create( + self, + resource_group_name: str, + profile_name: str, + custom_domain_name: str, + custom_domain: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.AFDDomain]: + """Creates a new domain within the specified profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param custom_domain_name: Name of the domain under the profile which is unique globally. + Required. + :type custom_domain_name: str + :param custom_domain: Domain properties. Required. + :type custom_domain: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns AFDDomain. The AFDDomain is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.AFDDomain] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_create( + self, + resource_group_name: str, + profile_name: str, + custom_domain_name: str, + custom_domain: Union[_models.AFDDomain, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.AFDDomain]: + """Creates a new domain within the specified profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param custom_domain_name: Name of the domain under the profile which is unique globally. + Required. + :type custom_domain_name: str + :param custom_domain: Domain properties. Is one of the following types: AFDDomain, JSON, + IO[bytes] Required. + :type custom_domain: ~azure.mgmt.cdn.models.AFDDomain or JSON or IO[bytes] + :return: An instance of AsyncLROPoller that returns AFDDomain. The AFDDomain is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.AFDDomain] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.AFDDomain] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._create_initial( + resource_group_name=resource_group_name, + profile_name=profile_name, + custom_domain_name=custom_domain_name, + custom_domain=custom_domain, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.AFDDomain, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.AFDDomain].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.AFDDomain]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _update_initial( + self, + resource_group_name: str, + profile_name: str, + custom_domain_name: str, + custom_domain_update_properties: Union[_models.AFDDomainUpdateParameters, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(custom_domain_update_properties, (IOBase, bytes)): + _content = custom_domain_update_properties + else: + _content = json.dumps(custom_domain_update_properties, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_afd_custom_domains_update_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + custom_domain_name=custom_domain_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_update( + self, + resource_group_name: str, + profile_name: str, + custom_domain_name: str, + custom_domain_update_properties: _models.AFDDomainUpdateParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.AFDDomain]: + """Updates an existing domain within a profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param custom_domain_name: Name of the domain under the profile which is unique globally. + Required. + :type custom_domain_name: str + :param custom_domain_update_properties: Domain properties. Required. + :type custom_domain_update_properties: ~azure.mgmt.cdn.models.AFDDomainUpdateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns AFDDomain. The AFDDomain is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.AFDDomain] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update( + self, + resource_group_name: str, + profile_name: str, + custom_domain_name: str, + custom_domain_update_properties: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.AFDDomain]: + """Updates an existing domain within a profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param custom_domain_name: Name of the domain under the profile which is unique globally. + Required. + :type custom_domain_name: str + :param custom_domain_update_properties: Domain properties. Required. + :type custom_domain_update_properties: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns AFDDomain. The AFDDomain is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.AFDDomain] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update( + self, + resource_group_name: str, + profile_name: str, + custom_domain_name: str, + custom_domain_update_properties: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.AFDDomain]: + """Updates an existing domain within a profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param custom_domain_name: Name of the domain under the profile which is unique globally. + Required. + :type custom_domain_name: str + :param custom_domain_update_properties: Domain properties. Required. + :type custom_domain_update_properties: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns AFDDomain. The AFDDomain is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.AFDDomain] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_update( + self, + resource_group_name: str, + profile_name: str, + custom_domain_name: str, + custom_domain_update_properties: Union[_models.AFDDomainUpdateParameters, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.AFDDomain]: + """Updates an existing domain within a profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param custom_domain_name: Name of the domain under the profile which is unique globally. + Required. + :type custom_domain_name: str + :param custom_domain_update_properties: Domain properties. Is one of the following types: + AFDDomainUpdateParameters, JSON, IO[bytes] Required. + :type custom_domain_update_properties: ~azure.mgmt.cdn.models.AFDDomainUpdateParameters or JSON + or IO[bytes] + :return: An instance of AsyncLROPoller that returns AFDDomain. The AFDDomain is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.AFDDomain] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.AFDDomain] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._update_initial( + resource_group_name=resource_group_name, + profile_name=profile_name, + custom_domain_name=custom_domain_name, + custom_domain_update_properties=custom_domain_update_properties, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.AFDDomain, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.AFDDomain].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.AFDDomain]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _delete_initial( + self, resource_group_name: str, profile_name: str, custom_domain_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_afd_custom_domains_delete_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + custom_domain_name=custom_domain_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_delete( + self, resource_group_name: str, profile_name: str, custom_domain_name: str, **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes an existing AzureFrontDoor domain with the specified domain name under the specified + subscription, resource group and profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param custom_domain_name: Name of the domain under the profile which is unique globally. + Required. + :type custom_domain_name: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + profile_name=profile_name, + custom_domain_name=custom_domain_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_by_profile( + self, resource_group_name: str, profile_name: str, **kwargs: Any + ) -> AsyncItemPaged["_models.AFDDomain"]: + """Lists existing AzureFrontDoor domains. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :return: An iterator like instance of AFDDomain + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cdn.models.AFDDomain] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.AFDDomain]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_afd_custom_domains_list_by_profile_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.AFDDomain], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + async def _refresh_validation_token_initial( + self, resource_group_name: str, profile_name: str, custom_domain_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_afd_custom_domains_refresh_validation_token_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + custom_domain_name=custom_domain_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_refresh_validation_token( + self, resource_group_name: str, profile_name: str, custom_domain_name: str, **kwargs: Any + ) -> AsyncLROPoller[None]: + """Updates the domain validation token. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param custom_domain_name: Name of the domain under the profile which is unique globally. + Required. + :type custom_domain_name: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._refresh_validation_token_initial( + resource_group_name=resource_group_name, + profile_name=profile_name, + custom_domain_name=custom_domain_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + +class AFDProfilesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.cdn.aio.CdnClient`'s + :attr:`afd_profiles` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CdnClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @overload + async def check_endpoint_name_availability( + self, + resource_group_name: str, + profile_name: str, + check_endpoint_name_availability_input: _models.CheckEndpointNameAvailabilityInput, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CheckEndpointNameAvailabilityOutput: + """Check the availability of an afdx endpoint name, and return the globally unique endpoint host + name. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param check_endpoint_name_availability_input: Input to check. Required. + :type check_endpoint_name_availability_input: + ~azure.mgmt.cdn.models.CheckEndpointNameAvailabilityInput + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: CheckEndpointNameAvailabilityOutput. The CheckEndpointNameAvailabilityOutput is + compatible with MutableMapping + :rtype: ~azure.mgmt.cdn.models.CheckEndpointNameAvailabilityOutput + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def check_endpoint_name_availability( + self, + resource_group_name: str, + profile_name: str, + check_endpoint_name_availability_input: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CheckEndpointNameAvailabilityOutput: + """Check the availability of an afdx endpoint name, and return the globally unique endpoint host + name. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param check_endpoint_name_availability_input: Input to check. Required. + :type check_endpoint_name_availability_input: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: CheckEndpointNameAvailabilityOutput. The CheckEndpointNameAvailabilityOutput is + compatible with MutableMapping + :rtype: ~azure.mgmt.cdn.models.CheckEndpointNameAvailabilityOutput + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def check_endpoint_name_availability( + self, + resource_group_name: str, + profile_name: str, + check_endpoint_name_availability_input: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CheckEndpointNameAvailabilityOutput: + """Check the availability of an afdx endpoint name, and return the globally unique endpoint host + name. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param check_endpoint_name_availability_input: Input to check. Required. + :type check_endpoint_name_availability_input: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: CheckEndpointNameAvailabilityOutput. The CheckEndpointNameAvailabilityOutput is + compatible with MutableMapping + :rtype: ~azure.mgmt.cdn.models.CheckEndpointNameAvailabilityOutput + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def check_endpoint_name_availability( + self, + resource_group_name: str, + profile_name: str, + check_endpoint_name_availability_input: Union[_models.CheckEndpointNameAvailabilityInput, JSON, IO[bytes]], + **kwargs: Any + ) -> _models.CheckEndpointNameAvailabilityOutput: + """Check the availability of an afdx endpoint name, and return the globally unique endpoint host + name. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param check_endpoint_name_availability_input: Input to check. Is one of the following types: + CheckEndpointNameAvailabilityInput, JSON, IO[bytes] Required. + :type check_endpoint_name_availability_input: + ~azure.mgmt.cdn.models.CheckEndpointNameAvailabilityInput or JSON or IO[bytes] + :return: CheckEndpointNameAvailabilityOutput. The CheckEndpointNameAvailabilityOutput is + compatible with MutableMapping + :rtype: ~azure.mgmt.cdn.models.CheckEndpointNameAvailabilityOutput + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.CheckEndpointNameAvailabilityOutput] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(check_endpoint_name_availability_input, (IOBase, bytes)): + _content = check_endpoint_name_availability_input + else: + _content = json.dumps(check_endpoint_name_availability_input, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_afd_profiles_check_endpoint_name_availability_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.CheckEndpointNameAvailabilityOutput, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def list_resource_usage( + self, resource_group_name: str, profile_name: str, **kwargs: Any + ) -> AsyncItemPaged["_models.Usage"]: + """Checks the quota and actual usage of endpoints under the given Azure Front Door profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :return: An iterator like instance of Usage + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cdn.models.Usage] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.Usage]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_afd_profiles_list_resource_usage_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.Usage], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @overload + async def check_host_name_availability( + self, + resource_group_name: str, + profile_name: str, + check_host_name_availability_input: _models.CheckHostNameAvailabilityInput, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CheckNameAvailabilityOutput: + """Validates the custom domain mapping to ensure it maps to the correct Azure Front Door endpoint + in DNS. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param check_host_name_availability_input: Custom domain to be validated. Required. + :type check_host_name_availability_input: ~azure.mgmt.cdn.models.CheckHostNameAvailabilityInput + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: CheckNameAvailabilityOutput. The CheckNameAvailabilityOutput is compatible with + MutableMapping + :rtype: ~azure.mgmt.cdn.models.CheckNameAvailabilityOutput + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def check_host_name_availability( + self, + resource_group_name: str, + profile_name: str, + check_host_name_availability_input: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CheckNameAvailabilityOutput: + """Validates the custom domain mapping to ensure it maps to the correct Azure Front Door endpoint + in DNS. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param check_host_name_availability_input: Custom domain to be validated. Required. + :type check_host_name_availability_input: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: CheckNameAvailabilityOutput. The CheckNameAvailabilityOutput is compatible with + MutableMapping + :rtype: ~azure.mgmt.cdn.models.CheckNameAvailabilityOutput + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def check_host_name_availability( + self, + resource_group_name: str, + profile_name: str, + check_host_name_availability_input: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CheckNameAvailabilityOutput: + """Validates the custom domain mapping to ensure it maps to the correct Azure Front Door endpoint + in DNS. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param check_host_name_availability_input: Custom domain to be validated. Required. + :type check_host_name_availability_input: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: CheckNameAvailabilityOutput. The CheckNameAvailabilityOutput is compatible with + MutableMapping + :rtype: ~azure.mgmt.cdn.models.CheckNameAvailabilityOutput + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def check_host_name_availability( + self, + resource_group_name: str, + profile_name: str, + check_host_name_availability_input: Union[_models.CheckHostNameAvailabilityInput, JSON, IO[bytes]], + **kwargs: Any + ) -> _models.CheckNameAvailabilityOutput: + """Validates the custom domain mapping to ensure it maps to the correct Azure Front Door endpoint + in DNS. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param check_host_name_availability_input: Custom domain to be validated. Is one of the + following types: CheckHostNameAvailabilityInput, JSON, IO[bytes] Required. + :type check_host_name_availability_input: ~azure.mgmt.cdn.models.CheckHostNameAvailabilityInput + or JSON or IO[bytes] + :return: CheckNameAvailabilityOutput. The CheckNameAvailabilityOutput is compatible with + MutableMapping + :rtype: ~azure.mgmt.cdn.models.CheckNameAvailabilityOutput + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.CheckNameAvailabilityOutput] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(check_host_name_availability_input, (IOBase, bytes)): + _content = check_host_name_availability_input + else: + _content = json.dumps(check_host_name_availability_input, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_afd_profiles_check_host_name_availability_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.CheckNameAvailabilityOutput, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + async def validate_secret( + self, + resource_group_name: str, + profile_name: str, + validate_secret_input: _models.ValidateSecretInput, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ValidateSecretOutput: + """Validate a Secret in the profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param validate_secret_input: The Secret source. Required. + :type validate_secret_input: ~azure.mgmt.cdn.models.ValidateSecretInput + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ValidateSecretOutput. The ValidateSecretOutput is compatible with MutableMapping + :rtype: ~azure.mgmt.cdn.models.ValidateSecretOutput + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def validate_secret( + self, + resource_group_name: str, + profile_name: str, + validate_secret_input: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ValidateSecretOutput: + """Validate a Secret in the profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param validate_secret_input: The Secret source. Required. + :type validate_secret_input: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ValidateSecretOutput. The ValidateSecretOutput is compatible with MutableMapping + :rtype: ~azure.mgmt.cdn.models.ValidateSecretOutput + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def validate_secret( + self, + resource_group_name: str, + profile_name: str, + validate_secret_input: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ValidateSecretOutput: + """Validate a Secret in the profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param validate_secret_input: The Secret source. Required. + :type validate_secret_input: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: ValidateSecretOutput. The ValidateSecretOutput is compatible with MutableMapping + :rtype: ~azure.mgmt.cdn.models.ValidateSecretOutput + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def validate_secret( + self, + resource_group_name: str, + profile_name: str, + validate_secret_input: Union[_models.ValidateSecretInput, JSON, IO[bytes]], + **kwargs: Any + ) -> _models.ValidateSecretOutput: + """Validate a Secret in the profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param validate_secret_input: The Secret source. Is one of the following types: + ValidateSecretInput, JSON, IO[bytes] Required. + :type validate_secret_input: ~azure.mgmt.cdn.models.ValidateSecretInput or JSON or IO[bytes] + :return: ValidateSecretOutput. The ValidateSecretOutput is compatible with MutableMapping + :rtype: ~azure.mgmt.cdn.models.ValidateSecretOutput + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ValidateSecretOutput] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(validate_secret_input, (IOBase, bytes)): + _content = validate_secret_input + else: + _content = json.dumps(validate_secret_input, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_afd_profiles_validate_secret_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ValidateSecretOutput, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + async def _upgrade_initial( + self, + resource_group_name: str, + profile_name: str, + profile_upgrade_parameters: Union[_models.ProfileUpgradeParameters, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(profile_upgrade_parameters, (IOBase, bytes)): + _content = profile_upgrade_parameters + else: + _content = json.dumps(profile_upgrade_parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_afd_profiles_upgrade_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_upgrade( + self, + resource_group_name: str, + profile_name: str, + profile_upgrade_parameters: _models.ProfileUpgradeParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.Profile]: + """Upgrade a profile from Standard_AzureFrontDoor to Premium_AzureFrontDoor. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param profile_upgrade_parameters: Profile upgrade input parameter. Required. + :type profile_upgrade_parameters: ~azure.mgmt.cdn.models.ProfileUpgradeParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns Profile. The Profile is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.Profile] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_upgrade( + self, + resource_group_name: str, + profile_name: str, + profile_upgrade_parameters: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.Profile]: + """Upgrade a profile from Standard_AzureFrontDoor to Premium_AzureFrontDoor. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param profile_upgrade_parameters: Profile upgrade input parameter. Required. + :type profile_upgrade_parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns Profile. The Profile is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.Profile] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_upgrade( + self, + resource_group_name: str, + profile_name: str, + profile_upgrade_parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.Profile]: + """Upgrade a profile from Standard_AzureFrontDoor to Premium_AzureFrontDoor. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param profile_upgrade_parameters: Profile upgrade input parameter. Required. + :type profile_upgrade_parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns Profile. The Profile is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.Profile] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_upgrade( + self, + resource_group_name: str, + profile_name: str, + profile_upgrade_parameters: Union[_models.ProfileUpgradeParameters, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.Profile]: + """Upgrade a profile from Standard_AzureFrontDoor to Premium_AzureFrontDoor. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param profile_upgrade_parameters: Profile upgrade input parameter. Is one of the following + types: ProfileUpgradeParameters, JSON, IO[bytes] Required. + :type profile_upgrade_parameters: ~azure.mgmt.cdn.models.ProfileUpgradeParameters or JSON or + IO[bytes] + :return: An instance of AsyncLROPoller that returns Profile. The Profile is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.Profile] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.Profile] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._upgrade_initial( + resource_group_name=resource_group_name, + profile_name=profile_name, + profile_upgrade_parameters=profile_upgrade_parameters, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.Profile, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.Profile].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.Profile]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + +class LogAnalyticsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.cdn.aio.CdnClient`'s + :attr:`log_analytics` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CdnClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get_log_analytics_metrics( + self, + resource_group_name: str, + profile_name: str, + *, + metrics: List[Union[str, _models.LogMetric]], + date_time_begin: datetime.datetime, + date_time_end: datetime.datetime, + granularity: Union[str, _models.LogMetricsGranularity], + custom_domains: List[str], + protocols: List[str], + group_by: Optional[List[Union[str, _models.LogMetricsGroupBy]]] = None, + continents: Optional[List[str]] = None, + country_or_regions: Optional[List[str]] = None, + **kwargs: Any + ) -> _models.MetricsResponse: + """Get log report for AFD profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :keyword metrics: Required. + :paramtype metrics: list[str or ~azure.mgmt.cdn.models.LogMetric] + :keyword date_time_begin: Required. + :paramtype date_time_begin: ~datetime.datetime + :keyword date_time_end: Required. + :paramtype date_time_end: ~datetime.datetime + :keyword granularity: Known values are: "PT5M", "PT1H", and "P1D". Required. + :paramtype granularity: str or ~azure.mgmt.cdn.models.LogMetricsGranularity + :keyword custom_domains: Required. + :paramtype custom_domains: list[str] + :keyword protocols: Required. + :paramtype protocols: list[str] + :keyword group_by: Default value is None. + :paramtype group_by: list[str or ~azure.mgmt.cdn.models.LogMetricsGroupBy] + :keyword continents: Default value is None. + :paramtype continents: list[str] + :keyword country_or_regions: Default value is None. + :paramtype country_or_regions: list[str] + :return: MetricsResponse. The MetricsResponse is compatible with MutableMapping + :rtype: ~azure.mgmt.cdn.models.MetricsResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.MetricsResponse] = kwargs.pop("cls", None) + + _request = build_log_analytics_get_log_analytics_metrics_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + subscription_id=self._config.subscription_id, + metrics=metrics, + date_time_begin=date_time_begin, + date_time_end=date_time_end, + granularity=granularity, + custom_domains=custom_domains, + protocols=protocols, + group_by=group_by, + continents=continents, + country_or_regions=country_or_regions, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.MetricsResponse, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def get_log_analytics_rankings( + self, + resource_group_name: str, + profile_name: str, + *, + rankings: List[Union[str, _models.LogRanking]], + metrics: List[Union[str, _models.LogRankingMetric]], + max_ranking: int, + date_time_begin: datetime.datetime, + date_time_end: datetime.datetime, + custom_domains: Optional[List[str]] = None, + **kwargs: Any + ) -> _models.RankingsResponse: + """Get log analytics ranking report for AFD profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :keyword rankings: Required. + :paramtype rankings: list[str or ~azure.mgmt.cdn.models.LogRanking] + :keyword metrics: Required. + :paramtype metrics: list[str or ~azure.mgmt.cdn.models.LogRankingMetric] + :keyword max_ranking: Required. + :paramtype max_ranking: int + :keyword date_time_begin: Required. + :paramtype date_time_begin: ~datetime.datetime + :keyword date_time_end: Required. + :paramtype date_time_end: ~datetime.datetime + :keyword custom_domains: Default value is None. + :paramtype custom_domains: list[str] + :return: RankingsResponse. The RankingsResponse is compatible with MutableMapping + :rtype: ~azure.mgmt.cdn.models.RankingsResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.RankingsResponse] = kwargs.pop("cls", None) + + _request = build_log_analytics_get_log_analytics_rankings_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + subscription_id=self._config.subscription_id, + rankings=rankings, + metrics=metrics, + max_ranking=max_ranking, + date_time_begin=date_time_begin, + date_time_end=date_time_end, + custom_domains=custom_domains, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.RankingsResponse, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def get_log_analytics_locations( + self, resource_group_name: str, profile_name: str, **kwargs: Any + ) -> _models.ContinentsResponse: + """Get all available location names for AFD log analytics report. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :return: ContinentsResponse. The ContinentsResponse is compatible with MutableMapping + :rtype: ~azure.mgmt.cdn.models.ContinentsResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.ContinentsResponse] = kwargs.pop("cls", None) + + _request = build_log_analytics_get_log_analytics_locations_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ContinentsResponse, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def get_log_analytics_resources( + self, resource_group_name: str, profile_name: str, **kwargs: Any + ) -> _models.ResourcesResponse: + """Get all endpoints and custom domains available for AFD log report. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :return: ResourcesResponse. The ResourcesResponse is compatible with MutableMapping + :rtype: ~azure.mgmt.cdn.models.ResourcesResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.ResourcesResponse] = kwargs.pop("cls", None) + + _request = build_log_analytics_get_log_analytics_resources_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ResourcesResponse, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def get_waf_log_analytics_metrics( + self, + resource_group_name: str, + profile_name: str, + *, + metrics: List[Union[str, _models.WafMetric]], + date_time_begin: datetime.datetime, + date_time_end: datetime.datetime, + granularity: Union[str, _models.WafGranularity], + actions: Optional[List[Union[str, _models.WafAction]]] = None, + group_by: Optional[List[Union[str, _models.WafRankingGroupBy]]] = None, + rule_types: Optional[List[Union[str, _models.WafRuleType]]] = None, + **kwargs: Any + ) -> _models.WafMetricsResponse: + """Get Waf related log analytics report for AFD profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :keyword metrics: Required. + :paramtype metrics: list[str or ~azure.mgmt.cdn.models.WafMetric] + :keyword date_time_begin: Required. + :paramtype date_time_begin: ~datetime.datetime + :keyword date_time_end: Required. + :paramtype date_time_end: ~datetime.datetime + :keyword granularity: Known values are: "PT5M", "PT1H", and "P1D". Required. + :paramtype granularity: str or ~azure.mgmt.cdn.models.WafGranularity + :keyword actions: Default value is None. + :paramtype actions: list[str or ~azure.mgmt.cdn.models.WafAction] + :keyword group_by: Default value is None. + :paramtype group_by: list[str or ~azure.mgmt.cdn.models.WafRankingGroupBy] + :keyword rule_types: Default value is None. + :paramtype rule_types: list[str or ~azure.mgmt.cdn.models.WafRuleType] + :return: WafMetricsResponse. The WafMetricsResponse is compatible with MutableMapping + :rtype: ~azure.mgmt.cdn.models.WafMetricsResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.WafMetricsResponse] = kwargs.pop("cls", None) + + _request = build_log_analytics_get_waf_log_analytics_metrics_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + subscription_id=self._config.subscription_id, + metrics=metrics, + date_time_begin=date_time_begin, + date_time_end=date_time_end, + granularity=granularity, + actions=actions, + group_by=group_by, + rule_types=rule_types, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.WafMetricsResponse, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def get_waf_log_analytics_rankings( + self, + resource_group_name: str, + profile_name: str, + *, + metrics: List[Union[str, _models.WafMetric]], + date_time_begin: datetime.datetime, + date_time_end: datetime.datetime, + max_ranking: int, + rankings: List[Union[str, _models.WafRankingType]], + actions: Optional[List[Union[str, _models.WafAction]]] = None, + rule_types: Optional[List[Union[str, _models.WafRuleType]]] = None, + **kwargs: Any + ) -> _models.WafRankingsResponse: + """Get WAF log analytics charts for AFD profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :keyword metrics: Required. + :paramtype metrics: list[str or ~azure.mgmt.cdn.models.WafMetric] + :keyword date_time_begin: Required. + :paramtype date_time_begin: ~datetime.datetime + :keyword date_time_end: Required. + :paramtype date_time_end: ~datetime.datetime + :keyword max_ranking: Required. + :paramtype max_ranking: int + :keyword rankings: Required. + :paramtype rankings: list[str or ~azure.mgmt.cdn.models.WafRankingType] + :keyword actions: Default value is None. + :paramtype actions: list[str or ~azure.mgmt.cdn.models.WafAction] + :keyword rule_types: Default value is None. + :paramtype rule_types: list[str or ~azure.mgmt.cdn.models.WafRuleType] + :return: WafRankingsResponse. The WafRankingsResponse is compatible with MutableMapping + :rtype: ~azure.mgmt.cdn.models.WafRankingsResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.WafRankingsResponse] = kwargs.pop("cls", None) + + _request = build_log_analytics_get_waf_log_analytics_rankings_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + subscription_id=self._config.subscription_id, + metrics=metrics, + date_time_begin=date_time_begin, + date_time_end=date_time_end, + max_ranking=max_ranking, + rankings=rankings, + actions=actions, + rule_types=rule_types, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.WafRankingsResponse, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + +class PoliciesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.cdn.aio.CdnClient`'s + :attr:`policies` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CdnClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, resource_group_name: str, policy_name: str, **kwargs: Any + ) -> _models.CdnWebApplicationFirewallPolicy: + """Retrieve protection policy with specified name within a resource group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param policy_name: The name of the CdnWebApplicationFirewallPolicy. Required. + :type policy_name: str + :return: CdnWebApplicationFirewallPolicy. The CdnWebApplicationFirewallPolicy is compatible + with MutableMapping + :rtype: ~azure.mgmt.cdn.models.CdnWebApplicationFirewallPolicy + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.CdnWebApplicationFirewallPolicy] = kwargs.pop("cls", None) + + _request = build_policies_get_request( + resource_group_name=resource_group_name, + policy_name=policy_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.CdnWebApplicationFirewallPolicy, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + async def _create_or_update_initial( + self, + resource_group_name: str, + policy_name: str, + cdn_web_application_firewall_policy: Union[_models.CdnWebApplicationFirewallPolicy, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(cdn_web_application_firewall_policy, (IOBase, bytes)): + _content = cdn_web_application_firewall_policy + else: + _content = json.dumps(cdn_web_application_firewall_policy, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_policies_create_or_update_request( + resource_group_name=resource_group_name, + policy_name=policy_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 201: + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + policy_name: str, + cdn_web_application_firewall_policy: _models.CdnWebApplicationFirewallPolicy, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.CdnWebApplicationFirewallPolicy]: + """Create or update policy with specified rule set name within a resource group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param policy_name: The name of the CdnWebApplicationFirewallPolicy. Required. + :type policy_name: str + :param cdn_web_application_firewall_policy: Policy to be created. Required. + :type cdn_web_application_firewall_policy: + ~azure.mgmt.cdn.models.CdnWebApplicationFirewallPolicy + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns CdnWebApplicationFirewallPolicy. The + CdnWebApplicationFirewallPolicy is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.CdnWebApplicationFirewallPolicy] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + policy_name: str, + cdn_web_application_firewall_policy: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.CdnWebApplicationFirewallPolicy]: + """Create or update policy with specified rule set name within a resource group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param policy_name: The name of the CdnWebApplicationFirewallPolicy. Required. + :type policy_name: str + :param cdn_web_application_firewall_policy: Policy to be created. Required. + :type cdn_web_application_firewall_policy: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns CdnWebApplicationFirewallPolicy. The + CdnWebApplicationFirewallPolicy is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.CdnWebApplicationFirewallPolicy] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + policy_name: str, + cdn_web_application_firewall_policy: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.CdnWebApplicationFirewallPolicy]: + """Create or update policy with specified rule set name within a resource group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param policy_name: The name of the CdnWebApplicationFirewallPolicy. Required. + :type policy_name: str + :param cdn_web_application_firewall_policy: Policy to be created. Required. + :type cdn_web_application_firewall_policy: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns CdnWebApplicationFirewallPolicy. The + CdnWebApplicationFirewallPolicy is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.CdnWebApplicationFirewallPolicy] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_create_or_update( + self, + resource_group_name: str, + policy_name: str, + cdn_web_application_firewall_policy: Union[_models.CdnWebApplicationFirewallPolicy, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.CdnWebApplicationFirewallPolicy]: + """Create or update policy with specified rule set name within a resource group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param policy_name: The name of the CdnWebApplicationFirewallPolicy. Required. + :type policy_name: str + :param cdn_web_application_firewall_policy: Policy to be created. Is one of the following + types: CdnWebApplicationFirewallPolicy, JSON, IO[bytes] Required. + :type cdn_web_application_firewall_policy: + ~azure.mgmt.cdn.models.CdnWebApplicationFirewallPolicy or JSON or IO[bytes] + :return: An instance of AsyncLROPoller that returns CdnWebApplicationFirewallPolicy. The + CdnWebApplicationFirewallPolicy is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.CdnWebApplicationFirewallPolicy] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.CdnWebApplicationFirewallPolicy] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + policy_name=policy_name, + cdn_web_application_firewall_policy=cdn_web_application_firewall_policy, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.CdnWebApplicationFirewallPolicy, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.CdnWebApplicationFirewallPolicy].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.CdnWebApplicationFirewallPolicy]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _update_initial( + self, + resource_group_name: str, + policy_name: str, + cdn_web_application_firewall_policy_patch_parameters: Union[ + _models.CdnWebApplicationFirewallPolicyPatchParameters, JSON, IO[bytes] + ], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(cdn_web_application_firewall_policy_patch_parameters, (IOBase, bytes)): + _content = cdn_web_application_firewall_policy_patch_parameters + else: + _content = json.dumps(cdn_web_application_firewall_policy_patch_parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_policies_update_request( + resource_group_name=resource_group_name, + policy_name=policy_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_update( + self, + resource_group_name: str, + policy_name: str, + cdn_web_application_firewall_policy_patch_parameters: _models.CdnWebApplicationFirewallPolicyPatchParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.CdnWebApplicationFirewallPolicy]: + """Update an existing CdnWebApplicationFirewallPolicy with the specified policy name under the + specified subscription and resource group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param policy_name: The name of the CdnWebApplicationFirewallPolicy. Required. + :type policy_name: str + :param cdn_web_application_firewall_policy_patch_parameters: CdnWebApplicationFirewallPolicy + parameters to be patched. Required. + :type cdn_web_application_firewall_policy_patch_parameters: + ~azure.mgmt.cdn.models.CdnWebApplicationFirewallPolicyPatchParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns CdnWebApplicationFirewallPolicy. The + CdnWebApplicationFirewallPolicy is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.CdnWebApplicationFirewallPolicy] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update( + self, + resource_group_name: str, + policy_name: str, + cdn_web_application_firewall_policy_patch_parameters: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.CdnWebApplicationFirewallPolicy]: + """Update an existing CdnWebApplicationFirewallPolicy with the specified policy name under the + specified subscription and resource group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param policy_name: The name of the CdnWebApplicationFirewallPolicy. Required. + :type policy_name: str + :param cdn_web_application_firewall_policy_patch_parameters: CdnWebApplicationFirewallPolicy + parameters to be patched. Required. + :type cdn_web_application_firewall_policy_patch_parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns CdnWebApplicationFirewallPolicy. The + CdnWebApplicationFirewallPolicy is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.CdnWebApplicationFirewallPolicy] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update( + self, + resource_group_name: str, + policy_name: str, + cdn_web_application_firewall_policy_patch_parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.CdnWebApplicationFirewallPolicy]: + """Update an existing CdnWebApplicationFirewallPolicy with the specified policy name under the + specified subscription and resource group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param policy_name: The name of the CdnWebApplicationFirewallPolicy. Required. + :type policy_name: str + :param cdn_web_application_firewall_policy_patch_parameters: CdnWebApplicationFirewallPolicy + parameters to be patched. Required. + :type cdn_web_application_firewall_policy_patch_parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns CdnWebApplicationFirewallPolicy. The + CdnWebApplicationFirewallPolicy is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.CdnWebApplicationFirewallPolicy] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_update( + self, + resource_group_name: str, + policy_name: str, + cdn_web_application_firewall_policy_patch_parameters: Union[ + _models.CdnWebApplicationFirewallPolicyPatchParameters, JSON, IO[bytes] + ], + **kwargs: Any + ) -> AsyncLROPoller[_models.CdnWebApplicationFirewallPolicy]: + """Update an existing CdnWebApplicationFirewallPolicy with the specified policy name under the + specified subscription and resource group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param policy_name: The name of the CdnWebApplicationFirewallPolicy. Required. + :type policy_name: str + :param cdn_web_application_firewall_policy_patch_parameters: CdnWebApplicationFirewallPolicy + parameters to be patched. Is one of the following types: + CdnWebApplicationFirewallPolicyPatchParameters, JSON, IO[bytes] Required. + :type cdn_web_application_firewall_policy_patch_parameters: + ~azure.mgmt.cdn.models.CdnWebApplicationFirewallPolicyPatchParameters or JSON or IO[bytes] + :return: An instance of AsyncLROPoller that returns CdnWebApplicationFirewallPolicy. The + CdnWebApplicationFirewallPolicy is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.CdnWebApplicationFirewallPolicy] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.CdnWebApplicationFirewallPolicy] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._update_initial( + resource_group_name=resource_group_name, + policy_name=policy_name, + cdn_web_application_firewall_policy_patch_parameters=cdn_web_application_firewall_policy_patch_parameters, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.CdnWebApplicationFirewallPolicy, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.CdnWebApplicationFirewallPolicy].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.CdnWebApplicationFirewallPolicy]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @distributed_trace_async + async def delete(self, resource_group_name: str, policy_name: str, **kwargs: Any) -> None: + """Deletes Policy. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param policy_name: The name of the CdnWebApplicationFirewallPolicy. Required. + :type policy_name: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_policies_delete_request( + resource_group_name=resource_group_name, + policy_name=policy_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list( + self, resource_group_name: str, **kwargs: Any + ) -> AsyncItemPaged["_models.CdnWebApplicationFirewallPolicy"]: + """Lists all of the protection policies within a resource group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: An iterator like instance of CdnWebApplicationFirewallPolicy + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cdn.models.CdnWebApplicationFirewallPolicy] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.CdnWebApplicationFirewallPolicy]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_policies_list_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.CdnWebApplicationFirewallPolicy], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class ResourceUsageOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.cdn.aio.CdnClient`'s + :attr:`resource_usage` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CdnClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list(self, **kwargs: Any) -> AsyncItemPaged["_models.ResourceUsage"]: + """Check the quota and actual usage of the CDN profiles under the given subscription. + + :return: An iterator like instance of ResourceUsage + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cdn.models.ResourceUsage] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.ResourceUsage]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_resource_usage_list_request( + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.ResourceUsage], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class EdgeNodesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.cdn.aio.CdnClient`'s + :attr:`edge_nodes` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CdnClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list(self, **kwargs: Any) -> AsyncItemPaged["_models.EdgeNode"]: + """Edgenodes are the global Point of Presence (POP) locations used to deliver CDN content to end + users. + + :return: An iterator like instance of EdgeNode + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cdn.models.EdgeNode] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.EdgeNode]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_edge_nodes_list_request( + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.EdgeNode], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class ManagedRuleSetsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.cdn.aio.CdnClient`'s + :attr:`managed_rule_sets` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CdnClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list(self, **kwargs: Any) -> AsyncItemPaged["_models.ManagedRuleSetDefinition"]: + """Lists all available managed rule sets. + + :return: An iterator like instance of ManagedRuleSetDefinition + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cdn.models.ManagedRuleSetDefinition] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.ManagedRuleSetDefinition]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_managed_rule_sets_list_request( + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.ManagedRuleSetDefinition], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class _CdnClientOperationsMixin( + ClientMixinABC[AsyncPipelineClient[HttpRequest, AsyncHttpResponse], CdnClientConfiguration] +): + + @overload + async def check_endpoint_name_availability( + self, + resource_group_name: str, + check_endpoint_name_availability_input: _models.CheckEndpointNameAvailabilityInput, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CheckEndpointNameAvailabilityOutput: + """Check the availability of a resource name. This is needed for resources where name is globally + unique, such as a afdx endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param check_endpoint_name_availability_input: Input to check. Required. + :type check_endpoint_name_availability_input: + ~azure.mgmt.cdn.models.CheckEndpointNameAvailabilityInput + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: CheckEndpointNameAvailabilityOutput. The CheckEndpointNameAvailabilityOutput is + compatible with MutableMapping + :rtype: ~azure.mgmt.cdn.models.CheckEndpointNameAvailabilityOutput + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def check_endpoint_name_availability( + self, + resource_group_name: str, + check_endpoint_name_availability_input: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CheckEndpointNameAvailabilityOutput: + """Check the availability of a resource name. This is needed for resources where name is globally + unique, such as a afdx endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param check_endpoint_name_availability_input: Input to check. Required. + :type check_endpoint_name_availability_input: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: CheckEndpointNameAvailabilityOutput. The CheckEndpointNameAvailabilityOutput is + compatible with MutableMapping + :rtype: ~azure.mgmt.cdn.models.CheckEndpointNameAvailabilityOutput + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def check_endpoint_name_availability( + self, + resource_group_name: str, + check_endpoint_name_availability_input: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CheckEndpointNameAvailabilityOutput: + """Check the availability of a resource name. This is needed for resources where name is globally + unique, such as a afdx endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param check_endpoint_name_availability_input: Input to check. Required. + :type check_endpoint_name_availability_input: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: CheckEndpointNameAvailabilityOutput. The CheckEndpointNameAvailabilityOutput is + compatible with MutableMapping + :rtype: ~azure.mgmt.cdn.models.CheckEndpointNameAvailabilityOutput + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def check_endpoint_name_availability( + self, + resource_group_name: str, + check_endpoint_name_availability_input: Union[_models.CheckEndpointNameAvailabilityInput, JSON, IO[bytes]], + **kwargs: Any + ) -> _models.CheckEndpointNameAvailabilityOutput: + """Check the availability of a resource name. This is needed for resources where name is globally + unique, such as a afdx endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param check_endpoint_name_availability_input: Input to check. Is one of the following types: + CheckEndpointNameAvailabilityInput, JSON, IO[bytes] Required. + :type check_endpoint_name_availability_input: + ~azure.mgmt.cdn.models.CheckEndpointNameAvailabilityInput or JSON or IO[bytes] + :return: CheckEndpointNameAvailabilityOutput. The CheckEndpointNameAvailabilityOutput is + compatible with MutableMapping + :rtype: ~azure.mgmt.cdn.models.CheckEndpointNameAvailabilityOutput + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.CheckEndpointNameAvailabilityOutput] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(check_endpoint_name_availability_input, (IOBase, bytes)): + _content = check_endpoint_name_availability_input + else: + _content = json.dumps(check_endpoint_name_availability_input, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_cdn_check_endpoint_name_availability_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.CheckEndpointNameAvailabilityOutput, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + async def check_name_availability( + self, + check_name_availability_input: _models.CheckNameAvailabilityInput, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CheckNameAvailabilityOutput: + """Check the availability of a resource name. This is needed for resources where name is globally + unique, such as a CDN endpoint. + + :param check_name_availability_input: The request body. Required. + :type check_name_availability_input: ~azure.mgmt.cdn.models.CheckNameAvailabilityInput + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: CheckNameAvailabilityOutput. The CheckNameAvailabilityOutput is compatible with + MutableMapping + :rtype: ~azure.mgmt.cdn.models.CheckNameAvailabilityOutput + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def check_name_availability( + self, check_name_availability_input: JSON, *, content_type: str = "application/json", **kwargs: Any + ) -> _models.CheckNameAvailabilityOutput: + """Check the availability of a resource name. This is needed for resources where name is globally + unique, such as a CDN endpoint. + + :param check_name_availability_input: The request body. Required. + :type check_name_availability_input: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: CheckNameAvailabilityOutput. The CheckNameAvailabilityOutput is compatible with + MutableMapping + :rtype: ~azure.mgmt.cdn.models.CheckNameAvailabilityOutput + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def check_name_availability( + self, check_name_availability_input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any + ) -> _models.CheckNameAvailabilityOutput: + """Check the availability of a resource name. This is needed for resources where name is globally + unique, such as a CDN endpoint. + + :param check_name_availability_input: The request body. Required. + :type check_name_availability_input: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: CheckNameAvailabilityOutput. The CheckNameAvailabilityOutput is compatible with + MutableMapping + :rtype: ~azure.mgmt.cdn.models.CheckNameAvailabilityOutput + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def check_name_availability( + self, check_name_availability_input: Union[_models.CheckNameAvailabilityInput, JSON, IO[bytes]], **kwargs: Any + ) -> _models.CheckNameAvailabilityOutput: + """Check the availability of a resource name. This is needed for resources where name is globally + unique, such as a CDN endpoint. + + :param check_name_availability_input: The request body. Is one of the following types: + CheckNameAvailabilityInput, JSON, IO[bytes] Required. + :type check_name_availability_input: ~azure.mgmt.cdn.models.CheckNameAvailabilityInput or JSON + or IO[bytes] + :return: CheckNameAvailabilityOutput. The CheckNameAvailabilityOutput is compatible with + MutableMapping + :rtype: ~azure.mgmt.cdn.models.CheckNameAvailabilityOutput + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.CheckNameAvailabilityOutput] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(check_name_availability_input, (IOBase, bytes)): + _content = check_name_availability_input + else: + _content = json.dumps(check_name_availability_input, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_cdn_check_name_availability_request( + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.CheckNameAvailabilityOutput, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + async def check_name_availability_with_subscription( # pylint: disable=name-too-long + self, + check_name_availability_input: _models.CheckNameAvailabilityInput, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CheckNameAvailabilityOutput: + """Check the availability of a resource name. This is needed for resources where name is globally + unique, such as a CDN endpoint. + + :param check_name_availability_input: The request body. Required. + :type check_name_availability_input: ~azure.mgmt.cdn.models.CheckNameAvailabilityInput + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: CheckNameAvailabilityOutput. The CheckNameAvailabilityOutput is compatible with + MutableMapping + :rtype: ~azure.mgmt.cdn.models.CheckNameAvailabilityOutput + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def check_name_availability_with_subscription( # pylint: disable=name-too-long + self, check_name_availability_input: JSON, *, content_type: str = "application/json", **kwargs: Any + ) -> _models.CheckNameAvailabilityOutput: + """Check the availability of a resource name. This is needed for resources where name is globally + unique, such as a CDN endpoint. + + :param check_name_availability_input: The request body. Required. + :type check_name_availability_input: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: CheckNameAvailabilityOutput. The CheckNameAvailabilityOutput is compatible with + MutableMapping + :rtype: ~azure.mgmt.cdn.models.CheckNameAvailabilityOutput + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def check_name_availability_with_subscription( # pylint: disable=name-too-long + self, check_name_availability_input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any + ) -> _models.CheckNameAvailabilityOutput: + """Check the availability of a resource name. This is needed for resources where name is globally + unique, such as a CDN endpoint. + + :param check_name_availability_input: The request body. Required. + :type check_name_availability_input: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: CheckNameAvailabilityOutput. The CheckNameAvailabilityOutput is compatible with + MutableMapping + :rtype: ~azure.mgmt.cdn.models.CheckNameAvailabilityOutput + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def check_name_availability_with_subscription( # pylint: disable=name-too-long + self, check_name_availability_input: Union[_models.CheckNameAvailabilityInput, JSON, IO[bytes]], **kwargs: Any + ) -> _models.CheckNameAvailabilityOutput: + """Check the availability of a resource name. This is needed for resources where name is globally + unique, such as a CDN endpoint. + + :param check_name_availability_input: The request body. Is one of the following types: + CheckNameAvailabilityInput, JSON, IO[bytes] Required. + :type check_name_availability_input: ~azure.mgmt.cdn.models.CheckNameAvailabilityInput or JSON + or IO[bytes] + :return: CheckNameAvailabilityOutput. The CheckNameAvailabilityOutput is compatible with + MutableMapping + :rtype: ~azure.mgmt.cdn.models.CheckNameAvailabilityOutput + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.CheckNameAvailabilityOutput] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(check_name_availability_input, (IOBase, bytes)): + _content = check_name_availability_input + else: + _content = json.dumps(check_name_availability_input, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_cdn_check_name_availability_with_subscription_request( + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.CheckNameAvailabilityOutput, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + async def validate_probe( + self, validate_probe_input: _models.ValidateProbeInput, *, content_type: str = "application/json", **kwargs: Any + ) -> _models.ValidateProbeOutput: + """Check if the probe path is a valid path and the file can be accessed. Probe path is the path to + a file hosted on the origin server to help accelerate the delivery of dynamic content via the + CDN endpoint. This path is relative to the origin path specified in the endpoint configuration. + + :param validate_probe_input: The request body. Required. + :type validate_probe_input: ~azure.mgmt.cdn.models.ValidateProbeInput + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ValidateProbeOutput. The ValidateProbeOutput is compatible with MutableMapping + :rtype: ~azure.mgmt.cdn.models.ValidateProbeOutput + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def validate_probe( + self, validate_probe_input: JSON, *, content_type: str = "application/json", **kwargs: Any + ) -> _models.ValidateProbeOutput: + """Check if the probe path is a valid path and the file can be accessed. Probe path is the path to + a file hosted on the origin server to help accelerate the delivery of dynamic content via the + CDN endpoint. This path is relative to the origin path specified in the endpoint configuration. + + :param validate_probe_input: The request body. Required. + :type validate_probe_input: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ValidateProbeOutput. The ValidateProbeOutput is compatible with MutableMapping + :rtype: ~azure.mgmt.cdn.models.ValidateProbeOutput + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def validate_probe( + self, validate_probe_input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any + ) -> _models.ValidateProbeOutput: + """Check if the probe path is a valid path and the file can be accessed. Probe path is the path to + a file hosted on the origin server to help accelerate the delivery of dynamic content via the + CDN endpoint. This path is relative to the origin path specified in the endpoint configuration. + + :param validate_probe_input: The request body. Required. + :type validate_probe_input: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: ValidateProbeOutput. The ValidateProbeOutput is compatible with MutableMapping + :rtype: ~azure.mgmt.cdn.models.ValidateProbeOutput + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def validate_probe( + self, validate_probe_input: Union[_models.ValidateProbeInput, JSON, IO[bytes]], **kwargs: Any + ) -> _models.ValidateProbeOutput: + """Check if the probe path is a valid path and the file can be accessed. Probe path is the path to + a file hosted on the origin server to help accelerate the delivery of dynamic content via the + CDN endpoint. This path is relative to the origin path specified in the endpoint configuration. + + :param validate_probe_input: The request body. Is one of the following types: + ValidateProbeInput, JSON, IO[bytes] Required. + :type validate_probe_input: ~azure.mgmt.cdn.models.ValidateProbeInput or JSON or IO[bytes] + :return: ValidateProbeOutput. The ValidateProbeOutput is compatible with MutableMapping + :rtype: ~azure.mgmt.cdn.models.ValidateProbeOutput + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ValidateProbeOutput] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(validate_probe_input, (IOBase, bytes)): + _content = validate_probe_input + else: + _content = json.dumps(validate_probe_input, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_cdn_validate_probe_request( + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ValidateProbeOutput, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_origin_groups_operations.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_origin_groups_operations.py deleted file mode 100644 index 60b0bc300df6..000000000000 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_origin_groups_operations.py +++ /dev/null @@ -1,820 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._origin_groups_operations import ( - build_create_request, - build_delete_request, - build_get_request, - build_list_by_endpoint_request, - build_update_request, -) -from .._configuration import CdnManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class OriginGroupsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.cdn.aio.CdnManagementClient`'s - :attr:`origin_groups` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: CdnManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_endpoint( - self, resource_group_name: str, profile_name: str, endpoint_name: str, **kwargs: Any - ) -> AsyncItemPaged["_models.OriginGroup"]: - """Lists all of the existing origin groups within an endpoint. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the CDN profile which is unique within the resource group. - Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :return: An iterator like instance of either OriginGroup or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cdn.models.OriginGroup] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.OriginGroupListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_endpoint_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - endpoint_name=endpoint_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("OriginGroupListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get( - self, resource_group_name: str, profile_name: str, endpoint_name: str, origin_group_name: str, **kwargs: Any - ) -> _models.OriginGroup: - """Gets an existing origin group within an endpoint. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the CDN profile which is unique within the resource group. - Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :param origin_group_name: Name of the origin group which is unique within the endpoint. - Required. - :type origin_group_name: str - :return: OriginGroup or the result of cls(response) - :rtype: ~azure.mgmt.cdn.models.OriginGroup - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.OriginGroup] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - endpoint_name=endpoint_name, - origin_group_name=origin_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("OriginGroup", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - async def _create_initial( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - origin_group_name: str, - origin_group: Union[_models.OriginGroup, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(origin_group, (IOBase, bytes)): - _content = origin_group - else: - _json = self._serialize.body(origin_group, "OriginGroup") - - _request = build_create_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - endpoint_name=endpoint_name, - origin_group_name=origin_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_create( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - origin_group_name: str, - origin_group: _models.OriginGroup, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.OriginGroup]: - """Creates a new origin group within the specified endpoint. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the CDN profile which is unique within the resource group. - Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :param origin_group_name: Name of the origin group which is unique within the endpoint. - Required. - :type origin_group_name: str - :param origin_group: Origin group properties. Required. - :type origin_group: ~azure.mgmt.cdn.models.OriginGroup - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either OriginGroup or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.OriginGroup] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_create( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - origin_group_name: str, - origin_group: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.OriginGroup]: - """Creates a new origin group within the specified endpoint. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the CDN profile which is unique within the resource group. - Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :param origin_group_name: Name of the origin group which is unique within the endpoint. - Required. - :type origin_group_name: str - :param origin_group: Origin group properties. Required. - :type origin_group: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either OriginGroup or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.OriginGroup] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_create( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - origin_group_name: str, - origin_group: Union[_models.OriginGroup, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.OriginGroup]: - """Creates a new origin group within the specified endpoint. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the CDN profile which is unique within the resource group. - Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :param origin_group_name: Name of the origin group which is unique within the endpoint. - Required. - :type origin_group_name: str - :param origin_group: Origin group properties. Is either a OriginGroup type or a IO[bytes] type. - Required. - :type origin_group: ~azure.mgmt.cdn.models.OriginGroup or IO[bytes] - :return: An instance of AsyncLROPoller that returns either OriginGroup or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.OriginGroup] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.OriginGroup] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._create_initial( - resource_group_name=resource_group_name, - profile_name=profile_name, - endpoint_name=endpoint_name, - origin_group_name=origin_group_name, - origin_group=origin_group, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("OriginGroup", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.OriginGroup].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.OriginGroup]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _update_initial( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - origin_group_name: str, - origin_group_update_properties: Union[_models.OriginGroupUpdateParameters, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(origin_group_update_properties, (IOBase, bytes)): - _content = origin_group_update_properties - else: - _json = self._serialize.body(origin_group_update_properties, "OriginGroupUpdateParameters") - - _request = build_update_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - endpoint_name=endpoint_name, - origin_group_name=origin_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_update( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - origin_group_name: str, - origin_group_update_properties: _models.OriginGroupUpdateParameters, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.OriginGroup]: - """Updates an existing origin group within an endpoint. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the CDN profile which is unique within the resource group. - Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :param origin_group_name: Name of the origin group which is unique within the endpoint. - Required. - :type origin_group_name: str - :param origin_group_update_properties: Origin group properties. Required. - :type origin_group_update_properties: ~azure.mgmt.cdn.models.OriginGroupUpdateParameters - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either OriginGroup or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.OriginGroup] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_update( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - origin_group_name: str, - origin_group_update_properties: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.OriginGroup]: - """Updates an existing origin group within an endpoint. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the CDN profile which is unique within the resource group. - Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :param origin_group_name: Name of the origin group which is unique within the endpoint. - Required. - :type origin_group_name: str - :param origin_group_update_properties: Origin group properties. Required. - :type origin_group_update_properties: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either OriginGroup or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.OriginGroup] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_update( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - origin_group_name: str, - origin_group_update_properties: Union[_models.OriginGroupUpdateParameters, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.OriginGroup]: - """Updates an existing origin group within an endpoint. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the CDN profile which is unique within the resource group. - Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :param origin_group_name: Name of the origin group which is unique within the endpoint. - Required. - :type origin_group_name: str - :param origin_group_update_properties: Origin group properties. Is either a - OriginGroupUpdateParameters type or a IO[bytes] type. Required. - :type origin_group_update_properties: ~azure.mgmt.cdn.models.OriginGroupUpdateParameters or - IO[bytes] - :return: An instance of AsyncLROPoller that returns either OriginGroup or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.OriginGroup] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.OriginGroup] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._update_initial( - resource_group_name=resource_group_name, - profile_name=profile_name, - endpoint_name=endpoint_name, - origin_group_name=origin_group_name, - origin_group_update_properties=origin_group_update_properties, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("OriginGroup", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.OriginGroup].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.OriginGroup]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _delete_initial( - self, resource_group_name: str, profile_name: str, endpoint_name: str, origin_group_name: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - endpoint_name=endpoint_name, - origin_group_name=origin_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_delete( - self, resource_group_name: str, profile_name: str, endpoint_name: str, origin_group_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: - """Deletes an existing origin group within an endpoint. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the CDN profile which is unique within the resource group. - Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :param origin_group_name: Name of the origin group which is unique within the endpoint. - Required. - :type origin_group_name: str - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._delete_initial( - resource_group_name=resource_group_name, - profile_name=profile_name, - endpoint_name=endpoint_name, - origin_group_name=origin_group_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_origins_operations.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_origins_operations.py deleted file mode 100644 index 20d2b6f0aebd..000000000000 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_origins_operations.py +++ /dev/null @@ -1,810 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._origins_operations import ( - build_create_request, - build_delete_request, - build_get_request, - build_list_by_endpoint_request, - build_update_request, -) -from .._configuration import CdnManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class OriginsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.cdn.aio.CdnManagementClient`'s - :attr:`origins` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: CdnManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_endpoint( - self, resource_group_name: str, profile_name: str, endpoint_name: str, **kwargs: Any - ) -> AsyncItemPaged["_models.Origin"]: - """Lists all of the existing origins within an endpoint. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the CDN profile which is unique within the resource group. - Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :return: An iterator like instance of either Origin or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cdn.models.Origin] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.OriginListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_endpoint_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - endpoint_name=endpoint_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("OriginListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get( - self, resource_group_name: str, profile_name: str, endpoint_name: str, origin_name: str, **kwargs: Any - ) -> _models.Origin: - """Gets an existing origin within an endpoint. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the CDN profile which is unique within the resource group. - Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :param origin_name: Name of the origin which is unique within the endpoint. Required. - :type origin_name: str - :return: Origin or the result of cls(response) - :rtype: ~azure.mgmt.cdn.models.Origin - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.Origin] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - endpoint_name=endpoint_name, - origin_name=origin_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("Origin", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - async def _create_initial( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - origin_name: str, - origin: Union[_models.Origin, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(origin, (IOBase, bytes)): - _content = origin - else: - _json = self._serialize.body(origin, "Origin") - - _request = build_create_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - endpoint_name=endpoint_name, - origin_name=origin_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_create( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - origin_name: str, - origin: _models.Origin, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.Origin]: - """Creates a new origin within the specified endpoint. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the CDN profile which is unique within the resource group. - Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :param origin_name: Name of the origin that is unique within the endpoint. Required. - :type origin_name: str - :param origin: Origin properties. Required. - :type origin: ~azure.mgmt.cdn.models.Origin - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either Origin or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.Origin] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_create( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - origin_name: str, - origin: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.Origin]: - """Creates a new origin within the specified endpoint. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the CDN profile which is unique within the resource group. - Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :param origin_name: Name of the origin that is unique within the endpoint. Required. - :type origin_name: str - :param origin: Origin properties. Required. - :type origin: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either Origin or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.Origin] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_create( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - origin_name: str, - origin: Union[_models.Origin, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.Origin]: - """Creates a new origin within the specified endpoint. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the CDN profile which is unique within the resource group. - Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :param origin_name: Name of the origin that is unique within the endpoint. Required. - :type origin_name: str - :param origin: Origin properties. Is either a Origin type or a IO[bytes] type. Required. - :type origin: ~azure.mgmt.cdn.models.Origin or IO[bytes] - :return: An instance of AsyncLROPoller that returns either Origin or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.Origin] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.Origin] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._create_initial( - resource_group_name=resource_group_name, - profile_name=profile_name, - endpoint_name=endpoint_name, - origin_name=origin_name, - origin=origin, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("Origin", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.Origin].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.Origin]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _update_initial( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - origin_name: str, - origin_update_properties: Union[_models.OriginUpdateParameters, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(origin_update_properties, (IOBase, bytes)): - _content = origin_update_properties - else: - _json = self._serialize.body(origin_update_properties, "OriginUpdateParameters") - - _request = build_update_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - endpoint_name=endpoint_name, - origin_name=origin_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_update( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - origin_name: str, - origin_update_properties: _models.OriginUpdateParameters, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.Origin]: - """Updates an existing origin within an endpoint. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the CDN profile which is unique within the resource group. - Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :param origin_name: Name of the origin which is unique within the endpoint. Required. - :type origin_name: str - :param origin_update_properties: Origin properties. Required. - :type origin_update_properties: ~azure.mgmt.cdn.models.OriginUpdateParameters - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either Origin or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.Origin] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_update( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - origin_name: str, - origin_update_properties: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.Origin]: - """Updates an existing origin within an endpoint. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the CDN profile which is unique within the resource group. - Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :param origin_name: Name of the origin which is unique within the endpoint. Required. - :type origin_name: str - :param origin_update_properties: Origin properties. Required. - :type origin_update_properties: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either Origin or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.Origin] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_update( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - origin_name: str, - origin_update_properties: Union[_models.OriginUpdateParameters, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.Origin]: - """Updates an existing origin within an endpoint. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the CDN profile which is unique within the resource group. - Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :param origin_name: Name of the origin which is unique within the endpoint. Required. - :type origin_name: str - :param origin_update_properties: Origin properties. Is either a OriginUpdateParameters type or - a IO[bytes] type. Required. - :type origin_update_properties: ~azure.mgmt.cdn.models.OriginUpdateParameters or IO[bytes] - :return: An instance of AsyncLROPoller that returns either Origin or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.Origin] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.Origin] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._update_initial( - resource_group_name=resource_group_name, - profile_name=profile_name, - endpoint_name=endpoint_name, - origin_name=origin_name, - origin_update_properties=origin_update_properties, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("Origin", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.Origin].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.Origin]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _delete_initial( - self, resource_group_name: str, profile_name: str, endpoint_name: str, origin_name: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - endpoint_name=endpoint_name, - origin_name=origin_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_delete( - self, resource_group_name: str, profile_name: str, endpoint_name: str, origin_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: - """Deletes an existing origin within an endpoint. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the CDN profile which is unique within the resource group. - Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :param origin_name: Name of the origin which is unique within the endpoint. Required. - :type origin_name: str - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._delete_initial( - resource_group_name=resource_group_name, - profile_name=profile_name, - endpoint_name=endpoint_name, - origin_name=origin_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_patch.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_patch.py index 49900f6ab120..ea765788358a 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_patch.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_patch.py @@ -1,15 +1,14 @@ -# ------------------------------------ -# Copyright (c) Microsoft Corporation. -# Licensed under the MIT License. -# ------------------------------------ - +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------- """Customize generated code here. Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ -from typing import List -__all__: List[str] = [] # Add all objects you want publicly available to users at this package level +__all__: list[str] = [] # Add all objects you want publicly available to users at this package level def patch_sdk(): diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_policies_operations.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_policies_operations.py deleted file mode 100644 index bbea5f4dd3a4..000000000000 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_policies_operations.py +++ /dev/null @@ -1,692 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._policies_operations import ( - build_create_or_update_request, - build_delete_request, - build_get_request, - build_list_request, - build_update_request, -) -from .._configuration import CdnManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class PoliciesOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.cdn.aio.CdnManagementClient`'s - :attr:`policies` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: CdnManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list( - self, resource_group_name: str, **kwargs: Any - ) -> AsyncItemPaged["_models.CdnWebApplicationFirewallPolicy"]: - """Lists all of the protection policies within a resource group. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :return: An iterator like instance of either CdnWebApplicationFirewallPolicy or the result of - cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cdn.models.CdnWebApplicationFirewallPolicy] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.CdnWebApplicationFirewallPolicyList] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_request( - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("CdnWebApplicationFirewallPolicyList", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get( - self, resource_group_name: str, policy_name: str, **kwargs: Any - ) -> _models.CdnWebApplicationFirewallPolicy: - """Retrieve protection policy with specified name within a resource group. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param policy_name: The name of the CdnWebApplicationFirewallPolicy. Required. - :type policy_name: str - :return: CdnWebApplicationFirewallPolicy or the result of cls(response) - :rtype: ~azure.mgmt.cdn.models.CdnWebApplicationFirewallPolicy - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.CdnWebApplicationFirewallPolicy] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - policy_name=policy_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("CdnWebApplicationFirewallPolicy", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - async def _create_or_update_initial( - self, - resource_group_name: str, - policy_name: str, - cdn_web_application_firewall_policy: Union[_models.CdnWebApplicationFirewallPolicy, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(cdn_web_application_firewall_policy, (IOBase, bytes)): - _content = cdn_web_application_firewall_policy - else: - _json = self._serialize.body(cdn_web_application_firewall_policy, "CdnWebApplicationFirewallPolicy") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - policy_name=policy_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_create_or_update( - self, - resource_group_name: str, - policy_name: str, - cdn_web_application_firewall_policy: _models.CdnWebApplicationFirewallPolicy, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.CdnWebApplicationFirewallPolicy]: - """Create or update policy with specified rule set name within a resource group. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param policy_name: The name of the CdnWebApplicationFirewallPolicy. Required. - :type policy_name: str - :param cdn_web_application_firewall_policy: Policy to be created. Required. - :type cdn_web_application_firewall_policy: - ~azure.mgmt.cdn.models.CdnWebApplicationFirewallPolicy - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either CdnWebApplicationFirewallPolicy or - the result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.CdnWebApplicationFirewallPolicy] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_create_or_update( - self, - resource_group_name: str, - policy_name: str, - cdn_web_application_firewall_policy: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.CdnWebApplicationFirewallPolicy]: - """Create or update policy with specified rule set name within a resource group. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param policy_name: The name of the CdnWebApplicationFirewallPolicy. Required. - :type policy_name: str - :param cdn_web_application_firewall_policy: Policy to be created. Required. - :type cdn_web_application_firewall_policy: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either CdnWebApplicationFirewallPolicy or - the result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.CdnWebApplicationFirewallPolicy] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_create_or_update( - self, - resource_group_name: str, - policy_name: str, - cdn_web_application_firewall_policy: Union[_models.CdnWebApplicationFirewallPolicy, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.CdnWebApplicationFirewallPolicy]: - """Create or update policy with specified rule set name within a resource group. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param policy_name: The name of the CdnWebApplicationFirewallPolicy. Required. - :type policy_name: str - :param cdn_web_application_firewall_policy: Policy to be created. Is either a - CdnWebApplicationFirewallPolicy type or a IO[bytes] type. Required. - :type cdn_web_application_firewall_policy: - ~azure.mgmt.cdn.models.CdnWebApplicationFirewallPolicy or IO[bytes] - :return: An instance of AsyncLROPoller that returns either CdnWebApplicationFirewallPolicy or - the result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.CdnWebApplicationFirewallPolicy] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CdnWebApplicationFirewallPolicy] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._create_or_update_initial( - resource_group_name=resource_group_name, - policy_name=policy_name, - cdn_web_application_firewall_policy=cdn_web_application_firewall_policy, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CdnWebApplicationFirewallPolicy", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.CdnWebApplicationFirewallPolicy].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.CdnWebApplicationFirewallPolicy]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _update_initial( - self, - resource_group_name: str, - policy_name: str, - cdn_web_application_firewall_policy_patch_parameters: Union[ - _models.CdnWebApplicationFirewallPolicyPatchParameters, IO[bytes] - ], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(cdn_web_application_firewall_policy_patch_parameters, (IOBase, bytes)): - _content = cdn_web_application_firewall_policy_patch_parameters - else: - _json = self._serialize.body( - cdn_web_application_firewall_policy_patch_parameters, "CdnWebApplicationFirewallPolicyPatchParameters" - ) - - _request = build_update_request( - resource_group_name=resource_group_name, - policy_name=policy_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_update( - self, - resource_group_name: str, - policy_name: str, - cdn_web_application_firewall_policy_patch_parameters: _models.CdnWebApplicationFirewallPolicyPatchParameters, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.CdnWebApplicationFirewallPolicy]: - """Update an existing CdnWebApplicationFirewallPolicy with the specified policy name under the - specified subscription and resource group. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param policy_name: The name of the CdnWebApplicationFirewallPolicy. Required. - :type policy_name: str - :param cdn_web_application_firewall_policy_patch_parameters: CdnWebApplicationFirewallPolicy - parameters to be patched. Required. - :type cdn_web_application_firewall_policy_patch_parameters: - ~azure.mgmt.cdn.models.CdnWebApplicationFirewallPolicyPatchParameters - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either CdnWebApplicationFirewallPolicy or - the result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.CdnWebApplicationFirewallPolicy] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_update( - self, - resource_group_name: str, - policy_name: str, - cdn_web_application_firewall_policy_patch_parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.CdnWebApplicationFirewallPolicy]: - """Update an existing CdnWebApplicationFirewallPolicy with the specified policy name under the - specified subscription and resource group. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param policy_name: The name of the CdnWebApplicationFirewallPolicy. Required. - :type policy_name: str - :param cdn_web_application_firewall_policy_patch_parameters: CdnWebApplicationFirewallPolicy - parameters to be patched. Required. - :type cdn_web_application_firewall_policy_patch_parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either CdnWebApplicationFirewallPolicy or - the result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.CdnWebApplicationFirewallPolicy] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_update( - self, - resource_group_name: str, - policy_name: str, - cdn_web_application_firewall_policy_patch_parameters: Union[ - _models.CdnWebApplicationFirewallPolicyPatchParameters, IO[bytes] - ], - **kwargs: Any - ) -> AsyncLROPoller[_models.CdnWebApplicationFirewallPolicy]: - """Update an existing CdnWebApplicationFirewallPolicy with the specified policy name under the - specified subscription and resource group. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param policy_name: The name of the CdnWebApplicationFirewallPolicy. Required. - :type policy_name: str - :param cdn_web_application_firewall_policy_patch_parameters: CdnWebApplicationFirewallPolicy - parameters to be patched. Is either a CdnWebApplicationFirewallPolicyPatchParameters type or a - IO[bytes] type. Required. - :type cdn_web_application_firewall_policy_patch_parameters: - ~azure.mgmt.cdn.models.CdnWebApplicationFirewallPolicyPatchParameters or IO[bytes] - :return: An instance of AsyncLROPoller that returns either CdnWebApplicationFirewallPolicy or - the result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.CdnWebApplicationFirewallPolicy] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CdnWebApplicationFirewallPolicy] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._update_initial( - resource_group_name=resource_group_name, - policy_name=policy_name, - cdn_web_application_firewall_policy_patch_parameters=cdn_web_application_firewall_policy_patch_parameters, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CdnWebApplicationFirewallPolicy", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.CdnWebApplicationFirewallPolicy].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.CdnWebApplicationFirewallPolicy]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - @distributed_trace_async - async def delete(self, resource_group_name: str, policy_name: str, **kwargs: Any) -> None: - """Deletes Policy. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param policy_name: The name of the CdnWebApplicationFirewallPolicy. Required. - :type policy_name: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - policy_name=policy_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_profiles_operations.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_profiles_operations.py deleted file mode 100644 index 66bce8babbe5..000000000000 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_profiles_operations.py +++ /dev/null @@ -1,1981 +0,0 @@ -# pylint: disable=too-many-lines -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._profiles_operations import ( - build_can_migrate_request, - build_cdn_can_migrate_to_afd_request, - build_cdn_migrate_to_afd_request, - build_create_request, - build_delete_request, - build_generate_sso_uri_request, - build_get_request, - build_list_by_resource_group_request, - build_list_request, - build_list_resource_usage_request, - build_list_supported_optimization_types_request, - build_migrate_request, - build_migration_abort_request, - build_migration_commit_request, - build_update_request, -) -from .._configuration import CdnManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class ProfilesOperations: # pylint: disable=too-many-public-methods - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.cdn.aio.CdnManagementClient`'s - :attr:`profiles` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: CdnManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list(self, **kwargs: Any) -> AsyncItemPaged["_models.Profile"]: - """Lists all of the Azure Front Door Standard, Azure Front Door Premium, and CDN profiles within - an Azure subscription. - - :return: An iterator like instance of either Profile or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cdn.models.Profile] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ProfileListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_request( - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("ProfileListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace - def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> AsyncItemPaged["_models.Profile"]: - """Lists all of the Azure Front Door Standard, Azure Front Door Premium, and CDN profiles within a - resource group. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :return: An iterator like instance of either Profile or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cdn.models.Profile] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ProfileListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_resource_group_request( - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("ProfileListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get(self, resource_group_name: str, profile_name: str, **kwargs: Any) -> _models.Profile: - """Gets an Azure Front Door Standard or Azure Front Door Premium or CDN profile with the specified - profile name under the specified subscription and resource group. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN - profile which is unique within the resource group. Required. - :type profile_name: str - :return: Profile or the result of cls(response) - :rtype: ~azure.mgmt.cdn.models.Profile - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.Profile] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("Profile", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - async def _create_initial( - self, resource_group_name: str, profile_name: str, profile: Union[_models.Profile, IO[bytes]], **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(profile, (IOBase, bytes)): - _content = profile - else: - _json = self._serialize.body(profile, "Profile") - - _request = build_create_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_create( - self, - resource_group_name: str, - profile_name: str, - profile: _models.Profile, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.Profile]: - """Creates a new Azure Front Door Standard or Azure Front Door Premium or CDN profile with a - profile name under the specified subscription and resource group. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN - profile which is unique within the resource group. Required. - :type profile_name: str - :param profile: Profile properties needed to create a new profile. Required. - :type profile: ~azure.mgmt.cdn.models.Profile - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either Profile or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.Profile] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_create( - self, - resource_group_name: str, - profile_name: str, - profile: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.Profile]: - """Creates a new Azure Front Door Standard or Azure Front Door Premium or CDN profile with a - profile name under the specified subscription and resource group. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN - profile which is unique within the resource group. Required. - :type profile_name: str - :param profile: Profile properties needed to create a new profile. Required. - :type profile: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either Profile or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.Profile] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_create( - self, resource_group_name: str, profile_name: str, profile: Union[_models.Profile, IO[bytes]], **kwargs: Any - ) -> AsyncLROPoller[_models.Profile]: - """Creates a new Azure Front Door Standard or Azure Front Door Premium or CDN profile with a - profile name under the specified subscription and resource group. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN - profile which is unique within the resource group. Required. - :type profile_name: str - :param profile: Profile properties needed to create a new profile. Is either a Profile type or - a IO[bytes] type. Required. - :type profile: ~azure.mgmt.cdn.models.Profile or IO[bytes] - :return: An instance of AsyncLROPoller that returns either Profile or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.Profile] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.Profile] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._create_initial( - resource_group_name=resource_group_name, - profile_name=profile_name, - profile=profile, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("Profile", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.Profile].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.Profile]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _update_initial( - self, - resource_group_name: str, - profile_name: str, - profile_update_parameters: Union[_models.ProfileUpdateParameters, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(profile_update_parameters, (IOBase, bytes)): - _content = profile_update_parameters - else: - _json = self._serialize.body(profile_update_parameters, "ProfileUpdateParameters") - - _request = build_update_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_update( - self, - resource_group_name: str, - profile_name: str, - profile_update_parameters: _models.ProfileUpdateParameters, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.Profile]: - """Updates an existing Azure Front Door Standard or Azure Front Door Premium or CDN profile with - the specified profile name under the specified subscription and resource group. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN - profile which is unique within the resource group. Required. - :type profile_name: str - :param profile_update_parameters: Profile properties needed to update an existing profile. - Required. - :type profile_update_parameters: ~azure.mgmt.cdn.models.ProfileUpdateParameters - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either Profile or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.Profile] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_update( - self, - resource_group_name: str, - profile_name: str, - profile_update_parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.Profile]: - """Updates an existing Azure Front Door Standard or Azure Front Door Premium or CDN profile with - the specified profile name under the specified subscription and resource group. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN - profile which is unique within the resource group. Required. - :type profile_name: str - :param profile_update_parameters: Profile properties needed to update an existing profile. - Required. - :type profile_update_parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either Profile or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.Profile] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_update( - self, - resource_group_name: str, - profile_name: str, - profile_update_parameters: Union[_models.ProfileUpdateParameters, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.Profile]: - """Updates an existing Azure Front Door Standard or Azure Front Door Premium or CDN profile with - the specified profile name under the specified subscription and resource group. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN - profile which is unique within the resource group. Required. - :type profile_name: str - :param profile_update_parameters: Profile properties needed to update an existing profile. Is - either a ProfileUpdateParameters type or a IO[bytes] type. Required. - :type profile_update_parameters: ~azure.mgmt.cdn.models.ProfileUpdateParameters or IO[bytes] - :return: An instance of AsyncLROPoller that returns either Profile or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.Profile] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.Profile] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._update_initial( - resource_group_name=resource_group_name, - profile_name=profile_name, - profile_update_parameters=profile_update_parameters, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("Profile", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.Profile].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.Profile]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _delete_initial(self, resource_group_name: str, profile_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_delete(self, resource_group_name: str, profile_name: str, **kwargs: Any) -> AsyncLROPoller[None]: - """Deletes an existing Azure Front Door Standard or Azure Front Door Premium or CDN profile with - the specified parameters. Deleting a profile will result in the deletion of all of the - sub-resources including endpoints, origins and custom domains. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN - profile which is unique within the resource group. Required. - :type profile_name: str - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._delete_initial( - resource_group_name=resource_group_name, - profile_name=profile_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - async def _can_migrate_initial( - self, - resource_group_name: str, - can_migrate_parameters: Union[_models.CanMigrateParameters, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(can_migrate_parameters, (IOBase, bytes)): - _content = can_migrate_parameters - else: - _json = self._serialize.body(can_migrate_parameters, "CanMigrateParameters") - - _request = build_can_migrate_request( - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_can_migrate( - self, - resource_group_name: str, - can_migrate_parameters: _models.CanMigrateParameters, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.CanMigrateResult]: - """Checks if CDN profile can be migrated to Azure Frontdoor(Standard/Premium) profile. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param can_migrate_parameters: Properties needed to check if cdn profile or classic frontdoor - can be migrated. Required. - :type can_migrate_parameters: ~azure.mgmt.cdn.models.CanMigrateParameters - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either CanMigrateResult or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.CanMigrateResult] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_can_migrate( - self, - resource_group_name: str, - can_migrate_parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.CanMigrateResult]: - """Checks if CDN profile can be migrated to Azure Frontdoor(Standard/Premium) profile. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param can_migrate_parameters: Properties needed to check if cdn profile or classic frontdoor - can be migrated. Required. - :type can_migrate_parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either CanMigrateResult or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.CanMigrateResult] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_can_migrate( - self, - resource_group_name: str, - can_migrate_parameters: Union[_models.CanMigrateParameters, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.CanMigrateResult]: - """Checks if CDN profile can be migrated to Azure Frontdoor(Standard/Premium) profile. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param can_migrate_parameters: Properties needed to check if cdn profile or classic frontdoor - can be migrated. Is either a CanMigrateParameters type or a IO[bytes] type. Required. - :type can_migrate_parameters: ~azure.mgmt.cdn.models.CanMigrateParameters or IO[bytes] - :return: An instance of AsyncLROPoller that returns either CanMigrateResult or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.CanMigrateResult] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CanMigrateResult] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._can_migrate_initial( - resource_group_name=resource_group_name, - can_migrate_parameters=can_migrate_parameters, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CanMigrateResult", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.CanMigrateResult].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.CanMigrateResult]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _migrate_initial( - self, - resource_group_name: str, - migration_parameters: Union[_models.MigrationParameters, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(migration_parameters, (IOBase, bytes)): - _content = migration_parameters - else: - _json = self._serialize.body(migration_parameters, "MigrationParameters") - - _request = build_migrate_request( - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_migrate( - self, - resource_group_name: str, - migration_parameters: _models.MigrationParameters, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.MigrateResult]: - """Migrate the CDN profile to Azure Frontdoor(Standard/Premium) profile. The change need to be - committed after this. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param migration_parameters: Properties needed to migrate the profile. Required. - :type migration_parameters: ~azure.mgmt.cdn.models.MigrationParameters - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either MigrateResult or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.MigrateResult] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_migrate( - self, - resource_group_name: str, - migration_parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.MigrateResult]: - """Migrate the CDN profile to Azure Frontdoor(Standard/Premium) profile. The change need to be - committed after this. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param migration_parameters: Properties needed to migrate the profile. Required. - :type migration_parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either MigrateResult or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.MigrateResult] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_migrate( - self, - resource_group_name: str, - migration_parameters: Union[_models.MigrationParameters, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.MigrateResult]: - """Migrate the CDN profile to Azure Frontdoor(Standard/Premium) profile. The change need to be - committed after this. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param migration_parameters: Properties needed to migrate the profile. Is either a - MigrationParameters type or a IO[bytes] type. Required. - :type migration_parameters: ~azure.mgmt.cdn.models.MigrationParameters or IO[bytes] - :return: An instance of AsyncLROPoller that returns either MigrateResult or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.MigrateResult] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.MigrateResult] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._migrate_initial( - resource_group_name=resource_group_name, - migration_parameters=migration_parameters, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("MigrateResult", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.MigrateResult].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.MigrateResult]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _migration_commit_initial( - self, resource_group_name: str, profile_name: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_migration_commit_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_migration_commit( - self, resource_group_name: str, profile_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: - """Commit the migrated Azure Frontdoor(Standard/Premium) profile. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the CDN profile which is unique within the resource group. - Required. - :type profile_name: str - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._migration_commit_initial( - resource_group_name=resource_group_name, - profile_name=profile_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, - AsyncARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - @distributed_trace_async - async def generate_sso_uri(self, resource_group_name: str, profile_name: str, **kwargs: Any) -> _models.SsoUri: - """Generates a dynamic SSO URI used to sign in to the CDN supplemental portal. Supplemental portal - is used to configure advanced feature capabilities that are not yet available in the Azure - portal, such as core reports in a standard profile; rules engine, advanced HTTP reports, and - real-time stats and alerts in a premium profile. The SSO URI changes approximately every 10 - minutes. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the CDN profile which is unique within the resource group. - Required. - :type profile_name: str - :return: SsoUri or the result of cls(response) - :rtype: ~azure.mgmt.cdn.models.SsoUri - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.SsoUri] = kwargs.pop("cls", None) - - _request = build_generate_sso_uri_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("SsoUri", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def list_supported_optimization_types( - self, resource_group_name: str, profile_name: str, **kwargs: Any - ) -> _models.SupportedOptimizationTypesListResult: - """Gets the supported optimization types for the current profile. A user can create an endpoint - with an optimization type from the listed values. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN - profile which is unique within the resource group. Required. - :type profile_name: str - :return: SupportedOptimizationTypesListResult or the result of cls(response) - :rtype: ~azure.mgmt.cdn.models.SupportedOptimizationTypesListResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.SupportedOptimizationTypesListResult] = kwargs.pop("cls", None) - - _request = build_list_supported_optimization_types_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("SupportedOptimizationTypesListResult", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def list_resource_usage( - self, resource_group_name: str, profile_name: str, **kwargs: Any - ) -> AsyncItemPaged["_models.ResourceUsage"]: - """Checks the quota and actual usage of endpoints under the given Azure Front Door Standard or - Azure Front Door Premium or CDN profile. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN - profile which is unique within the resource group. Required. - :type profile_name: str - :return: An iterator like instance of either ResourceUsage or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cdn.models.ResourceUsage] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ResourceUsageListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_resource_usage_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("ResourceUsageListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - async def _cdn_can_migrate_to_afd_initial( - self, resource_group_name: str, profile_name: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_cdn_can_migrate_to_afd_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_cdn_can_migrate_to_afd( - self, resource_group_name: str, profile_name: str, **kwargs: Any - ) -> AsyncLROPoller[_models.CanMigrateResult]: - """Checks if CDN profile can be migrated to Azure Frontdoor(Standard/Premium) profile. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :return: An instance of AsyncLROPoller that returns either CanMigrateResult or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.CanMigrateResult] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.CanMigrateResult] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._cdn_can_migrate_to_afd_initial( - resource_group_name=resource_group_name, - profile_name=profile_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CanMigrateResult", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.CanMigrateResult].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.CanMigrateResult]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _cdn_migrate_to_afd_initial( - self, - resource_group_name: str, - profile_name: str, - migration_parameters: Union[_models.CdnMigrationToAfdParameters, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(migration_parameters, (IOBase, bytes)): - _content = migration_parameters - else: - _json = self._serialize.body(migration_parameters, "CdnMigrationToAfdParameters") - - _request = build_cdn_migrate_to_afd_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_cdn_migrate_to_afd( - self, - resource_group_name: str, - profile_name: str, - migration_parameters: _models.CdnMigrationToAfdParameters, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.MigrateResult]: - """Migrate the CDN profile to Azure Frontdoor(Standard/Premium) profile. This step prepares the - profile for migration and will be followed by Commit to finalize the migration. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param migration_parameters: Properties needed to migrate the profile. Required. - :type migration_parameters: ~azure.mgmt.cdn.models.CdnMigrationToAfdParameters - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either MigrateResult or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.MigrateResult] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_cdn_migrate_to_afd( - self, - resource_group_name: str, - profile_name: str, - migration_parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.MigrateResult]: - """Migrate the CDN profile to Azure Frontdoor(Standard/Premium) profile. This step prepares the - profile for migration and will be followed by Commit to finalize the migration. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param migration_parameters: Properties needed to migrate the profile. Required. - :type migration_parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either MigrateResult or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.MigrateResult] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_cdn_migrate_to_afd( - self, - resource_group_name: str, - profile_name: str, - migration_parameters: Union[_models.CdnMigrationToAfdParameters, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.MigrateResult]: - """Migrate the CDN profile to Azure Frontdoor(Standard/Premium) profile. This step prepares the - profile for migration and will be followed by Commit to finalize the migration. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param migration_parameters: Properties needed to migrate the profile. Is either a - CdnMigrationToAfdParameters type or a IO[bytes] type. Required. - :type migration_parameters: ~azure.mgmt.cdn.models.CdnMigrationToAfdParameters or IO[bytes] - :return: An instance of AsyncLROPoller that returns either MigrateResult or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.MigrateResult] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.MigrateResult] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._cdn_migrate_to_afd_initial( - resource_group_name=resource_group_name, - profile_name=profile_name, - migration_parameters=migration_parameters, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("MigrateResult", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.MigrateResult].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.MigrateResult]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _migration_abort_initial( - self, resource_group_name: str, profile_name: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_migration_abort_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_migration_abort( - self, resource_group_name: str, profile_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: - """Abort the migration to Azure Frontdoor Premium/Standard. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._migration_abort_initial( - resource_group_name=resource_group_name, - profile_name=profile_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_resource_usage_operations.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_resource_usage_operations.py deleted file mode 100644 index c40c18b68c1c..000000000000 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_resource_usage_operations.py +++ /dev/null @@ -1,133 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from typing import Any, Callable, Optional, TypeVar -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._resource_usage_operations import build_list_request -from .._configuration import CdnManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class ResourceUsageOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.cdn.aio.CdnManagementClient`'s - :attr:`resource_usage` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: CdnManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list(self, **kwargs: Any) -> AsyncItemPaged["_models.ResourceUsage"]: - """Check the quota and actual usage of the CDN profiles under the given subscription. - - :return: An iterator like instance of either ResourceUsage or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cdn.models.ResourceUsage] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ResourceUsageListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_request( - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("ResourceUsageListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_routes_operations.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_routes_operations.py deleted file mode 100644 index f41e4bd597e6..000000000000 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_routes_operations.py +++ /dev/null @@ -1,821 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._routes_operations import ( - build_create_request, - build_delete_request, - build_get_request, - build_list_by_endpoint_request, - build_update_request, -) -from .._configuration import CdnManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class RoutesOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.cdn.aio.CdnManagementClient`'s - :attr:`routes` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: CdnManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_endpoint( - self, resource_group_name: str, profile_name: str, endpoint_name: str, **kwargs: Any - ) -> AsyncItemPaged["_models.Route"]: - """Lists all of the existing origins within a profile. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :return: An iterator like instance of either Route or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cdn.models.Route] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.RouteListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_endpoint_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - endpoint_name=endpoint_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("RouteListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get( - self, resource_group_name: str, profile_name: str, endpoint_name: str, route_name: str, **kwargs: Any - ) -> _models.Route: - """Gets an existing route with the specified route name under the specified subscription, resource - group, profile, and AzureFrontDoor endpoint. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :param route_name: Name of the routing rule. Required. - :type route_name: str - :return: Route or the result of cls(response) - :rtype: ~azure.mgmt.cdn.models.Route - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.Route] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - endpoint_name=endpoint_name, - route_name=route_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("Route", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - async def _create_initial( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - route_name: str, - route: Union[_models.Route, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(route, (IOBase, bytes)): - _content = route - else: - _json = self._serialize.body(route, "Route") - - _request = build_create_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - endpoint_name=endpoint_name, - route_name=route_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_create( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - route_name: str, - route: _models.Route, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.Route]: - """Creates a new route with the specified route name under the specified subscription, resource - group, profile, and AzureFrontDoor endpoint. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :param route_name: Name of the routing rule. Required. - :type route_name: str - :param route: Route properties. Required. - :type route: ~azure.mgmt.cdn.models.Route - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either Route or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.Route] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_create( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - route_name: str, - route: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.Route]: - """Creates a new route with the specified route name under the specified subscription, resource - group, profile, and AzureFrontDoor endpoint. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :param route_name: Name of the routing rule. Required. - :type route_name: str - :param route: Route properties. Required. - :type route: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either Route or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.Route] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_create( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - route_name: str, - route: Union[_models.Route, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.Route]: - """Creates a new route with the specified route name under the specified subscription, resource - group, profile, and AzureFrontDoor endpoint. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :param route_name: Name of the routing rule. Required. - :type route_name: str - :param route: Route properties. Is either a Route type or a IO[bytes] type. Required. - :type route: ~azure.mgmt.cdn.models.Route or IO[bytes] - :return: An instance of AsyncLROPoller that returns either Route or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.Route] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.Route] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._create_initial( - resource_group_name=resource_group_name, - profile_name=profile_name, - endpoint_name=endpoint_name, - route_name=route_name, - route=route, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("Route", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, - AsyncARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.Route].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.Route]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _update_initial( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - route_name: str, - route_update_properties: Union[_models.RouteUpdateParameters, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(route_update_properties, (IOBase, bytes)): - _content = route_update_properties - else: - _json = self._serialize.body(route_update_properties, "RouteUpdateParameters") - - _request = build_update_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - endpoint_name=endpoint_name, - route_name=route_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_update( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - route_name: str, - route_update_properties: _models.RouteUpdateParameters, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.Route]: - """Updates an existing route with the specified route name under the specified subscription, - resource group, profile, and AzureFrontDoor endpoint. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :param route_name: Name of the routing rule. Required. - :type route_name: str - :param route_update_properties: Route update properties. Required. - :type route_update_properties: ~azure.mgmt.cdn.models.RouteUpdateParameters - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either Route or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.Route] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_update( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - route_name: str, - route_update_properties: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.Route]: - """Updates an existing route with the specified route name under the specified subscription, - resource group, profile, and AzureFrontDoor endpoint. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :param route_name: Name of the routing rule. Required. - :type route_name: str - :param route_update_properties: Route update properties. Required. - :type route_update_properties: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either Route or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.Route] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_update( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - route_name: str, - route_update_properties: Union[_models.RouteUpdateParameters, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.Route]: - """Updates an existing route with the specified route name under the specified subscription, - resource group, profile, and AzureFrontDoor endpoint. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :param route_name: Name of the routing rule. Required. - :type route_name: str - :param route_update_properties: Route update properties. Is either a RouteUpdateParameters type - or a IO[bytes] type. Required. - :type route_update_properties: ~azure.mgmt.cdn.models.RouteUpdateParameters or IO[bytes] - :return: An instance of AsyncLROPoller that returns either Route or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.Route] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.Route] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._update_initial( - resource_group_name=resource_group_name, - profile_name=profile_name, - endpoint_name=endpoint_name, - route_name=route_name, - route_update_properties=route_update_properties, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("Route", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, - AsyncARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.Route].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.Route]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _delete_initial( - self, resource_group_name: str, profile_name: str, endpoint_name: str, route_name: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - endpoint_name=endpoint_name, - route_name=route_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_delete( - self, resource_group_name: str, profile_name: str, endpoint_name: str, route_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: - """Deletes an existing route with the specified route name under the specified subscription, - resource group, profile, and AzureFrontDoor endpoint. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :param route_name: Name of the routing rule. Required. - :type route_name: str - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._delete_initial( - resource_group_name=resource_group_name, - profile_name=profile_name, - endpoint_name=endpoint_name, - route_name=route_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, - AsyncARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_rule_sets_operations.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_rule_sets_operations.py deleted file mode 100644 index 103a3063aebe..000000000000 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_rule_sets_operations.py +++ /dev/null @@ -1,502 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from typing import Any, AsyncIterator, Callable, Optional, TypeVar, Union, cast -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._rule_sets_operations import ( - build_create_request, - build_delete_request, - build_get_request, - build_list_by_profile_request, - build_list_resource_usage_request, -) -from .._configuration import CdnManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class RuleSetsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.cdn.aio.CdnManagementClient`'s - :attr:`rule_sets` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: CdnManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_profile( - self, resource_group_name: str, profile_name: str, **kwargs: Any - ) -> AsyncItemPaged["_models.RuleSet"]: - """Lists existing AzureFrontDoor rule sets within a profile. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :return: An iterator like instance of either RuleSet or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cdn.models.RuleSet] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.RuleSetListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_profile_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("RuleSetListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get( - self, resource_group_name: str, profile_name: str, rule_set_name: str, **kwargs: Any - ) -> _models.RuleSet: - """Gets an existing AzureFrontDoor rule set with the specified rule set name under the specified - subscription, resource group and profile. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param rule_set_name: Name of the rule set under the profile which is unique globally. - Required. - :type rule_set_name: str - :return: RuleSet or the result of cls(response) - :rtype: ~azure.mgmt.cdn.models.RuleSet - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.RuleSet] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - rule_set_name=rule_set_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("RuleSet", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def create( - self, resource_group_name: str, profile_name: str, rule_set_name: str, **kwargs: Any - ) -> _models.RuleSet: - """Creates a new rule set within the specified profile. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param rule_set_name: Name of the rule set under the profile which is unique globally. - Required. - :type rule_set_name: str - :return: RuleSet or the result of cls(response) - :rtype: ~azure.mgmt.cdn.models.RuleSet - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.RuleSet] = kwargs.pop("cls", None) - - _request = build_create_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - rule_set_name=rule_set_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("RuleSet", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - async def _delete_initial( - self, resource_group_name: str, profile_name: str, rule_set_name: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - rule_set_name=rule_set_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_delete( - self, resource_group_name: str, profile_name: str, rule_set_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: - """Deletes an existing AzureFrontDoor rule set with the specified rule set name under the - specified subscription, resource group and profile. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param rule_set_name: Name of the rule set under the profile which is unique globally. - Required. - :type rule_set_name: str - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._delete_initial( - resource_group_name=resource_group_name, - profile_name=profile_name, - rule_set_name=rule_set_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, - AsyncARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - @distributed_trace - def list_resource_usage( - self, resource_group_name: str, profile_name: str, rule_set_name: str, **kwargs: Any - ) -> AsyncItemPaged["_models.Usage"]: - """Checks the quota and actual usage of endpoints under the given Azure Front Door profile.. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param rule_set_name: Name of the rule set under the profile which is unique globally. - Required. - :type rule_set_name: str - :return: An iterator like instance of either Usage or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cdn.models.Usage] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.UsagesListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_resource_usage_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - rule_set_name=rule_set_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("UsagesListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_rules_operations.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_rules_operations.py deleted file mode 100644 index 7608a38dc632..000000000000 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_rules_operations.py +++ /dev/null @@ -1,804 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._rules_operations import ( - build_create_request, - build_delete_request, - build_get_request, - build_list_by_rule_set_request, - build_update_request, -) -from .._configuration import CdnManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class RulesOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.cdn.aio.CdnManagementClient`'s - :attr:`rules` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: CdnManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_rule_set( - self, resource_group_name: str, profile_name: str, rule_set_name: str, **kwargs: Any - ) -> AsyncItemPaged["_models.Rule"]: - """Lists all of the existing delivery rules within a rule set. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param rule_set_name: Name of the rule set under the profile. Required. - :type rule_set_name: str - :return: An iterator like instance of either Rule or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cdn.models.Rule] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.RuleListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_rule_set_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - rule_set_name=rule_set_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("RuleListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get( - self, resource_group_name: str, profile_name: str, rule_set_name: str, rule_name: str, **kwargs: Any - ) -> _models.Rule: - """Gets an existing delivery rule within a rule set. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param rule_set_name: Name of the rule set under the profile. Required. - :type rule_set_name: str - :param rule_name: Name of the delivery rule which is unique within the endpoint. Required. - :type rule_name: str - :return: Rule or the result of cls(response) - :rtype: ~azure.mgmt.cdn.models.Rule - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.Rule] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - rule_set_name=rule_set_name, - rule_name=rule_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("Rule", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - async def _create_initial( - self, - resource_group_name: str, - profile_name: str, - rule_set_name: str, - rule_name: str, - rule: Union[_models.Rule, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(rule, (IOBase, bytes)): - _content = rule - else: - _json = self._serialize.body(rule, "Rule") - - _request = build_create_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - rule_set_name=rule_set_name, - rule_name=rule_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_create( - self, - resource_group_name: str, - profile_name: str, - rule_set_name: str, - rule_name: str, - rule: _models.Rule, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.Rule]: - """Creates a new delivery rule within the specified rule set. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param rule_set_name: Name of the rule set under the profile. Required. - :type rule_set_name: str - :param rule_name: Name of the delivery rule which is unique within the endpoint. Required. - :type rule_name: str - :param rule: The delivery rule properties. Required. - :type rule: ~azure.mgmt.cdn.models.Rule - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either Rule or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.Rule] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_create( - self, - resource_group_name: str, - profile_name: str, - rule_set_name: str, - rule_name: str, - rule: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.Rule]: - """Creates a new delivery rule within the specified rule set. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param rule_set_name: Name of the rule set under the profile. Required. - :type rule_set_name: str - :param rule_name: Name of the delivery rule which is unique within the endpoint. Required. - :type rule_name: str - :param rule: The delivery rule properties. Required. - :type rule: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either Rule or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.Rule] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_create( - self, - resource_group_name: str, - profile_name: str, - rule_set_name: str, - rule_name: str, - rule: Union[_models.Rule, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.Rule]: - """Creates a new delivery rule within the specified rule set. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param rule_set_name: Name of the rule set under the profile. Required. - :type rule_set_name: str - :param rule_name: Name of the delivery rule which is unique within the endpoint. Required. - :type rule_name: str - :param rule: The delivery rule properties. Is either a Rule type or a IO[bytes] type. Required. - :type rule: ~azure.mgmt.cdn.models.Rule or IO[bytes] - :return: An instance of AsyncLROPoller that returns either Rule or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.Rule] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.Rule] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._create_initial( - resource_group_name=resource_group_name, - profile_name=profile_name, - rule_set_name=rule_set_name, - rule_name=rule_name, - rule=rule, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("Rule", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, - AsyncARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.Rule].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.Rule]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _update_initial( - self, - resource_group_name: str, - profile_name: str, - rule_set_name: str, - rule_name: str, - rule_update_properties: Union[_models.RuleUpdateParameters, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(rule_update_properties, (IOBase, bytes)): - _content = rule_update_properties - else: - _json = self._serialize.body(rule_update_properties, "RuleUpdateParameters") - - _request = build_update_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - rule_set_name=rule_set_name, - rule_name=rule_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_update( - self, - resource_group_name: str, - profile_name: str, - rule_set_name: str, - rule_name: str, - rule_update_properties: _models.RuleUpdateParameters, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.Rule]: - """Updates an existing delivery rule within a rule set. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param rule_set_name: Name of the rule set under the profile. Required. - :type rule_set_name: str - :param rule_name: Name of the delivery rule which is unique within the endpoint. Required. - :type rule_name: str - :param rule_update_properties: Delivery rule properties. Required. - :type rule_update_properties: ~azure.mgmt.cdn.models.RuleUpdateParameters - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either Rule or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.Rule] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_update( - self, - resource_group_name: str, - profile_name: str, - rule_set_name: str, - rule_name: str, - rule_update_properties: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.Rule]: - """Updates an existing delivery rule within a rule set. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param rule_set_name: Name of the rule set under the profile. Required. - :type rule_set_name: str - :param rule_name: Name of the delivery rule which is unique within the endpoint. Required. - :type rule_name: str - :param rule_update_properties: Delivery rule properties. Required. - :type rule_update_properties: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either Rule or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.Rule] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_update( - self, - resource_group_name: str, - profile_name: str, - rule_set_name: str, - rule_name: str, - rule_update_properties: Union[_models.RuleUpdateParameters, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.Rule]: - """Updates an existing delivery rule within a rule set. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param rule_set_name: Name of the rule set under the profile. Required. - :type rule_set_name: str - :param rule_name: Name of the delivery rule which is unique within the endpoint. Required. - :type rule_name: str - :param rule_update_properties: Delivery rule properties. Is either a RuleUpdateParameters type - or a IO[bytes] type. Required. - :type rule_update_properties: ~azure.mgmt.cdn.models.RuleUpdateParameters or IO[bytes] - :return: An instance of AsyncLROPoller that returns either Rule or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.Rule] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.Rule] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._update_initial( - resource_group_name=resource_group_name, - profile_name=profile_name, - rule_set_name=rule_set_name, - rule_name=rule_name, - rule_update_properties=rule_update_properties, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("Rule", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, - AsyncARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.Rule].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.Rule]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _delete_initial( - self, resource_group_name: str, profile_name: str, rule_set_name: str, rule_name: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - rule_set_name=rule_set_name, - rule_name=rule_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_delete( - self, resource_group_name: str, profile_name: str, rule_set_name: str, rule_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: - """Deletes an existing delivery rule within a rule set. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param rule_set_name: Name of the rule set under the profile. Required. - :type rule_set_name: str - :param rule_name: Name of the delivery rule which is unique within the endpoint. Required. - :type rule_name: str - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._delete_initial( - resource_group_name=resource_group_name, - profile_name=profile_name, - rule_set_name=rule_set_name, - rule_name=rule_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, - AsyncARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_secrets_operations.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_secrets_operations.py deleted file mode 100644 index a118b39e66a2..000000000000 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_secrets_operations.py +++ /dev/null @@ -1,555 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._secrets_operations import ( - build_create_request, - build_delete_request, - build_get_request, - build_list_by_profile_request, -) -from .._configuration import CdnManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class SecretsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.cdn.aio.CdnManagementClient`'s - :attr:`secrets` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: CdnManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_profile( - self, resource_group_name: str, profile_name: str, **kwargs: Any - ) -> AsyncItemPaged["_models.Secret"]: - """Lists existing AzureFrontDoor secrets. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :return: An iterator like instance of either Secret or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cdn.models.Secret] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.SecretListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_profile_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("SecretListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get(self, resource_group_name: str, profile_name: str, secret_name: str, **kwargs: Any) -> _models.Secret: - """Gets an existing Secret within a profile. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param secret_name: Name of the Secret under the profile. Required. - :type secret_name: str - :return: Secret or the result of cls(response) - :rtype: ~azure.mgmt.cdn.models.Secret - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.Secret] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - secret_name=secret_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("Secret", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - async def _create_initial( - self, - resource_group_name: str, - profile_name: str, - secret_name: str, - secret: Union[_models.Secret, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(secret, (IOBase, bytes)): - _content = secret - else: - _json = self._serialize.body(secret, "Secret") - - _request = build_create_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - secret_name=secret_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_create( - self, - resource_group_name: str, - profile_name: str, - secret_name: str, - secret: _models.Secret, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.Secret]: - """Creates a new Secret within the specified profile. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param secret_name: Name of the Secret under the profile. Required. - :type secret_name: str - :param secret: The Secret properties. Required. - :type secret: ~azure.mgmt.cdn.models.Secret - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either Secret or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.Secret] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_create( - self, - resource_group_name: str, - profile_name: str, - secret_name: str, - secret: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.Secret]: - """Creates a new Secret within the specified profile. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param secret_name: Name of the Secret under the profile. Required. - :type secret_name: str - :param secret: The Secret properties. Required. - :type secret: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either Secret or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.Secret] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_create( - self, - resource_group_name: str, - profile_name: str, - secret_name: str, - secret: Union[_models.Secret, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.Secret]: - """Creates a new Secret within the specified profile. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param secret_name: Name of the Secret under the profile. Required. - :type secret_name: str - :param secret: The Secret properties. Is either a Secret type or a IO[bytes] type. Required. - :type secret: ~azure.mgmt.cdn.models.Secret or IO[bytes] - :return: An instance of AsyncLROPoller that returns either Secret or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.Secret] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.Secret] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._create_initial( - resource_group_name=resource_group_name, - profile_name=profile_name, - secret_name=secret_name, - secret=secret, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("Secret", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, - AsyncARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.Secret].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.Secret]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _delete_initial( - self, resource_group_name: str, profile_name: str, secret_name: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - secret_name=secret_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_delete( - self, resource_group_name: str, profile_name: str, secret_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: - """Deletes an existing Secret within profile. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param secret_name: Name of the Secret under the profile. Required. - :type secret_name: str - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._delete_initial( - resource_group_name=resource_group_name, - profile_name=profile_name, - secret_name=secret_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, - AsyncARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_security_policies_operations.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_security_policies_operations.py deleted file mode 100644 index 95830f6d2efa..000000000000 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_security_policies_operations.py +++ /dev/null @@ -1,778 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._security_policies_operations import ( - build_create_request, - build_delete_request, - build_get_request, - build_list_by_profile_request, - build_patch_request, -) -from .._configuration import CdnManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class SecurityPoliciesOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.cdn.aio.CdnManagementClient`'s - :attr:`security_policies` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: CdnManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_profile( - self, resource_group_name: str, profile_name: str, **kwargs: Any - ) -> AsyncItemPaged["_models.SecurityPolicy"]: - """Lists security policies associated with the profile. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :return: An iterator like instance of either SecurityPolicy or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cdn.models.SecurityPolicy] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.SecurityPolicyListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_profile_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("SecurityPolicyListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get( - self, resource_group_name: str, profile_name: str, security_policy_name: str, **kwargs: Any - ) -> _models.SecurityPolicy: - """Gets an existing security policy within a profile. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param security_policy_name: Name of the security policy under the profile. Required. - :type security_policy_name: str - :return: SecurityPolicy or the result of cls(response) - :rtype: ~azure.mgmt.cdn.models.SecurityPolicy - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.SecurityPolicy] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - security_policy_name=security_policy_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("SecurityPolicy", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - async def _create_initial( - self, - resource_group_name: str, - profile_name: str, - security_policy_name: str, - security_policy: Union[_models.SecurityPolicy, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(security_policy, (IOBase, bytes)): - _content = security_policy - else: - _json = self._serialize.body(security_policy, "SecurityPolicy") - - _request = build_create_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - security_policy_name=security_policy_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_create( - self, - resource_group_name: str, - profile_name: str, - security_policy_name: str, - security_policy: _models.SecurityPolicy, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.SecurityPolicy]: - """Creates a new security policy within the specified profile. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param security_policy_name: Name of the security policy under the profile. Required. - :type security_policy_name: str - :param security_policy: The security policy properties. Required. - :type security_policy: ~azure.mgmt.cdn.models.SecurityPolicy - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either SecurityPolicy or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.SecurityPolicy] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_create( - self, - resource_group_name: str, - profile_name: str, - security_policy_name: str, - security_policy: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.SecurityPolicy]: - """Creates a new security policy within the specified profile. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param security_policy_name: Name of the security policy under the profile. Required. - :type security_policy_name: str - :param security_policy: The security policy properties. Required. - :type security_policy: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either SecurityPolicy or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.SecurityPolicy] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_create( - self, - resource_group_name: str, - profile_name: str, - security_policy_name: str, - security_policy: Union[_models.SecurityPolicy, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.SecurityPolicy]: - """Creates a new security policy within the specified profile. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param security_policy_name: Name of the security policy under the profile. Required. - :type security_policy_name: str - :param security_policy: The security policy properties. Is either a SecurityPolicy type or a - IO[bytes] type. Required. - :type security_policy: ~azure.mgmt.cdn.models.SecurityPolicy or IO[bytes] - :return: An instance of AsyncLROPoller that returns either SecurityPolicy or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.SecurityPolicy] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.SecurityPolicy] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._create_initial( - resource_group_name=resource_group_name, - profile_name=profile_name, - security_policy_name=security_policy_name, - security_policy=security_policy, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("SecurityPolicy", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, - AsyncARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.SecurityPolicy].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.SecurityPolicy]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _patch_initial( - self, - resource_group_name: str, - profile_name: str, - security_policy_name: str, - security_policy_update_properties: Union[_models.SecurityPolicyUpdateParameters, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(security_policy_update_properties, (IOBase, bytes)): - _content = security_policy_update_properties - else: - _json = self._serialize.body(security_policy_update_properties, "SecurityPolicyUpdateParameters") - - _request = build_patch_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - security_policy_name=security_policy_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_patch( - self, - resource_group_name: str, - profile_name: str, - security_policy_name: str, - security_policy_update_properties: _models.SecurityPolicyUpdateParameters, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.SecurityPolicy]: - """Updates an existing security policy within a profile. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param security_policy_name: Name of the security policy under the profile. Required. - :type security_policy_name: str - :param security_policy_update_properties: Security policy update properties. Required. - :type security_policy_update_properties: ~azure.mgmt.cdn.models.SecurityPolicyUpdateParameters - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either SecurityPolicy or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.SecurityPolicy] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_patch( - self, - resource_group_name: str, - profile_name: str, - security_policy_name: str, - security_policy_update_properties: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.SecurityPolicy]: - """Updates an existing security policy within a profile. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param security_policy_name: Name of the security policy under the profile. Required. - :type security_policy_name: str - :param security_policy_update_properties: Security policy update properties. Required. - :type security_policy_update_properties: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either SecurityPolicy or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.SecurityPolicy] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_patch( - self, - resource_group_name: str, - profile_name: str, - security_policy_name: str, - security_policy_update_properties: Union[_models.SecurityPolicyUpdateParameters, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.SecurityPolicy]: - """Updates an existing security policy within a profile. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param security_policy_name: Name of the security policy under the profile. Required. - :type security_policy_name: str - :param security_policy_update_properties: Security policy update properties. Is either a - SecurityPolicyUpdateParameters type or a IO[bytes] type. Required. - :type security_policy_update_properties: ~azure.mgmt.cdn.models.SecurityPolicyUpdateParameters - or IO[bytes] - :return: An instance of AsyncLROPoller that returns either SecurityPolicy or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cdn.models.SecurityPolicy] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.SecurityPolicy] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._patch_initial( - resource_group_name=resource_group_name, - profile_name=profile_name, - security_policy_name=security_policy_name, - security_policy_update_properties=security_policy_update_properties, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("SecurityPolicy", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, - AsyncARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.SecurityPolicy].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.SecurityPolicy]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _delete_initial( - self, resource_group_name: str, profile_name: str, security_policy_name: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - security_policy_name=security_policy_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_delete( - self, resource_group_name: str, profile_name: str, security_policy_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: - """Deletes an existing security policy within profile. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param security_policy_name: Name of the security policy under the profile. Required. - :type security_policy_name: str - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._delete_initial( - resource_group_name=resource_group_name, - profile_name=profile_name, - security_policy_name=security_policy_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, - AsyncARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/__init__.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/__init__.py index 9683d9045ff6..11e337f9d888 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/__init__.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/__init__.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # pylint: disable=wrong-import-position @@ -13,26 +13,22 @@ from ._patch import * # pylint: disable=unused-wildcard-import -from ._models_py3 import ( # type: ignore +from ._models import ( # type: ignore AFDDomain, AFDDomainHttpsCustomizedCipherSuiteSet, AFDDomainHttpsParameters, - AFDDomainListResult, AFDDomainProperties, AFDDomainUpdateParameters, AFDDomainUpdatePropertiesParameters, AFDEndpoint, - AFDEndpointListResult, AFDEndpointProperties, AFDEndpointPropertiesUpdateParameters, AFDEndpointUpdateParameters, AFDOrigin, AFDOriginGroup, - AFDOriginGroupListResult, AFDOriginGroupProperties, AFDOriginGroupUpdateParameters, AFDOriginGroupUpdatePropertiesParameters, - AFDOriginListResult, AFDOriginProperties, AFDOriginUpdateParameters, AFDOriginUpdatePropertiesParameters, @@ -40,21 +36,20 @@ ActivatedResourceReference, AfdPurgeParameters, AfdRouteCacheConfiguration, - AzureFirstPartyManagedCertificate, AzureFirstPartyManagedCertificateParameters, CacheConfiguration, CacheExpirationActionParameters, CacheKeyQueryStringActionParameters, CanMigrateParameters, + CanMigrateProperties, CanMigrateResult, CdnCertificateSourceParameters, CdnEndpoint, CdnManagedHttpsParameters, CdnMigrationToAfdParameters, CdnWebApplicationFirewallPolicy, - CdnWebApplicationFirewallPolicyList, CdnWebApplicationFirewallPolicyPatchParameters, - Certificate, + CdnWebApplicationFirewallPolicyProperties, CertificateSourceParameters, CheckEndpointNameAvailabilityInput, CheckEndpointNameAvailabilityOutput, @@ -73,15 +68,18 @@ CookiesMatchConditionParameters, CustomDomain, CustomDomainHttpsParameters, - CustomDomainListResult, CustomDomainParameters, + CustomDomainProperties, + CustomDomainPropertiesParameters, CustomRule, CustomRuleList, - CustomerCertificate, CustomerCertificateParameters, DeepCreatedCustomDomain, + DeepCreatedCustomDomainProperties, DeepCreatedOrigin, DeepCreatedOriginGroup, + DeepCreatedOriginGroupProperties, + DeepCreatedOriginProperties, DeliveryRule, DeliveryRuleAction, DeliveryRuleActionParameters, @@ -114,9 +112,8 @@ DimensionProperties, DomainValidationProperties, EdgeNode, - EdgenodeResult, + EdgeNodeProperties, Endpoint, - EndpointListResult, EndpointProperties, EndpointPropertiesUpdateParameters, EndpointPropertiesUpdateParametersDeliveryPolicy, @@ -138,7 +135,6 @@ LoadBalancingSettingsParameters, LoadParameters, LogSpecification, - ManagedCertificate, ManagedCertificateParameters, ManagedRuleDefinition, ManagedRuleGroupDefinition, @@ -146,7 +142,7 @@ ManagedRuleOverride, ManagedRuleSet, ManagedRuleSetDefinition, - ManagedRuleSetDefinitionList, + ManagedRuleSetDefinitionProperties, ManagedRuleSetList, ManagedServiceIdentity, MatchCondition, @@ -156,24 +152,23 @@ MetricsResponseSeriesItem, MetricsResponseSeriesPropertiesItemsItem, MigrateResult, + MigrateResultProperties, MigrationEndpointMapping, MigrationErrorType, MigrationParameters, MigrationWebApplicationFirewallMapping, Operation, OperationDisplay, - OperationsListResult, + OperationProperties, Origin, OriginAuthenticationProperties, OriginGroup, - OriginGroupListResult, OriginGroupOverride, OriginGroupOverrideAction, OriginGroupOverrideActionParameters, OriginGroupProperties, OriginGroupUpdateParameters, OriginGroupUpdatePropertiesParameters, - OriginListResult, OriginProperties, OriginUpdateParameters, OriginUpdatePropertiesParameters, @@ -181,8 +176,9 @@ PostArgsMatchConditionParameters, Profile, ProfileChangeSkuWafMapping, - ProfileListResult, ProfileLogScrubbing, + ProfileProperties, + ProfilePropertiesUpdateParameters, ProfileScrubbingRules, ProfileUpdateParameters, ProfileUpgradeParameters, @@ -204,7 +200,6 @@ Resource, ResourceReference, ResourceUsage, - ResourceUsageListResult, ResourcesResponse, ResourcesResponseCustomDomainsItem, ResourcesResponseEndpointsItem, @@ -212,27 +207,23 @@ ResponseBasedOriginErrorDetectionParameters, Route, RouteConfigurationOverrideActionParameters, - RouteListResult, RouteProperties, RouteUpdateParameters, RouteUpdatePropertiesParameters, Rule, - RuleListResult, RuleProperties, RuleSet, - RuleSetListResult, RuleSetProperties, RuleUpdateParameters, RuleUpdatePropertiesParameters, Secret, - SecretListResult, SecretParameters, SecretProperties, SecurityPolicy, - SecurityPolicyListResult, SecurityPolicyProperties, SecurityPolicyPropertiesParameters, SecurityPolicyUpdateParameters, + SecurityPolicyUpdateProperties, SecurityPolicyWebApplicationFirewallAssociation, SecurityPolicyWebApplicationFirewallParameters, ServerPortMatchConditionParameters, @@ -259,7 +250,6 @@ UrlSigningParamIdentifier, Usage, UsageName, - UsagesListResult, UserAssignedIdentity, UserManagedHttpsParameters, ValidateCustomDomainInput, @@ -268,7 +258,6 @@ ValidateProbeOutput, ValidateSecretInput, ValidateSecretOutput, - ValidationToken, WafMetricsResponse, WafMetricsResponseSeriesItem, WafMetricsResponseSeriesPropertiesItemsItem, @@ -276,7 +265,7 @@ WafRankingsResponseDataItem, ) -from ._cdn_management_client_enums import ( # type: ignore +from ._enums import ( # type: ignore AFDEndpointProtocols, ActionType, AfdCertificateType, @@ -302,7 +291,7 @@ CustomHttpsProvisioningSubstate, CustomRuleEnabledState, DeleteRule, - DeliveryRuleActionEnum, + DeliveryRuleActionName, DeliveryRuleActionParametersType, DeliveryRuleConditionParametersType, DeploymentStatus, @@ -409,22 +398,18 @@ "AFDDomain", "AFDDomainHttpsCustomizedCipherSuiteSet", "AFDDomainHttpsParameters", - "AFDDomainListResult", "AFDDomainProperties", "AFDDomainUpdateParameters", "AFDDomainUpdatePropertiesParameters", "AFDEndpoint", - "AFDEndpointListResult", "AFDEndpointProperties", "AFDEndpointPropertiesUpdateParameters", "AFDEndpointUpdateParameters", "AFDOrigin", "AFDOriginGroup", - "AFDOriginGroupListResult", "AFDOriginGroupProperties", "AFDOriginGroupUpdateParameters", "AFDOriginGroupUpdatePropertiesParameters", - "AFDOriginListResult", "AFDOriginProperties", "AFDOriginUpdateParameters", "AFDOriginUpdatePropertiesParameters", @@ -432,21 +417,20 @@ "ActivatedResourceReference", "AfdPurgeParameters", "AfdRouteCacheConfiguration", - "AzureFirstPartyManagedCertificate", "AzureFirstPartyManagedCertificateParameters", "CacheConfiguration", "CacheExpirationActionParameters", "CacheKeyQueryStringActionParameters", "CanMigrateParameters", + "CanMigrateProperties", "CanMigrateResult", "CdnCertificateSourceParameters", "CdnEndpoint", "CdnManagedHttpsParameters", "CdnMigrationToAfdParameters", "CdnWebApplicationFirewallPolicy", - "CdnWebApplicationFirewallPolicyList", "CdnWebApplicationFirewallPolicyPatchParameters", - "Certificate", + "CdnWebApplicationFirewallPolicyProperties", "CertificateSourceParameters", "CheckEndpointNameAvailabilityInput", "CheckEndpointNameAvailabilityOutput", @@ -465,15 +449,18 @@ "CookiesMatchConditionParameters", "CustomDomain", "CustomDomainHttpsParameters", - "CustomDomainListResult", "CustomDomainParameters", + "CustomDomainProperties", + "CustomDomainPropertiesParameters", "CustomRule", "CustomRuleList", - "CustomerCertificate", "CustomerCertificateParameters", "DeepCreatedCustomDomain", + "DeepCreatedCustomDomainProperties", "DeepCreatedOrigin", "DeepCreatedOriginGroup", + "DeepCreatedOriginGroupProperties", + "DeepCreatedOriginProperties", "DeliveryRule", "DeliveryRuleAction", "DeliveryRuleActionParameters", @@ -506,9 +493,8 @@ "DimensionProperties", "DomainValidationProperties", "EdgeNode", - "EdgenodeResult", + "EdgeNodeProperties", "Endpoint", - "EndpointListResult", "EndpointProperties", "EndpointPropertiesUpdateParameters", "EndpointPropertiesUpdateParametersDeliveryPolicy", @@ -530,7 +516,6 @@ "LoadBalancingSettingsParameters", "LoadParameters", "LogSpecification", - "ManagedCertificate", "ManagedCertificateParameters", "ManagedRuleDefinition", "ManagedRuleGroupDefinition", @@ -538,7 +523,7 @@ "ManagedRuleOverride", "ManagedRuleSet", "ManagedRuleSetDefinition", - "ManagedRuleSetDefinitionList", + "ManagedRuleSetDefinitionProperties", "ManagedRuleSetList", "ManagedServiceIdentity", "MatchCondition", @@ -548,24 +533,23 @@ "MetricsResponseSeriesItem", "MetricsResponseSeriesPropertiesItemsItem", "MigrateResult", + "MigrateResultProperties", "MigrationEndpointMapping", "MigrationErrorType", "MigrationParameters", "MigrationWebApplicationFirewallMapping", "Operation", "OperationDisplay", - "OperationsListResult", + "OperationProperties", "Origin", "OriginAuthenticationProperties", "OriginGroup", - "OriginGroupListResult", "OriginGroupOverride", "OriginGroupOverrideAction", "OriginGroupOverrideActionParameters", "OriginGroupProperties", "OriginGroupUpdateParameters", "OriginGroupUpdatePropertiesParameters", - "OriginListResult", "OriginProperties", "OriginUpdateParameters", "OriginUpdatePropertiesParameters", @@ -573,8 +557,9 @@ "PostArgsMatchConditionParameters", "Profile", "ProfileChangeSkuWafMapping", - "ProfileListResult", "ProfileLogScrubbing", + "ProfileProperties", + "ProfilePropertiesUpdateParameters", "ProfileScrubbingRules", "ProfileUpdateParameters", "ProfileUpgradeParameters", @@ -596,7 +581,6 @@ "Resource", "ResourceReference", "ResourceUsage", - "ResourceUsageListResult", "ResourcesResponse", "ResourcesResponseCustomDomainsItem", "ResourcesResponseEndpointsItem", @@ -604,27 +588,23 @@ "ResponseBasedOriginErrorDetectionParameters", "Route", "RouteConfigurationOverrideActionParameters", - "RouteListResult", "RouteProperties", "RouteUpdateParameters", "RouteUpdatePropertiesParameters", "Rule", - "RuleListResult", "RuleProperties", "RuleSet", - "RuleSetListResult", "RuleSetProperties", "RuleUpdateParameters", "RuleUpdatePropertiesParameters", "Secret", - "SecretListResult", "SecretParameters", "SecretProperties", "SecurityPolicy", - "SecurityPolicyListResult", "SecurityPolicyProperties", "SecurityPolicyPropertiesParameters", "SecurityPolicyUpdateParameters", + "SecurityPolicyUpdateProperties", "SecurityPolicyWebApplicationFirewallAssociation", "SecurityPolicyWebApplicationFirewallParameters", "ServerPortMatchConditionParameters", @@ -651,7 +631,6 @@ "UrlSigningParamIdentifier", "Usage", "UsageName", - "UsagesListResult", "UserAssignedIdentity", "UserManagedHttpsParameters", "ValidateCustomDomainInput", @@ -660,7 +639,6 @@ "ValidateProbeOutput", "ValidateSecretInput", "ValidateSecretOutput", - "ValidationToken", "WafMetricsResponse", "WafMetricsResponseSeriesItem", "WafMetricsResponseSeriesPropertiesItemsItem", @@ -691,7 +669,7 @@ "CustomHttpsProvisioningSubstate", "CustomRuleEnabledState", "DeleteRule", - "DeliveryRuleActionEnum", + "DeliveryRuleActionName", "DeliveryRuleActionParametersType", "DeliveryRuleConditionParametersType", "DeploymentStatus", diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/_cdn_management_client_enums.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/_enums.py similarity index 70% rename from sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/_cdn_management_client_enums.py rename to sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/_enums.py index 23b9403b07e0..ffcf4a448c9d 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/_cdn_management_client_enums.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/_enums.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -15,69 +15,98 @@ class ActionType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Defines the action to take on rule match.""" ALLOW = "Allow" + """ALLOW.""" BLOCK = "Block" + """BLOCK.""" LOG = "Log" + """LOG.""" REDIRECT = "Redirect" + """REDIRECT.""" class AfdCertificateType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Defines the source of the SSL certificate.""" CUSTOMER_CERTIFICATE = "CustomerCertificate" + """CUSTOMER_CERTIFICATE.""" MANAGED_CERTIFICATE = "ManagedCertificate" + """MANAGED_CERTIFICATE.""" AZURE_FIRST_PARTY_MANAGED_CERTIFICATE = "AzureFirstPartyManagedCertificate" + """AZURE_FIRST_PARTY_MANAGED_CERTIFICATE.""" class AfdCipherSuiteSetType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """cipher suite set type that will be used for Https.""" CUSTOMIZED = "Customized" + """CUSTOMIZED.""" TLS10_2019 = "TLS10_2019" + """TLS10_2019.""" TLS12_2022 = "TLS12_2022" + """TLS12_2022.""" TLS12_2023 = "TLS12_2023" + """TLS12_2023.""" class AfdCustomizedCipherSuiteForTls12(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """AfdCustomizedCipherSuiteForTls12.""" + """Type of AfdCustomizedCipherSuiteForTls12.""" ECDHE_RSA_AES128_GCM_SHA256 = "ECDHE_RSA_AES128_GCM_SHA256" + """ECDHE_RSA_AES128_GCM_SHA256.""" ECDHE_RSA_AES256_GCM_SHA384 = "ECDHE_RSA_AES256_GCM_SHA384" + """ECDHE_RSA_AES256_GCM_SHA384.""" DHE_RSA_AES256_GCM_SHA384 = "DHE_RSA_AES256_GCM_SHA384" + """DHE_RSA_AES256_GCM_SHA384.""" DHE_RSA_AES128_GCM_SHA256 = "DHE_RSA_AES128_GCM_SHA256" + """DHE_RSA_AES128_GCM_SHA256.""" ECDHE_RSA_AES128_SHA256 = "ECDHE_RSA_AES128_SHA256" + """ECDHE_RSA_AES128_SHA256.""" ECDHE_RSA_AES256_SHA384 = "ECDHE_RSA_AES256_SHA384" + """ECDHE_RSA_AES256_SHA384.""" class AfdCustomizedCipherSuiteForTls13(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """AfdCustomizedCipherSuiteForTls13.""" + """Type of AfdCustomizedCipherSuiteForTls13.""" TLS_AES128_GCM_SHA256 = "TLS_AES_128_GCM_SHA256" + """TLS_AES128_GCM_SHA256.""" TLS_AES256_GCM_SHA384 = "TLS_AES_256_GCM_SHA384" + """TLS_AES256_GCM_SHA384.""" class AFDEndpointProtocols(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Supported protocols for the customer's endpoint.""" HTTP = "Http" + """HTTP.""" HTTPS = "Https" + """HTTPS.""" class AfdMinimumTlsVersion(str, Enum, metaclass=CaseInsensitiveEnumMeta): """TLS protocol version that will be used for Https when cipherSuiteSetType is Customized.""" TLS10 = "TLS10" + """TLS10.""" TLS12 = "TLS12" + """TLS12.""" TLS13 = "TLS13" + """TLS13.""" class AfdProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Provisioning status.""" SUCCEEDED = "Succeeded" + """SUCCEEDED.""" FAILED = "Failed" + """FAILED.""" UPDATING = "Updating" + """UPDATING.""" DELETING = "Deleting" + """DELETING.""" CREATING = "Creating" + """CREATING.""" class AfdQueryStringCachingBehavior(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -87,123 +116,176 @@ class AfdQueryStringCachingBehavior(str, Enum, metaclass=CaseInsensitiveEnumMeta """ IGNORE_QUERY_STRING = "IgnoreQueryString" + """IGNORE_QUERY_STRING.""" USE_QUERY_STRING = "UseQueryString" + """USE_QUERY_STRING.""" IGNORE_SPECIFIED_QUERY_STRINGS = "IgnoreSpecifiedQueryStrings" + """IGNORE_SPECIFIED_QUERY_STRINGS.""" INCLUDE_SPECIFIED_QUERY_STRINGS = "IncludeSpecifiedQueryStrings" + """INCLUDE_SPECIFIED_QUERY_STRINGS.""" class Algorithm(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Algorithm to use for URL signing.""" SHA256 = "SHA256" + """SHA256.""" class AutoGeneratedDomainNameLabelScope(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Indicates the endpoint name reuse scope. The default value is TenantReuse.""" TENANT_REUSE = "TenantReuse" + """TENANT_REUSE.""" SUBSCRIPTION_REUSE = "SubscriptionReuse" + """SUBSCRIPTION_REUSE.""" RESOURCE_GROUP_REUSE = "ResourceGroupReuse" + """RESOURCE_GROUP_REUSE.""" NO_REUSE = "NoReuse" + """NO_REUSE.""" class CacheBehavior(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Caching behavior for the requests.""" BYPASS_CACHE = "BypassCache" + """BYPASS_CACHE.""" OVERRIDE = "Override" + """OVERRIDE.""" SET_IF_MISSING = "SetIfMissing" + """SET_IF_MISSING.""" class CacheType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The level at which the content needs to be cached.""" ALL = "All" + """ALL.""" class CanMigrateDefaultSku(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Recommended sku for the migration.""" STANDARD_AZURE_FRONT_DOOR = "Standard_AzureFrontDoor" + """STANDARD_AZURE_FRONT_DOOR.""" PREMIUM_AZURE_FRONT_DOOR = "Premium_AzureFrontDoor" + """PREMIUM_AZURE_FRONT_DOOR.""" class CertificateSource(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Defines the source of the SSL certificate.""" AZURE_KEY_VAULT = "AzureKeyVault" + """AZURE_KEY_VAULT.""" CDN = "Cdn" + """CDN.""" class CertificateSourceParametersType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """CertificateSourceParametersType.""" + """Type of CertificateSourceParametersType.""" CDN_CERTIFICATE_SOURCE_PARAMETERS = "CdnCertificateSourceParameters" + """CDN_CERTIFICATE_SOURCE_PARAMETERS.""" KEY_VAULT_CERTIFICATE_SOURCE_PARAMETERS = "KeyVaultCertificateSourceParameters" + """KEY_VAULT_CERTIFICATE_SOURCE_PARAMETERS.""" class CertificateType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Type of certificate used.""" SHARED = "Shared" + """SHARED.""" DEDICATED = "Dedicated" + """DEDICATED.""" class ClientPortOperator(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Describes operator to be matched.""" ANY = "Any" + """ANY.""" EQUAL = "Equal" + """EQUAL.""" CONTAINS = "Contains" + """CONTAINS.""" BEGINS_WITH = "BeginsWith" + """BEGINS_WITH.""" ENDS_WITH = "EndsWith" + """ENDS_WITH.""" LESS_THAN = "LessThan" + """LESS_THAN.""" LESS_THAN_OR_EQUAL = "LessThanOrEqual" + """LESS_THAN_OR_EQUAL.""" GREATER_THAN = "GreaterThan" + """GREATER_THAN.""" GREATER_THAN_OR_EQUAL = "GreaterThanOrEqual" + """GREATER_THAN_OR_EQUAL.""" REG_EX = "RegEx" + """REG_EX.""" class CookiesOperator(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Describes operator to be matched.""" ANY = "Any" + """ANY.""" EQUAL = "Equal" + """EQUAL.""" CONTAINS = "Contains" + """CONTAINS.""" BEGINS_WITH = "BeginsWith" + """BEGINS_WITH.""" ENDS_WITH = "EndsWith" + """ENDS_WITH.""" LESS_THAN = "LessThan" + """LESS_THAN.""" LESS_THAN_OR_EQUAL = "LessThanOrEqual" + """LESS_THAN_OR_EQUAL.""" GREATER_THAN = "GreaterThan" + """GREATER_THAN.""" GREATER_THAN_OR_EQUAL = "GreaterThanOrEqual" + """GREATER_THAN_OR_EQUAL.""" REG_EX = "RegEx" + """REG_EX.""" class CreatedByType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """The type of identity that created the resource.""" + """The kind of entity that created the resource.""" USER = "User" + """The entity was created by a user.""" APPLICATION = "Application" + """The entity was created by an application.""" MANAGED_IDENTITY = "ManagedIdentity" + """The entity was created by a managed identity.""" KEY = "Key" + """The entity was created by a key.""" class CustomDomainResourceState(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Resource status of the custom domain.""" CREATING = "Creating" + """CREATING.""" ACTIVE = "Active" + """ACTIVE.""" DELETING = "Deleting" + """DELETING.""" class CustomHttpsProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Provisioning status of the custom domain.""" ENABLING = "Enabling" + """ENABLING.""" ENABLED = "Enabled" + """ENABLED.""" DISABLING = "Disabling" + """DISABLING.""" DISABLED = "Disabled" + """DISABLED.""" FAILED = "Failed" + """FAILED.""" class CustomHttpsProvisioningSubstate(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -212,15 +294,25 @@ class CustomHttpsProvisioningSubstate(str, Enum, metaclass=CaseInsensitiveEnumMe """ SUBMITTING_DOMAIN_CONTROL_VALIDATION_REQUEST = "SubmittingDomainControlValidationRequest" + """SUBMITTING_DOMAIN_CONTROL_VALIDATION_REQUEST.""" PENDING_DOMAIN_CONTROL_VALIDATION_R_EQUEST_APPROVAL = "PendingDomainControlValidationREquestApproval" + """PENDING_DOMAIN_CONTROL_VALIDATION_R_EQUEST_APPROVAL.""" DOMAIN_CONTROL_VALIDATION_REQUEST_APPROVED = "DomainControlValidationRequestApproved" + """DOMAIN_CONTROL_VALIDATION_REQUEST_APPROVED.""" DOMAIN_CONTROL_VALIDATION_REQUEST_REJECTED = "DomainControlValidationRequestRejected" + """DOMAIN_CONTROL_VALIDATION_REQUEST_REJECTED.""" DOMAIN_CONTROL_VALIDATION_REQUEST_TIMED_OUT = "DomainControlValidationRequestTimedOut" + """DOMAIN_CONTROL_VALIDATION_REQUEST_TIMED_OUT.""" ISSUING_CERTIFICATE = "IssuingCertificate" + """ISSUING_CERTIFICATE.""" DEPLOYING_CERTIFICATE = "DeployingCertificate" + """DEPLOYING_CERTIFICATE.""" CERTIFICATE_DEPLOYED = "CertificateDeployed" + """CERTIFICATE_DEPLOYED.""" DELETING_CERTIFICATE = "DeletingCertificate" + """DELETING_CERTIFICATE.""" CERTIFICATE_DELETED = "CertificateDeleted" + """CERTIFICATE_DELETED.""" class CustomRuleEnabledState(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -229,85 +321,131 @@ class CustomRuleEnabledState(str, Enum, metaclass=CaseInsensitiveEnumMeta): """ DISABLED = "Disabled" + """DISABLED.""" ENABLED = "Enabled" + """ENABLED.""" class DeleteRule(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Describes the action that shall be taken when the certificate is removed from Key Vault.""" NO_ACTION = "NoAction" + """NO_ACTION.""" -class DeliveryRuleActionEnum(str, Enum, metaclass=CaseInsensitiveEnumMeta): +class DeliveryRuleActionName(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The name of the action for the delivery rule.""" CACHE_EXPIRATION = "CacheExpiration" + """CACHE_EXPIRATION.""" CACHE_KEY_QUERY_STRING = "CacheKeyQueryString" + """CACHE_KEY_QUERY_STRING.""" MODIFY_REQUEST_HEADER = "ModifyRequestHeader" + """MODIFY_REQUEST_HEADER.""" MODIFY_RESPONSE_HEADER = "ModifyResponseHeader" + """MODIFY_RESPONSE_HEADER.""" URL_REDIRECT = "UrlRedirect" + """URL_REDIRECT.""" URL_REWRITE = "UrlRewrite" + """URL_REWRITE.""" URL_SIGNING = "UrlSigning" + """URL_SIGNING.""" ORIGIN_GROUP_OVERRIDE = "OriginGroupOverride" + """ORIGIN_GROUP_OVERRIDE.""" ROUTE_CONFIGURATION_OVERRIDE = "RouteConfigurationOverride" + """ROUTE_CONFIGURATION_OVERRIDE.""" class DeliveryRuleActionParametersType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """DeliveryRuleActionParametersType.""" + """Type of DeliveryRuleActionParametersType.""" DELIVERY_RULE_URL_REDIRECT_ACTION_PARAMETERS = "DeliveryRuleUrlRedirectActionParameters" + """DELIVERY_RULE_URL_REDIRECT_ACTION_PARAMETERS.""" DELIVERY_RULE_URL_SIGNING_ACTION_PARAMETERS = "DeliveryRuleUrlSigningActionParameters" + """DELIVERY_RULE_URL_SIGNING_ACTION_PARAMETERS.""" DELIVERY_RULE_ORIGIN_GROUP_OVERRIDE_ACTION_PARAMETERS = "DeliveryRuleOriginGroupOverrideActionParameters" + """DELIVERY_RULE_ORIGIN_GROUP_OVERRIDE_ACTION_PARAMETERS.""" DELIVERY_RULE_URL_REWRITE_ACTION_PARAMETERS = "DeliveryRuleUrlRewriteActionParameters" + """DELIVERY_RULE_URL_REWRITE_ACTION_PARAMETERS.""" DELIVERY_RULE_HEADER_ACTION_PARAMETERS = "DeliveryRuleHeaderActionParameters" + """DELIVERY_RULE_HEADER_ACTION_PARAMETERS.""" DELIVERY_RULE_CACHE_EXPIRATION_ACTION_PARAMETERS = "DeliveryRuleCacheExpirationActionParameters" + """DELIVERY_RULE_CACHE_EXPIRATION_ACTION_PARAMETERS.""" DELIVERY_RULE_CACHE_KEY_QUERY_STRING_BEHAVIOR_ACTION_PARAMETERS = ( "DeliveryRuleCacheKeyQueryStringBehaviorActionParameters" ) + """DELIVERY_RULE_CACHE_KEY_QUERY_STRING_BEHAVIOR_ACTION_PARAMETERS.""" DELIVERY_RULE_ROUTE_CONFIGURATION_OVERRIDE_ACTION_PARAMETERS = ( "DeliveryRuleRouteConfigurationOverrideActionParameters" ) + """DELIVERY_RULE_ROUTE_CONFIGURATION_OVERRIDE_ACTION_PARAMETERS.""" class DeliveryRuleConditionParametersType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """DeliveryRuleConditionParametersType.""" + """Type of DeliveryRuleConditionParametersType.""" DELIVERY_RULE_REMOTE_ADDRESS_CONDITION_PARAMETERS = "DeliveryRuleRemoteAddressConditionParameters" + """DELIVERY_RULE_REMOTE_ADDRESS_CONDITION_PARAMETERS.""" DELIVERY_RULE_REQUEST_METHOD_CONDITION_PARAMETERS = "DeliveryRuleRequestMethodConditionParameters" + """DELIVERY_RULE_REQUEST_METHOD_CONDITION_PARAMETERS.""" DELIVERY_RULE_QUERY_STRING_CONDITION_PARAMETERS = "DeliveryRuleQueryStringConditionParameters" + """DELIVERY_RULE_QUERY_STRING_CONDITION_PARAMETERS.""" DELIVERY_RULE_POST_ARGS_CONDITION_PARAMETERS = "DeliveryRulePostArgsConditionParameters" + """DELIVERY_RULE_POST_ARGS_CONDITION_PARAMETERS.""" DELIVERY_RULE_REQUEST_URI_CONDITION_PARAMETERS = "DeliveryRuleRequestUriConditionParameters" + """DELIVERY_RULE_REQUEST_URI_CONDITION_PARAMETERS.""" DELIVERY_RULE_REQUEST_HEADER_CONDITION_PARAMETERS = "DeliveryRuleRequestHeaderConditionParameters" + """DELIVERY_RULE_REQUEST_HEADER_CONDITION_PARAMETERS.""" DELIVERY_RULE_REQUEST_BODY_CONDITION_PARAMETERS = "DeliveryRuleRequestBodyConditionParameters" + """DELIVERY_RULE_REQUEST_BODY_CONDITION_PARAMETERS.""" DELIVERY_RULE_REQUEST_SCHEME_CONDITION_PARAMETERS = "DeliveryRuleRequestSchemeConditionParameters" + """DELIVERY_RULE_REQUEST_SCHEME_CONDITION_PARAMETERS.""" DELIVERY_RULE_URL_PATH_MATCH_CONDITION_PARAMETERS = "DeliveryRuleUrlPathMatchConditionParameters" + """DELIVERY_RULE_URL_PATH_MATCH_CONDITION_PARAMETERS.""" DELIVERY_RULE_URL_FILE_EXTENSION_MATCH_CONDITION_PARAMETERS = "DeliveryRuleUrlFileExtensionMatchConditionParameters" + """DELIVERY_RULE_URL_FILE_EXTENSION_MATCH_CONDITION_PARAMETERS.""" DELIVERY_RULE_URL_FILENAME_CONDITION_PARAMETERS = "DeliveryRuleUrlFilenameConditionParameters" + """DELIVERY_RULE_URL_FILENAME_CONDITION_PARAMETERS.""" DELIVERY_RULE_HTTP_VERSION_CONDITION_PARAMETERS = "DeliveryRuleHttpVersionConditionParameters" + """DELIVERY_RULE_HTTP_VERSION_CONDITION_PARAMETERS.""" DELIVERY_RULE_COOKIES_CONDITION_PARAMETERS = "DeliveryRuleCookiesConditionParameters" + """DELIVERY_RULE_COOKIES_CONDITION_PARAMETERS.""" DELIVERY_RULE_IS_DEVICE_CONDITION_PARAMETERS = "DeliveryRuleIsDeviceConditionParameters" + """DELIVERY_RULE_IS_DEVICE_CONDITION_PARAMETERS.""" DELIVERY_RULE_SOCKET_ADDR_CONDITION_PARAMETERS = "DeliveryRuleSocketAddrConditionParameters" + """DELIVERY_RULE_SOCKET_ADDR_CONDITION_PARAMETERS.""" DELIVERY_RULE_CLIENT_PORT_CONDITION_PARAMETERS = "DeliveryRuleClientPortConditionParameters" + """DELIVERY_RULE_CLIENT_PORT_CONDITION_PARAMETERS.""" DELIVERY_RULE_SERVER_PORT_CONDITION_PARAMETERS = "DeliveryRuleServerPortConditionParameters" + """DELIVERY_RULE_SERVER_PORT_CONDITION_PARAMETERS.""" DELIVERY_RULE_HOST_NAME_CONDITION_PARAMETERS = "DeliveryRuleHostNameConditionParameters" + """DELIVERY_RULE_HOST_NAME_CONDITION_PARAMETERS.""" DELIVERY_RULE_SSL_PROTOCOL_CONDITION_PARAMETERS = "DeliveryRuleSslProtocolConditionParameters" + """DELIVERY_RULE_SSL_PROTOCOL_CONDITION_PARAMETERS.""" class DeploymentStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """DeploymentStatus.""" + """Type of DeploymentStatus.""" NOT_STARTED = "NotStarted" + """NOT_STARTED.""" IN_PROGRESS = "InProgress" + """IN_PROGRESS.""" SUCCEEDED = "Succeeded" + """SUCCEEDED.""" FAILED = "Failed" + """FAILED.""" class DestinationProtocol(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Protocol to use for the redirect. The default value is MatchRequest.""" MATCH_REQUEST = "MatchRequest" + """MATCH_REQUEST.""" HTTP = "Http" + """HTTP.""" HTTPS = "Https" + """HTTPS.""" class DomainValidationState(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -316,88 +454,131 @@ class DomainValidationState(str, Enum, metaclass=CaseInsensitiveEnumMeta): """ UNKNOWN = "Unknown" + """UNKNOWN.""" SUBMITTING = "Submitting" + """SUBMITTING.""" PENDING = "Pending" + """PENDING.""" REJECTED = "Rejected" + """REJECTED.""" TIMED_OUT = "TimedOut" + """TIMED_OUT.""" PENDING_REVALIDATION = "PendingRevalidation" + """PENDING_REVALIDATION.""" APPROVED = "Approved" + """APPROVED.""" REFRESHING_VALIDATION_TOKEN = "RefreshingValidationToken" + """REFRESHING_VALIDATION_TOKEN.""" INTERNAL_ERROR = "InternalError" + """INTERNAL_ERROR.""" class EnabledState(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled'.""" ENABLED = "Enabled" + """ENABLED.""" DISABLED = "Disabled" + """DISABLED.""" class EndpointProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Provisioning status of the endpoint.""" SUCCEEDED = "Succeeded" + """SUCCEEDED.""" FAILED = "Failed" + """FAILED.""" UPDATING = "Updating" + """UPDATING.""" DELETING = "Deleting" + """DELETING.""" CREATING = "Creating" + """CREATING.""" class EndpointResourceState(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Resource status of the endpoint.""" CREATING = "Creating" + """CREATING.""" DELETING = "Deleting" + """DELETING.""" RUNNING = "Running" + """RUNNING.""" STARTING = "Starting" + """STARTING.""" STOPPED = "Stopped" + """STOPPED.""" STOPPING = "Stopping" + """STOPPING.""" class ForwardingProtocol(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Protocol this rule will use when forwarding traffic to backends.""" HTTP_ONLY = "HttpOnly" + """HTTP_ONLY.""" HTTPS_ONLY = "HttpsOnly" + """HTTPS_ONLY.""" MATCH_REQUEST = "MatchRequest" + """MATCH_REQUEST.""" class GeoFilterActions(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Action of the geo filter, i.e. allow or block access.""" BLOCK = "Block" + """BLOCK.""" ALLOW = "Allow" + """ALLOW.""" class HeaderAction(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Action to perform.""" APPEND = "Append" + """APPEND.""" OVERWRITE = "Overwrite" + """OVERWRITE.""" DELETE = "Delete" + """DELETE.""" class HealthProbeRequestType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The type of health probe request that is made.""" NOT_SET = "NotSet" + """NOT_SET.""" GET = "GET" + """GET.""" HEAD = "HEAD" + """HEAD.""" class HostNameOperator(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Describes operator to be matched.""" ANY = "Any" + """ANY.""" EQUAL = "Equal" + """EQUAL.""" CONTAINS = "Contains" + """CONTAINS.""" BEGINS_WITH = "BeginsWith" + """BEGINS_WITH.""" ENDS_WITH = "EndsWith" + """ENDS_WITH.""" LESS_THAN = "LessThan" + """LESS_THAN.""" LESS_THAN_OR_EQUAL = "LessThanOrEqual" + """LESS_THAN_OR_EQUAL.""" GREATER_THAN = "GreaterThan" + """GREATER_THAN.""" GREATER_THAN_OR_EQUAL = "GreaterThanOrEqual" + """GREATER_THAN_OR_EQUAL.""" REG_EX = "RegEx" + """REG_EX.""" class HttpsRedirect(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -406,98 +587,132 @@ class HttpsRedirect(str, Enum, metaclass=CaseInsensitiveEnumMeta): """ ENABLED = "Enabled" + """ENABLED.""" DISABLED = "Disabled" + """DISABLED.""" class HttpVersionOperator(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Describes operator to be matched.""" EQUAL = "Equal" + """EQUAL.""" class IsDeviceMatchValue(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """IsDeviceMatchValue.""" + """Type of IsDeviceMatchValue.""" MOBILE = "Mobile" + """MOBILE.""" DESKTOP = "Desktop" + """DESKTOP.""" class IsDeviceOperator(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Describes operator to be matched.""" EQUAL = "Equal" + """EQUAL.""" class KeyVaultSigningKeyParametersType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """KeyVaultSigningKeyParametersType.""" + """Type of KeyVaultSigningKeyParametersType.""" KEY_VAULT_SIGNING_KEY_PARAMETERS = "KeyVaultSigningKeyParameters" + """KEY_VAULT_SIGNING_KEY_PARAMETERS.""" class LinkToDefaultDomain(str, Enum, metaclass=CaseInsensitiveEnumMeta): """whether this route will be linked to the default endpoint domain.""" ENABLED = "Enabled" + """ENABLED.""" DISABLED = "Disabled" + """DISABLED.""" class LogMetric(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """LogMetric.""" + """Type of LogMetric.""" CLIENT_REQUEST_COUNT = "clientRequestCount" + """CLIENT_REQUEST_COUNT.""" CLIENT_REQUEST_TRAFFIC = "clientRequestTraffic" + """CLIENT_REQUEST_TRAFFIC.""" CLIENT_REQUEST_BANDWIDTH = "clientRequestBandwidth" + """CLIENT_REQUEST_BANDWIDTH.""" ORIGIN_REQUEST_TRAFFIC = "originRequestTraffic" + """ORIGIN_REQUEST_TRAFFIC.""" ORIGIN_REQUEST_BANDWIDTH = "originRequestBandwidth" + """ORIGIN_REQUEST_BANDWIDTH.""" TOTAL_LATENCY = "totalLatency" + """TOTAL_LATENCY.""" class LogMetricsGranularity(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """LogMetricsGranularity.""" + """Type of LogMetricsGranularity.""" PT5_M = "PT5M" + """PT5_M.""" PT1_H = "PT1H" + """PT1_H.""" P1_D = "P1D" + """P1_D.""" class LogMetricsGroupBy(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """LogMetricsGroupBy.""" + """Type of LogMetricsGroupBy.""" HTTP_STATUS_CODE = "httpStatusCode" + """HTTP_STATUS_CODE.""" PROTOCOL = "protocol" + """PROTOCOL.""" CACHE_STATUS = "cacheStatus" + """CACHE_STATUS.""" COUNTRY_OR_REGION = "countryOrRegion" + """COUNTRY_OR_REGION.""" CUSTOM_DOMAIN = "customDomain" + """CUSTOM_DOMAIN.""" class LogRanking(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """LogRanking.""" + """Type of LogRanking.""" URL = "url" + """URL.""" REFERRER = "referrer" + """REFERRER.""" BROWSER = "browser" + """BROWSER.""" USER_AGENT = "userAgent" + """USER_AGENT.""" COUNTRY_OR_REGION = "countryOrRegion" + """COUNTRY_OR_REGION.""" class LogRankingMetric(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """LogRankingMetric.""" + """Type of LogRankingMetric.""" CLIENT_REQUEST_COUNT = "clientRequestCount" + """CLIENT_REQUEST_COUNT.""" CLIENT_REQUEST_TRAFFIC = "clientRequestTraffic" + """CLIENT_REQUEST_TRAFFIC.""" HIT_COUNT = "hitCount" + """HIT_COUNT.""" MISS_COUNT = "missCount" + """MISS_COUNT.""" USER_ERROR_COUNT = "userErrorCount" + """USER_ERROR_COUNT.""" ERROR_COUNT = "errorCount" + """ERROR_COUNT.""" class ManagedRuleEnabledState(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Describes if the managed rule is in enabled or disabled state. Defaults to Disabled if not - specified. - """ + """Describes if the managed rule is in enabled or disabled state.""" DISABLED = "Disabled" + """DISABLED.""" ENABLED = "Enabled" + """ENABLED.""" class ManagedServiceIdentityType(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -506,9 +721,13 @@ class ManagedServiceIdentityType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """ NONE = "None" + """No managed identity.""" SYSTEM_ASSIGNED = "SystemAssigned" + """System assigned managed identity.""" USER_ASSIGNED = "UserAssigned" + """User assigned managed identity.""" SYSTEM_ASSIGNED_USER_ASSIGNED = "SystemAssigned,UserAssigned" + """System and user assigned managed identity.""" class MatchProcessingBehavior(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -517,73 +736,116 @@ class MatchProcessingBehavior(str, Enum, metaclass=CaseInsensitiveEnumMeta): """ CONTINUE = "Continue" + """CONTINUE.""" STOP = "Stop" + """STOP.""" class MatchVariable(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """The name of the condition for the delivery rule.""" + """Request variable to compare with.""" REMOTE_ADDRESS = "RemoteAddress" + """REMOTE_ADDRESS.""" REQUEST_METHOD = "RequestMethod" + """REQUEST_METHOD.""" QUERY_STRING = "QueryString" + """QUERY_STRING.""" POST_ARGS = "PostArgs" + """POST_ARGS.""" REQUEST_URI = "RequestUri" + """REQUEST_URI.""" REQUEST_HEADER = "RequestHeader" + """REQUEST_HEADER.""" REQUEST_BODY = "RequestBody" + """REQUEST_BODY.""" REQUEST_SCHEME = "RequestScheme" + """REQUEST_SCHEME.""" URL_PATH = "UrlPath" + """URL_PATH.""" URL_FILE_EXTENSION = "UrlFileExtension" + """URL_FILE_EXTENSION.""" URL_FILE_NAME = "UrlFileName" + """URL_FILE_NAME.""" HTTP_VERSION = "HttpVersion" + """HTTP_VERSION.""" COOKIES = "Cookies" + """COOKIES.""" IS_DEVICE = "IsDevice" + """IS_DEVICE.""" SOCKET_ADDR = "SocketAddr" + """SOCKET_ADDR.""" CLIENT_PORT = "ClientPort" + """CLIENT_PORT.""" SERVER_PORT = "ServerPort" + """SERVER_PORT.""" HOST_NAME = "HostName" + """HOST_NAME.""" SSL_PROTOCOL = "SslProtocol" + """SSL_PROTOCOL.""" class MetricsGranularity(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """MetricsGranularity.""" + """Type of MetricsGranularity.""" PT5_M = "PT5M" + """PT5_M.""" PT1_H = "PT1H" + """PT1_H.""" P1_D = "P1D" + """P1_D.""" class MetricsSeriesUnit(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """MetricsSeriesUnit.""" + """Type of MetricsSeriesUnit.""" COUNT = "count" + """COUNT.""" BYTES = "bytes" + """BYTES.""" BITS_PER_SECOND = "bitsPerSecond" + """BITS_PER_SECOND.""" MILLI_SECONDS = "milliSeconds" + """MILLI_SECONDS.""" class MinimumTlsVersion(str, Enum, metaclass=CaseInsensitiveEnumMeta): """TLS protocol version that will be used for Https.""" NONE = "None" + """NONE.""" TLS10 = "TLS10" + """TLS10.""" TLS12 = "TLS12" + """TLS12.""" class Operator(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Describes operator to be matched.""" ANY = "Any" + """ANY.""" IP_MATCH = "IPMatch" + """IP_MATCH.""" GEO_MATCH = "GeoMatch" + """GEO_MATCH.""" EQUAL = "Equal" + """EQUAL.""" CONTAINS = "Contains" + """CONTAINS.""" LESS_THAN = "LessThan" + """LESS_THAN.""" GREATER_THAN = "GreaterThan" + """GREATER_THAN.""" LESS_THAN_OR_EQUAL = "LessThanOrEqual" + """LESS_THAN_OR_EQUAL.""" GREATER_THAN_OR_EQUAL = "GreaterThanOrEqual" + """GREATER_THAN_OR_EQUAL.""" BEGINS_WITH = "BeginsWith" + """BEGINS_WITH.""" ENDS_WITH = "EndsWith" + """ENDS_WITH.""" REG_EX = "RegEx" + """REG_EX.""" class OptimizationType(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -592,86 +854,122 @@ class OptimizationType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """ GENERAL_WEB_DELIVERY = "GeneralWebDelivery" + """GENERAL_WEB_DELIVERY.""" GENERAL_MEDIA_STREAMING = "GeneralMediaStreaming" + """GENERAL_MEDIA_STREAMING.""" VIDEO_ON_DEMAND_MEDIA_STREAMING = "VideoOnDemandMediaStreaming" + """VIDEO_ON_DEMAND_MEDIA_STREAMING.""" LARGE_FILE_DOWNLOAD = "LargeFileDownload" + """LARGE_FILE_DOWNLOAD.""" DYNAMIC_SITE_ACCELERATION = "DynamicSiteAcceleration" + """DYNAMIC_SITE_ACCELERATION.""" class OriginAuthenticationType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The type of the authentication for the origin.""" SYSTEM_ASSIGNED_IDENTITY = "SystemAssignedIdentity" + """SYSTEM_ASSIGNED_IDENTITY.""" USER_ASSIGNED_IDENTITY = "UserAssignedIdentity" + """USER_ASSIGNED_IDENTITY.""" class OriginGroupProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Provisioning status of the origin group.""" SUCCEEDED = "Succeeded" + """SUCCEEDED.""" FAILED = "Failed" + """FAILED.""" UPDATING = "Updating" + """UPDATING.""" DELETING = "Deleting" + """DELETING.""" CREATING = "Creating" + """CREATING.""" class OriginGroupResourceState(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Resource status of the origin group.""" CREATING = "Creating" + """CREATING.""" ACTIVE = "Active" + """ACTIVE.""" DELETING = "Deleting" + """DELETING.""" class OriginProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Provisioning status of the origin.""" SUCCEEDED = "Succeeded" + """SUCCEEDED.""" FAILED = "Failed" + """FAILED.""" UPDATING = "Updating" + """UPDATING.""" DELETING = "Deleting" + """DELETING.""" CREATING = "Creating" + """CREATING.""" class OriginResourceState(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Resource status of the origin.""" CREATING = "Creating" + """CREATING.""" ACTIVE = "Active" + """ACTIVE.""" DELETING = "Deleting" + """DELETING.""" class ParamIndicator(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Indicates the purpose of the parameter.""" EXPIRES = "Expires" + """EXPIRES.""" KEY_ID = "KeyId" + """KEY_ID.""" SIGNATURE = "Signature" + """SIGNATURE.""" class PolicyEnabledState(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """describes if the policy is in enabled state or disabled state.""" + """Describes if the policy is in enabled or disabled state. Defaults to Enabled if not specified.""" DISABLED = "Disabled" + """DISABLED.""" ENABLED = "Enabled" + """ENABLED.""" class PolicyMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Describes if it is in detection mode or prevention mode at policy level.""" PREVENTION = "Prevention" + """PREVENTION.""" DETECTION = "Detection" + """DETECTION.""" class PolicyResourceState(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Resource status of the policy.""" CREATING = "Creating" + """CREATING.""" ENABLING = "Enabling" + """ENABLING.""" ENABLED = "Enabled" + """ENABLED.""" DISABLING = "Disabling" + """DISABLING.""" DISABLED = "Disabled" + """DISABLED.""" DELETING = "Deleting" + """DELETING.""" class PolicySettingsDefaultCustomBlockResponseStatusCode( # pylint: disable=name-too-long @@ -681,99 +979,147 @@ class PolicySettingsDefaultCustomBlockResponseStatusCode( # pylint: disable=nam status code. """ - TWO_HUNDRED = 200 - FOUR_HUNDRED_THREE = 403 - FOUR_HUNDRED_FIVE = 405 - FOUR_HUNDRED_SIX = 406 - FOUR_HUNDRED_TWENTY_NINE = 429 + ENUM_200 = 200 + """200.""" + ENUM_403 = 403 + """403.""" + ENUM_405 = 405 + """405.""" + ENUM_406 = 406 + """406.""" + ENUM_429 = 429 + """429.""" class PostArgsOperator(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Describes operator to be matched.""" ANY = "Any" + """ANY.""" EQUAL = "Equal" + """EQUAL.""" CONTAINS = "Contains" + """CONTAINS.""" BEGINS_WITH = "BeginsWith" + """BEGINS_WITH.""" ENDS_WITH = "EndsWith" + """ENDS_WITH.""" LESS_THAN = "LessThan" + """LESS_THAN.""" LESS_THAN_OR_EQUAL = "LessThanOrEqual" + """LESS_THAN_OR_EQUAL.""" GREATER_THAN = "GreaterThan" + """GREATER_THAN.""" GREATER_THAN_OR_EQUAL = "GreaterThanOrEqual" + """GREATER_THAN_OR_EQUAL.""" REG_EX = "RegEx" + """REG_EX.""" class PrivateEndpointStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The approval status for the connection to the Private Link.""" PENDING = "Pending" + """PENDING.""" APPROVED = "Approved" + """APPROVED.""" REJECTED = "Rejected" + """REJECTED.""" DISCONNECTED = "Disconnected" + """DISCONNECTED.""" TIMEOUT = "Timeout" + """TIMEOUT.""" class ProbeProtocol(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Protocol to use for health probe.""" NOT_SET = "NotSet" + """NOT_SET.""" HTTP = "Http" + """HTTP.""" HTTPS = "Https" + """HTTPS.""" class ProfileProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Provisioning status of the profile.""" SUCCEEDED = "Succeeded" + """SUCCEEDED.""" FAILED = "Failed" + """FAILED.""" UPDATING = "Updating" + """UPDATING.""" DELETING = "Deleting" + """DELETING.""" CREATING = "Creating" + """CREATING.""" class ProfileResourceState(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Resource status of the profile.""" CREATING = "Creating" + """CREATING.""" ACTIVE = "Active" + """ACTIVE.""" DELETING = "Deleting" + """DELETING.""" DISABLED = "Disabled" + """DISABLED.""" MIGRATING = "Migrating" + """MIGRATING.""" MIGRATED = "Migrated" + """MIGRATED.""" PENDING_MIGRATION_COMMIT = "PendingMigrationCommit" + """PENDING_MIGRATION_COMMIT.""" COMMITTING_MIGRATION = "CommittingMigration" + """COMMITTING_MIGRATION.""" ABORTING_MIGRATION = "AbortingMigration" + """ABORTING_MIGRATION.""" class ProfileScrubbingState(str, Enum, metaclass=CaseInsensitiveEnumMeta): """State of the log scrubbing config. Default value is Enabled.""" ENABLED = "Enabled" + """ENABLED.""" DISABLED = "Disabled" + """DISABLED.""" class ProtocolType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Defines the TLS extension protocol that is used for secure delivery.""" SERVER_NAME_INDICATION = "ServerNameIndication" + """SERVER_NAME_INDICATION.""" IP_BASED = "IPBased" + """IP_BASED.""" class ProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Provisioning state of the WebApplicationFirewallPolicy.""" CREATING = "Creating" + """CREATING.""" SUCCEEDED = "Succeeded" + """SUCCEEDED.""" FAILED = "Failed" + """FAILED.""" class QueryStringBehavior(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Caching behavior for the requests.""" INCLUDE = "Include" + """INCLUDE.""" INCLUDE_ALL = "IncludeAll" + """INCLUDE_ALL.""" EXCLUDE = "Exclude" + """EXCLUDE.""" EXCLUDE_ALL = "ExcludeAll" + """EXCLUDE_ALL.""" class QueryStringCachingBehavior(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -783,89 +1129,138 @@ class QueryStringCachingBehavior(str, Enum, metaclass=CaseInsensitiveEnumMeta): """ IGNORE_QUERY_STRING = "IgnoreQueryString" + """IGNORE_QUERY_STRING.""" BYPASS_CACHING = "BypassCaching" + """BYPASS_CACHING.""" USE_QUERY_STRING = "UseQueryString" + """USE_QUERY_STRING.""" NOT_SET = "NotSet" + """NOT_SET.""" class QueryStringOperator(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Describes operator to be matched.""" ANY = "Any" + """ANY.""" EQUAL = "Equal" + """EQUAL.""" CONTAINS = "Contains" + """CONTAINS.""" BEGINS_WITH = "BeginsWith" + """BEGINS_WITH.""" ENDS_WITH = "EndsWith" + """ENDS_WITH.""" LESS_THAN = "LessThan" + """LESS_THAN.""" LESS_THAN_OR_EQUAL = "LessThanOrEqual" + """LESS_THAN_OR_EQUAL.""" GREATER_THAN = "GreaterThan" + """GREATER_THAN.""" GREATER_THAN_OR_EQUAL = "GreaterThanOrEqual" + """GREATER_THAN_OR_EQUAL.""" REG_EX = "RegEx" + """REG_EX.""" class RedirectType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The redirect type the rule will use when redirecting traffic.""" MOVED = "Moved" + """MOVED.""" FOUND = "Found" + """FOUND.""" TEMPORARY_REDIRECT = "TemporaryRedirect" + """TEMPORARY_REDIRECT.""" PERMANENT_REDIRECT = "PermanentRedirect" + """PERMANENT_REDIRECT.""" class RemoteAddressOperator(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Describes operator to be matched.""" ANY = "Any" + """ANY.""" IP_MATCH = "IPMatch" + """IP_MATCH.""" GEO_MATCH = "GeoMatch" + """GEO_MATCH.""" class RequestBodyOperator(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Describes operator to be matched.""" ANY = "Any" + """ANY.""" EQUAL = "Equal" + """EQUAL.""" CONTAINS = "Contains" + """CONTAINS.""" BEGINS_WITH = "BeginsWith" + """BEGINS_WITH.""" ENDS_WITH = "EndsWith" + """ENDS_WITH.""" LESS_THAN = "LessThan" + """LESS_THAN.""" LESS_THAN_OR_EQUAL = "LessThanOrEqual" + """LESS_THAN_OR_EQUAL.""" GREATER_THAN = "GreaterThan" + """GREATER_THAN.""" GREATER_THAN_OR_EQUAL = "GreaterThanOrEqual" + """GREATER_THAN_OR_EQUAL.""" REG_EX = "RegEx" + """REG_EX.""" class RequestHeaderOperator(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Describes operator to be matched.""" ANY = "Any" + """ANY.""" EQUAL = "Equal" + """EQUAL.""" CONTAINS = "Contains" + """CONTAINS.""" BEGINS_WITH = "BeginsWith" + """BEGINS_WITH.""" ENDS_WITH = "EndsWith" + """ENDS_WITH.""" LESS_THAN = "LessThan" + """LESS_THAN.""" LESS_THAN_OR_EQUAL = "LessThanOrEqual" + """LESS_THAN_OR_EQUAL.""" GREATER_THAN = "GreaterThan" + """GREATER_THAN.""" GREATER_THAN_OR_EQUAL = "GreaterThanOrEqual" + """GREATER_THAN_OR_EQUAL.""" REG_EX = "RegEx" + """REG_EX.""" class RequestMethodMatchValue(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """RequestMethodMatchValue.""" + """Type of RequestMethodMatchValue.""" GET = "GET" + """GET.""" HEAD = "HEAD" + """HEAD.""" POST = "POST" + """POST.""" PUT = "PUT" + """PUT.""" DELETE = "DELETE" + """DELETE.""" OPTIONS = "OPTIONS" + """OPTIONS.""" TRACE = "TRACE" + """TRACE.""" class RequestMethodOperator(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Describes operator to be matched.""" EQUAL = "Equal" + """EQUAL.""" class RequestSchemeMatchConditionParametersOperator( # pylint: disable=name-too-long @@ -874,57 +1269,79 @@ class RequestSchemeMatchConditionParametersOperator( # pylint: disable=name-too """Describes operator to be matched.""" EQUAL = "Equal" + """EQUAL.""" class RequestSchemeMatchValue(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """RequestSchemeMatchValue.""" + """Type of RequestSchemeMatchValue.""" HTTP = "HTTP" + """HTTP.""" HTTPS = "HTTPS" + """HTTPS.""" class RequestUriOperator(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Describes operator to be matched.""" ANY = "Any" + """ANY.""" EQUAL = "Equal" + """EQUAL.""" CONTAINS = "Contains" + """CONTAINS.""" BEGINS_WITH = "BeginsWith" + """BEGINS_WITH.""" ENDS_WITH = "EndsWith" + """ENDS_WITH.""" LESS_THAN = "LessThan" + """LESS_THAN.""" LESS_THAN_OR_EQUAL = "LessThanOrEqual" + """LESS_THAN_OR_EQUAL.""" GREATER_THAN = "GreaterThan" + """GREATER_THAN.""" GREATER_THAN_OR_EQUAL = "GreaterThanOrEqual" + """GREATER_THAN_OR_EQUAL.""" REG_EX = "RegEx" + """REG_EX.""" class ResourceType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Type of CDN resource used in CheckNameAvailability.""" MICROSOFT_CDN_PROFILES_ENDPOINTS = "Microsoft.Cdn/Profiles/Endpoints" + """MICROSOFT_CDN_PROFILES_ENDPOINTS.""" MICROSOFT_CDN_PROFILES_AFD_ENDPOINTS = "Microsoft.Cdn/Profiles/AfdEndpoints" + """MICROSOFT_CDN_PROFILES_AFD_ENDPOINTS.""" class ResourceUsageUnit(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Unit of the usage. e.g. count.""" COUNT = "count" + """COUNT.""" class ResponseBasedDetectedErrorTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Type of response errors for real user requests for which origin will be deemed unhealthy.""" NONE = "None" + """NONE.""" TCP_ERRORS_ONLY = "TcpErrorsOnly" + """TCP_ERRORS_ONLY.""" TCP_AND_HTTP_ERRORS = "TcpAndHttpErrors" + """TCP_AND_HTTP_ERRORS.""" class RuleCacheBehavior(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Caching behavior for the requests.""" HONOR_ORIGIN = "HonorOrigin" + """HONOR_ORIGIN.""" OVERRIDE_ALWAYS = "OverrideAlways" + """OVERRIDE_ALWAYS.""" OVERRIDE_IF_ORIGIN_MISSING = "OverrideIfOriginMissing" + """OVERRIDE_IF_ORIGIN_MISSING.""" class RuleIsCompressionEnabled(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -934,7 +1351,9 @@ class RuleIsCompressionEnabled(str, Enum, metaclass=CaseInsensitiveEnumMeta): """ ENABLED = "Enabled" + """ENABLED.""" DISABLED = "Disabled" + """DISABLED.""" class RuleQueryStringCachingBehavior(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -944,9 +1363,13 @@ class RuleQueryStringCachingBehavior(str, Enum, metaclass=CaseInsensitiveEnumMet """ IGNORE_QUERY_STRING = "IgnoreQueryString" + """IGNORE_QUERY_STRING.""" USE_QUERY_STRING = "UseQueryString" + """USE_QUERY_STRING.""" IGNORE_SPECIFIED_QUERY_STRINGS = "IgnoreSpecifiedQueryStrings" + """IGNORE_SPECIFIED_QUERY_STRINGS.""" INCLUDE_SPECIFIED_QUERY_STRINGS = "IncludeSpecifiedQueryStrings" + """INCLUDE_SPECIFIED_QUERY_STRINGS.""" class ScrubbingRuleEntryMatchOperator(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -955,51 +1378,72 @@ class ScrubbingRuleEntryMatchOperator(str, Enum, metaclass=CaseInsensitiveEnumMe """ EQUALS_ANY = "EqualsAny" + """EQUALS_ANY.""" class ScrubbingRuleEntryMatchVariable(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The variable to be scrubbed from the logs.""" REQUEST_IP_ADDRESS = "RequestIPAddress" + """REQUEST_IP_ADDRESS.""" REQUEST_URI = "RequestUri" + """REQUEST_URI.""" QUERY_STRING_ARG_NAMES = "QueryStringArgNames" + """QUERY_STRING_ARG_NAMES.""" class ScrubbingRuleEntryState(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Defines the state of a log scrubbing rule. Default value is enabled.""" ENABLED = "Enabled" + """ENABLED.""" DISABLED = "Disabled" + """DISABLED.""" class SecretType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The type of the secret resource.""" URL_SIGNING_KEY = "UrlSigningKey" + """URL_SIGNING_KEY.""" CUSTOMER_CERTIFICATE = "CustomerCertificate" + """CUSTOMER_CERTIFICATE.""" MANAGED_CERTIFICATE = "ManagedCertificate" + """MANAGED_CERTIFICATE.""" AZURE_FIRST_PARTY_MANAGED_CERTIFICATE = "AzureFirstPartyManagedCertificate" + """AZURE_FIRST_PARTY_MANAGED_CERTIFICATE.""" class SecurityPolicyType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The type of the Security policy to create.""" WEB_APPLICATION_FIREWALL = "WebApplicationFirewall" + """WEB_APPLICATION_FIREWALL.""" class ServerPortOperator(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Describes operator to be matched.""" ANY = "Any" + """ANY.""" EQUAL = "Equal" + """EQUAL.""" CONTAINS = "Contains" + """CONTAINS.""" BEGINS_WITH = "BeginsWith" + """BEGINS_WITH.""" ENDS_WITH = "EndsWith" + """ENDS_WITH.""" LESS_THAN = "LessThan" + """LESS_THAN.""" LESS_THAN_OR_EQUAL = "LessThanOrEqual" + """LESS_THAN_OR_EQUAL.""" GREATER_THAN = "GreaterThan" + """GREATER_THAN.""" GREATER_THAN_OR_EQUAL = "GreaterThanOrEqual" + """GREATER_THAN_OR_EQUAL.""" REG_EX = "RegEx" + """REG_EX.""" class SharedPrivateLinkResourceStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -1008,214 +1452,321 @@ class SharedPrivateLinkResourceStatus(str, Enum, metaclass=CaseInsensitiveEnumMe """ PENDING = "Pending" + """PENDING.""" APPROVED = "Approved" + """APPROVED.""" REJECTED = "Rejected" + """REJECTED.""" DISCONNECTED = "Disconnected" + """DISCONNECTED.""" TIMEOUT = "Timeout" + """TIMEOUT.""" class SkuName(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Name of the pricing tier.""" STANDARD_VERIZON = "Standard_Verizon" + """STANDARD_VERIZON.""" PREMIUM_VERIZON = "Premium_Verizon" + """PREMIUM_VERIZON.""" CUSTOM_VERIZON = "Custom_Verizon" + """CUSTOM_VERIZON.""" STANDARD_AKAMAI = "Standard_Akamai" + """STANDARD_AKAMAI.""" STANDARD_CHINA_CDN = "Standard_ChinaCdn" + """STANDARD_CHINA_CDN.""" STANDARD_MICROSOFT = "Standard_Microsoft" + """STANDARD_MICROSOFT.""" STANDARD_AZURE_FRONT_DOOR = "Standard_AzureFrontDoor" + """STANDARD_AZURE_FRONT_DOOR.""" PREMIUM_AZURE_FRONT_DOOR = "Premium_AzureFrontDoor" + """PREMIUM_AZURE_FRONT_DOOR.""" STANDARD955_BAND_WIDTH_CHINA_CDN = "Standard_955BandWidth_ChinaCdn" + """STANDARD955_BAND_WIDTH_CHINA_CDN.""" STANDARD_AVG_BAND_WIDTH_CHINA_CDN = "Standard_AvgBandWidth_ChinaCdn" + """STANDARD_AVG_BAND_WIDTH_CHINA_CDN.""" STANDARD_PLUS_CHINA_CDN = "StandardPlus_ChinaCdn" + """STANDARD_PLUS_CHINA_CDN.""" STANDARD_PLUS955_BAND_WIDTH_CHINA_CDN = "StandardPlus_955BandWidth_ChinaCdn" + """STANDARD_PLUS955_BAND_WIDTH_CHINA_CDN.""" STANDARD_PLUS_AVG_BAND_WIDTH_CHINA_CDN = "StandardPlus_AvgBandWidth_ChinaCdn" + """STANDARD_PLUS_AVG_BAND_WIDTH_CHINA_CDN.""" class SocketAddrOperator(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Describes operator to be matched.""" ANY = "Any" + """ANY.""" IP_MATCH = "IPMatch" + """IP_MATCH.""" class SslProtocol(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The protocol of an established TLS connection.""" TL_SV1 = "TLSv1" + """TL_SV1.""" TL_SV1_1 = "TLSv1.1" + """TL_SV1_1.""" TL_SV1_2 = "TLSv1.2" + """TL_SV1_2.""" class SslProtocolOperator(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Describes operator to be matched.""" EQUAL = "Equal" + """EQUAL.""" class Status(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The validation status.""" VALID = "Valid" + """VALID.""" INVALID = "Invalid" + """INVALID.""" ACCESS_DENIED = "AccessDenied" + """ACCESS_DENIED.""" CERTIFICATE_EXPIRED = "CertificateExpired" + """CERTIFICATE_EXPIRED.""" class Transform(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Describes what transforms are applied before matching.""" LOWERCASE = "Lowercase" + """LOWERCASE.""" UPPERCASE = "Uppercase" + """UPPERCASE.""" TRIM = "Trim" + """TRIM.""" URL_DECODE = "UrlDecode" + """URL_DECODE.""" URL_ENCODE = "UrlEncode" + """URL_ENCODE.""" REMOVE_NULLS = "RemoveNulls" + """REMOVE_NULLS.""" class TransformType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Describes what transforms were applied before matching.""" LOWERCASE = "Lowercase" + """LOWERCASE.""" UPPERCASE = "Uppercase" + """UPPERCASE.""" TRIM = "Trim" + """TRIM.""" URL_DECODE = "UrlDecode" + """URL_DECODE.""" URL_ENCODE = "UrlEncode" + """URL_ENCODE.""" REMOVE_NULLS = "RemoveNulls" + """REMOVE_NULLS.""" class UpdateRule(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Describes the action that shall be taken when the certificate is updated in Key Vault.""" NO_ACTION = "NoAction" + """NO_ACTION.""" class UrlFileExtensionOperator(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Describes operator to be matched.""" ANY = "Any" + """ANY.""" EQUAL = "Equal" + """EQUAL.""" CONTAINS = "Contains" + """CONTAINS.""" BEGINS_WITH = "BeginsWith" + """BEGINS_WITH.""" ENDS_WITH = "EndsWith" + """ENDS_WITH.""" LESS_THAN = "LessThan" + """LESS_THAN.""" LESS_THAN_OR_EQUAL = "LessThanOrEqual" + """LESS_THAN_OR_EQUAL.""" GREATER_THAN = "GreaterThan" + """GREATER_THAN.""" GREATER_THAN_OR_EQUAL = "GreaterThanOrEqual" + """GREATER_THAN_OR_EQUAL.""" REG_EX = "RegEx" + """REG_EX.""" class UrlFileNameOperator(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Describes operator to be matched.""" ANY = "Any" + """ANY.""" EQUAL = "Equal" + """EQUAL.""" CONTAINS = "Contains" + """CONTAINS.""" BEGINS_WITH = "BeginsWith" + """BEGINS_WITH.""" ENDS_WITH = "EndsWith" + """ENDS_WITH.""" LESS_THAN = "LessThan" + """LESS_THAN.""" LESS_THAN_OR_EQUAL = "LessThanOrEqual" + """LESS_THAN_OR_EQUAL.""" GREATER_THAN = "GreaterThan" + """GREATER_THAN.""" GREATER_THAN_OR_EQUAL = "GreaterThanOrEqual" + """GREATER_THAN_OR_EQUAL.""" REG_EX = "RegEx" + """REG_EX.""" class UrlPathOperator(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Describes operator to be matched.""" ANY = "Any" + """ANY.""" EQUAL = "Equal" + """EQUAL.""" CONTAINS = "Contains" + """CONTAINS.""" BEGINS_WITH = "BeginsWith" + """BEGINS_WITH.""" ENDS_WITH = "EndsWith" + """ENDS_WITH.""" LESS_THAN = "LessThan" + """LESS_THAN.""" LESS_THAN_OR_EQUAL = "LessThanOrEqual" + """LESS_THAN_OR_EQUAL.""" GREATER_THAN = "GreaterThan" + """GREATER_THAN.""" GREATER_THAN_OR_EQUAL = "GreaterThanOrEqual" + """GREATER_THAN_OR_EQUAL.""" WILDCARD = "Wildcard" + """WILDCARD.""" REG_EX = "RegEx" + """REG_EX.""" class UsageUnit(str, Enum, metaclass=CaseInsensitiveEnumMeta): """An enum describing the unit of measurement.""" COUNT = "Count" + """COUNT.""" class WafAction(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """WafAction.""" + """Type of WafAction.""" ALLOW = "allow" + """ALLOW.""" BLOCK = "block" + """BLOCK.""" LOG = "log" + """LOG.""" REDIRECT = "redirect" + """REDIRECT.""" class WafGranularity(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """WafGranularity.""" + """Type of WafGranularity.""" PT5_M = "PT5M" + """PT5_M.""" PT1_H = "PT1H" + """PT1_H.""" P1_D = "P1D" + """P1_D.""" class WafMatchVariable(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Match variable to compare against.""" REMOTE_ADDR = "RemoteAddr" + """REMOTE_ADDR.""" SOCKET_ADDR = "SocketAddr" + """SOCKET_ADDR.""" REQUEST_METHOD = "RequestMethod" + """REQUEST_METHOD.""" REQUEST_HEADER = "RequestHeader" + """REQUEST_HEADER.""" REQUEST_URI = "RequestUri" + """REQUEST_URI.""" QUERY_STRING = "QueryString" + """QUERY_STRING.""" REQUEST_BODY = "RequestBody" + """REQUEST_BODY.""" COOKIES = "Cookies" + """COOKIES.""" POST_ARGS = "PostArgs" + """POST_ARGS.""" class WafMetric(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """WafMetric.""" + """Type of WafMetric.""" CLIENT_REQUEST_COUNT = "clientRequestCount" + """CLIENT_REQUEST_COUNT.""" class WafMetricsGranularity(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """WafMetricsGranularity.""" + """Type of WafMetricsGranularity.""" PT5_M = "PT5M" + """PT5_M.""" PT1_H = "PT1H" + """PT1_H.""" P1_D = "P1D" + """P1_D.""" class WafMetricsSeriesUnit(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """WafMetricsSeriesUnit.""" + """Type of WafMetricsSeriesUnit.""" COUNT = "count" + """COUNT.""" class WafRankingGroupBy(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """WafRankingGroupBy.""" + """Type of WafRankingGroupBy.""" HTTP_STATUS_CODE = "httpStatusCode" + """HTTP_STATUS_CODE.""" CUSTOM_DOMAIN = "customDomain" + """CUSTOM_DOMAIN.""" class WafRankingType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """WafRankingType.""" + """Type of WafRankingType.""" ACTION = "action" + """ACTION.""" RULE_GROUP = "ruleGroup" + """RULE_GROUP.""" RULE_ID = "ruleId" + """RULE_ID.""" USER_AGENT = "userAgent" + """USER_AGENT.""" CLIENT_IP = "clientIp" + """CLIENT_IP.""" URL = "url" + """URL.""" COUNTRY_OR_REGION = "countryOrRegion" + """COUNTRY_OR_REGION.""" RULE_TYPE = "ruleType" + """RULE_TYPE.""" class WafRuleType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """WafRuleType.""" + """Type of WafRuleType.""" MANAGED = "managed" + """MANAGED.""" CUSTOM = "custom" + """CUSTOM.""" BOT = "bot" + """BOT.""" diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/_models.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/_models.py new file mode 100644 index 000000000000..f94543b56577 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/_models.py @@ -0,0 +1,12291 @@ +# pylint: disable=line-too-long,useless-suppression,too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +# pylint: disable=useless-super-delegation + +import datetime +from typing import Any, Literal, Mapping, Optional, TYPE_CHECKING, Union, overload + +from .._utils.model_base import Model as _Model, rest_discriminator, rest_field +from ._enums import ( + CertificateSource, + CertificateSourceParametersType, + DeliveryRuleActionName, + DeliveryRuleActionParametersType, + DeliveryRuleConditionParametersType, + MatchVariable, + SecretType, + SecurityPolicyType, +) + +if TYPE_CHECKING: + from .. import models as _models + + +class ActivatedResourceReference(_Model): + """Reference to another resource along with its state. + + :ivar id: Resource ID. + :vartype id: str + :ivar is_active: Whether the resource is active or inactive. + :vartype is_active: bool + """ + + id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Resource ID.""" + is_active: Optional[bool] = rest_field(name="isActive", visibility=["read"]) + """Whether the resource is active or inactive.""" + + @overload + def __init__( + self, + *, + id: Optional[str] = None, # pylint: disable=redefined-builtin + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class Resource(_Model): + """Resource. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.cdn.models.SystemData + """ + + id: Optional[str] = rest_field(visibility=["read"]) + """Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.""" + name: Optional[str] = rest_field(visibility=["read"]) + """The name of the resource.""" + type: Optional[str] = rest_field(visibility=["read"]) + """The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\" or + \"Microsoft.Storage/storageAccounts\".""" + system_data: Optional["_models.SystemData"] = rest_field(name="systemData", visibility=["read"]) + """Azure Resource Manager metadata containing createdBy and modifiedBy information.""" + + +class ProxyResource(Resource): + """Proxy Resource. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.cdn.models.SystemData + """ + + +class AFDDomain(ProxyResource): + """Friendly domain name mapping to the endpoint hostname that the customer provides for branding + purposes, e.g. `www.contoso.com `_. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.cdn.models.SystemData + :ivar properties: The JSON object that contains the properties of the domain to create. + :vartype properties: ~azure.mgmt.cdn.models.AFDDomainProperties + """ + + properties: Optional["_models.AFDDomainProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The JSON object that contains the properties of the domain to create.""" + + __flattened_items = [ + "profile_name", + "tls_settings", + "azure_dns_zone", + "pre_validated_custom_domain_resource_id", + "provisioning_state", + "deployment_status", + "domain_validation_state", + "host_name", + "extended_properties", + "validation_properties", + ] + + @overload + def __init__( + self, + *, + properties: Optional["_models.AFDDomainProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class AFDDomainHttpsCustomizedCipherSuiteSet(_Model): + """Customized cipher suite set object that will be used for Https when cipherSuiteSetType is + Customized. + + :ivar cipher_suite_set_for_tls12: Cipher suites for TLS 1.2. Required at least one in + minimumTlsVersion TLS 1.2. + :vartype cipher_suite_set_for_tls12: list[str or + ~azure.mgmt.cdn.models.AfdCustomizedCipherSuiteForTls12] + :ivar cipher_suite_set_for_tls13: Cipher suites for TLS 1.3. Required at least one in + minimumTlsVersion TLS 1.2, TLS 1.3. + :vartype cipher_suite_set_for_tls13: list[str or + ~azure.mgmt.cdn.models.AfdCustomizedCipherSuiteForTls13] + """ + + cipher_suite_set_for_tls12: Optional[list[Union[str, "_models.AfdCustomizedCipherSuiteForTls12"]]] = rest_field( + name="cipherSuiteSetForTls12", visibility=["read", "create", "update", "delete", "query"] + ) + """Cipher suites for TLS 1.2. Required at least one in minimumTlsVersion TLS 1.2.""" + cipher_suite_set_for_tls13: Optional[list[Union[str, "_models.AfdCustomizedCipherSuiteForTls13"]]] = rest_field( + name="cipherSuiteSetForTls13", visibility=["read", "create", "update", "delete", "query"] + ) + """Cipher suites for TLS 1.3. Required at least one in minimumTlsVersion TLS 1.2, TLS 1.3.""" + + @overload + def __init__( + self, + *, + cipher_suite_set_for_tls12: Optional[list[Union[str, "_models.AfdCustomizedCipherSuiteForTls12"]]] = None, + cipher_suite_set_for_tls13: Optional[list[Union[str, "_models.AfdCustomizedCipherSuiteForTls13"]]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class AFDDomainHttpsParameters(_Model): + """The JSON object that contains the properties to secure a domain. + + :ivar certificate_type: Defines the source of the SSL certificate. Required. Known values are: + "CustomerCertificate", "ManagedCertificate", and "AzureFirstPartyManagedCertificate". + :vartype certificate_type: str or ~azure.mgmt.cdn.models.AfdCertificateType + :ivar cipher_suite_set_type: cipher suite set type that will be used for Https. Known values + are: "Customized", "TLS10_2019", "TLS12_2022", and "TLS12_2023". + :vartype cipher_suite_set_type: str or ~azure.mgmt.cdn.models.AfdCipherSuiteSetType + :ivar minimum_tls_version: TLS protocol version that will be used for Https when + cipherSuiteSetType is Customized. Known values are: "TLS10", "TLS12", and "TLS13". + :vartype minimum_tls_version: str or ~azure.mgmt.cdn.models.AfdMinimumTlsVersion + :ivar customized_cipher_suite_set: Customized cipher suites object that will be used for Https + when cipherSuiteSetType is Customized. + :vartype customized_cipher_suite_set: + ~azure.mgmt.cdn.models.AFDDomainHttpsCustomizedCipherSuiteSet + :ivar secret: Resource reference to the secret. ie. subs/rg/profile/secret. + :vartype secret: ~azure.mgmt.cdn.models.ResourceReference + """ + + certificate_type: Union[str, "_models.AfdCertificateType"] = rest_field( + name="certificateType", visibility=["read", "create", "update", "delete", "query"] + ) + """Defines the source of the SSL certificate. Required. Known values are: \"CustomerCertificate\", + \"ManagedCertificate\", and \"AzureFirstPartyManagedCertificate\".""" + cipher_suite_set_type: Optional[Union[str, "_models.AfdCipherSuiteSetType"]] = rest_field( + name="cipherSuiteSetType", visibility=["read", "create", "update", "delete", "query"] + ) + """cipher suite set type that will be used for Https. Known values are: \"Customized\", + \"TLS10_2019\", \"TLS12_2022\", and \"TLS12_2023\".""" + minimum_tls_version: Optional[Union[str, "_models.AfdMinimumTlsVersion"]] = rest_field( + name="minimumTlsVersion", visibility=["read", "create", "update", "delete", "query"] + ) + """TLS protocol version that will be used for Https when cipherSuiteSetType is Customized. Known + values are: \"TLS10\", \"TLS12\", and \"TLS13\".""" + customized_cipher_suite_set: Optional["_models.AFDDomainHttpsCustomizedCipherSuiteSet"] = rest_field( + name="customizedCipherSuiteSet", visibility=["read", "create", "update", "delete", "query"] + ) + """Customized cipher suites object that will be used for Https when cipherSuiteSetType is + Customized.""" + secret: Optional["_models.ResourceReference"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Resource reference to the secret. ie. subs/rg/profile/secret.""" + + @overload + def __init__( + self, + *, + certificate_type: Union[str, "_models.AfdCertificateType"], + cipher_suite_set_type: Optional[Union[str, "_models.AfdCipherSuiteSetType"]] = None, + minimum_tls_version: Optional[Union[str, "_models.AfdMinimumTlsVersion"]] = None, + customized_cipher_suite_set: Optional["_models.AFDDomainHttpsCustomizedCipherSuiteSet"] = None, + secret: Optional["_models.ResourceReference"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class AFDDomainProperties(_Model): + """The JSON object that contains the properties of the domain to create. + + :ivar profile_name: The name of the profile which holds the domain. + :vartype profile_name: str + :ivar tls_settings: The configuration specifying how to enable HTTPS for the domain - using + AzureFrontDoor managed certificate or user's own certificate. If not specified, enabling ssl + uses AzureFrontDoor managed certificate by default. + :vartype tls_settings: ~azure.mgmt.cdn.models.AFDDomainHttpsParameters + :ivar azure_dns_zone: Resource reference to the Azure DNS zone. + :vartype azure_dns_zone: ~azure.mgmt.cdn.models.ResourceReference + :ivar pre_validated_custom_domain_resource_id: Resource reference to the Azure resource where + custom domain ownership was prevalidated. + :vartype pre_validated_custom_domain_resource_id: ~azure.mgmt.cdn.models.ResourceReference + :ivar provisioning_state: Provisioning status. Known values are: "Succeeded", "Failed", + "Updating", "Deleting", and "Creating". + :vartype provisioning_state: str or ~azure.mgmt.cdn.models.AfdProvisioningState + :ivar deployment_status: Known values are: "NotStarted", "InProgress", "Succeeded", and + "Failed". + :vartype deployment_status: str or ~azure.mgmt.cdn.models.DeploymentStatus + :ivar domain_validation_state: Provisioning substate shows the progress of custom HTTPS + enabling/disabling process step by step. DCV stands for DomainControlValidation. Known values + are: "Unknown", "Submitting", "Pending", "Rejected", "TimedOut", "PendingRevalidation", + "Approved", "RefreshingValidationToken", and "InternalError". + :vartype domain_validation_state: str or ~azure.mgmt.cdn.models.DomainValidationState + :ivar host_name: The host name of the domain. Must be a domain name. Required. + :vartype host_name: str + :ivar extended_properties: Key-Value pair representing migration properties for domains. + :vartype extended_properties: dict[str, str] + :ivar validation_properties: Values the customer needs to validate domain ownership. + :vartype validation_properties: ~azure.mgmt.cdn.models.DomainValidationProperties + """ + + profile_name: Optional[str] = rest_field(name="profileName", visibility=["read"]) + """The name of the profile which holds the domain.""" + tls_settings: Optional["_models.AFDDomainHttpsParameters"] = rest_field( + name="tlsSettings", visibility=["read", "create", "update", "delete", "query"] + ) + """The configuration specifying how to enable HTTPS for the domain - using AzureFrontDoor managed + certificate or user's own certificate. If not specified, enabling ssl uses AzureFrontDoor + managed certificate by default.""" + azure_dns_zone: Optional["_models.ResourceReference"] = rest_field( + name="azureDnsZone", visibility=["read", "create", "update", "delete", "query"] + ) + """Resource reference to the Azure DNS zone.""" + pre_validated_custom_domain_resource_id: Optional["_models.ResourceReference"] = rest_field( + name="preValidatedCustomDomainResourceId", visibility=["read", "create", "update", "delete", "query"] + ) + """Resource reference to the Azure resource where custom domain ownership was prevalidated.""" + provisioning_state: Optional[Union[str, "_models.AfdProvisioningState"]] = rest_field( + name="provisioningState", visibility=["read"] + ) + """Provisioning status. Known values are: \"Succeeded\", \"Failed\", \"Updating\", \"Deleting\", + and \"Creating\".""" + deployment_status: Optional[Union[str, "_models.DeploymentStatus"]] = rest_field( + name="deploymentStatus", visibility=["read"] + ) + """Known values are: \"NotStarted\", \"InProgress\", \"Succeeded\", and \"Failed\".""" + domain_validation_state: Optional[Union[str, "_models.DomainValidationState"]] = rest_field( + name="domainValidationState", visibility=["read"] + ) + """Provisioning substate shows the progress of custom HTTPS enabling/disabling process step by + step. DCV stands for DomainControlValidation. Known values are: \"Unknown\", \"Submitting\", + \"Pending\", \"Rejected\", \"TimedOut\", \"PendingRevalidation\", \"Approved\", + \"RefreshingValidationToken\", and \"InternalError\".""" + host_name: str = rest_field(name="hostName", visibility=["read", "create", "update", "delete", "query"]) + """The host name of the domain. Must be a domain name. Required.""" + extended_properties: Optional[dict[str, str]] = rest_field( + name="extendedProperties", visibility=["read", "create", "update", "delete", "query"] + ) + """Key-Value pair representing migration properties for domains.""" + validation_properties: Optional["_models.DomainValidationProperties"] = rest_field( + name="validationProperties", visibility=["read"] + ) + """Values the customer needs to validate domain ownership.""" + + @overload + def __init__( + self, + *, + host_name: str, + tls_settings: Optional["_models.AFDDomainHttpsParameters"] = None, + azure_dns_zone: Optional["_models.ResourceReference"] = None, + pre_validated_custom_domain_resource_id: Optional["_models.ResourceReference"] = None, + extended_properties: Optional[dict[str, str]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class AFDDomainUpdateParameters(_Model): + """The domain JSON object required for domain creation or update. + + :ivar properties: The JSON object that contains the properties of the domain to create. + :vartype properties: ~azure.mgmt.cdn.models.AFDDomainUpdatePropertiesParameters + """ + + properties: Optional["_models.AFDDomainUpdatePropertiesParameters"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The JSON object that contains the properties of the domain to create.""" + + __flattened_items = ["profile_name", "tls_settings", "azure_dns_zone", "pre_validated_custom_domain_resource_id"] + + @overload + def __init__( + self, + *, + properties: Optional["_models.AFDDomainUpdatePropertiesParameters"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class AFDDomainUpdatePropertiesParameters(_Model): + """The JSON object that contains the properties of the domain to create. + + :ivar profile_name: The name of the profile which holds the domain. + :vartype profile_name: str + :ivar tls_settings: The configuration specifying how to enable HTTPS for the domain - using + AzureFrontDoor managed certificate or user's own certificate. If not specified, enabling ssl + uses AzureFrontDoor managed certificate by default. + :vartype tls_settings: ~azure.mgmt.cdn.models.AFDDomainHttpsParameters + :ivar azure_dns_zone: Resource reference to the Azure DNS zone. + :vartype azure_dns_zone: ~azure.mgmt.cdn.models.ResourceReference + :ivar pre_validated_custom_domain_resource_id: Resource reference to the Azure resource where + custom domain ownership was prevalidated. + :vartype pre_validated_custom_domain_resource_id: ~azure.mgmt.cdn.models.ResourceReference + """ + + profile_name: Optional[str] = rest_field(name="profileName", visibility=["read"]) + """The name of the profile which holds the domain.""" + tls_settings: Optional["_models.AFDDomainHttpsParameters"] = rest_field( + name="tlsSettings", visibility=["read", "create", "update", "delete", "query"] + ) + """The configuration specifying how to enable HTTPS for the domain - using AzureFrontDoor managed + certificate or user's own certificate. If not specified, enabling ssl uses AzureFrontDoor + managed certificate by default.""" + azure_dns_zone: Optional["_models.ResourceReference"] = rest_field( + name="azureDnsZone", visibility=["read", "create", "update", "delete", "query"] + ) + """Resource reference to the Azure DNS zone.""" + pre_validated_custom_domain_resource_id: Optional["_models.ResourceReference"] = rest_field( + name="preValidatedCustomDomainResourceId", visibility=["read", "create", "update", "delete", "query"] + ) + """Resource reference to the Azure resource where custom domain ownership was prevalidated.""" + + @overload + def __init__( + self, + *, + tls_settings: Optional["_models.AFDDomainHttpsParameters"] = None, + azure_dns_zone: Optional["_models.ResourceReference"] = None, + pre_validated_custom_domain_resource_id: Optional["_models.ResourceReference"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class TrackedResource(Resource): + """Tracked Resource. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.cdn.models.SystemData + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar location: The geo-location where the resource lives. Required. + :vartype location: str + """ + + tags: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Resource tags.""" + location: str = rest_field(visibility=["read", "create"]) + """The geo-location where the resource lives. Required.""" + + @overload + def __init__( + self, + *, + location: str, + tags: Optional[dict[str, str]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class AFDEndpoint(TrackedResource): + """Azure Front Door endpoint is the entity within a Azure Front Door profile containing + configuration information such as origin, protocol, content caching and delivery behavior. The + AzureFrontDoor endpoint uses the URL format .azureedge.net. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.cdn.models.SystemData + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar location: The geo-location where the resource lives. Required. + :vartype location: str + :ivar properties: The JSON object that contains the properties required to create an endpoint. + :vartype properties: ~azure.mgmt.cdn.models.AFDEndpointProperties + """ + + properties: Optional["_models.AFDEndpointProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The JSON object that contains the properties required to create an endpoint.""" + + __flattened_items = [ + "profile_name", + "enabled_state", + "provisioning_state", + "deployment_status", + "host_name", + "auto_generated_domain_name_label_scope", + ] + + @overload + def __init__( + self, + *, + location: str, + tags: Optional[dict[str, str]] = None, + properties: Optional["_models.AFDEndpointProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class AFDEndpointProperties(_Model): + """The JSON object that contains the properties required to create an endpoint. + + :ivar profile_name: The name of the profile which holds the endpoint. + :vartype profile_name: str + :ivar enabled_state: Whether to enable use of this rule. Permitted values are 'Enabled' or + 'Disabled'. Known values are: "Enabled" and "Disabled". + :vartype enabled_state: str or ~azure.mgmt.cdn.models.EnabledState + :ivar provisioning_state: Provisioning status. Known values are: "Succeeded", "Failed", + "Updating", "Deleting", and "Creating". + :vartype provisioning_state: str or ~azure.mgmt.cdn.models.AfdProvisioningState + :ivar deployment_status: Known values are: "NotStarted", "InProgress", "Succeeded", and + "Failed". + :vartype deployment_status: str or ~azure.mgmt.cdn.models.DeploymentStatus + :ivar host_name: The host name of the endpoint structured as {endpointName}.{DNSZone}, e.g. + contoso.azureedge.net. + :vartype host_name: str + :ivar auto_generated_domain_name_label_scope: Indicates the endpoint name reuse scope. The + default value is TenantReuse. Known values are: "TenantReuse", "SubscriptionReuse", + "ResourceGroupReuse", and "NoReuse". + :vartype auto_generated_domain_name_label_scope: str or + ~azure.mgmt.cdn.models.AutoGeneratedDomainNameLabelScope + """ + + profile_name: Optional[str] = rest_field(name="profileName", visibility=["read"]) + """The name of the profile which holds the endpoint.""" + enabled_state: Optional[Union[str, "_models.EnabledState"]] = rest_field( + name="enabledState", visibility=["read", "create", "update", "delete", "query"] + ) + """Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled'. Known values + are: \"Enabled\" and \"Disabled\".""" + provisioning_state: Optional[Union[str, "_models.AfdProvisioningState"]] = rest_field( + name="provisioningState", visibility=["read"] + ) + """Provisioning status. Known values are: \"Succeeded\", \"Failed\", \"Updating\", \"Deleting\", + and \"Creating\".""" + deployment_status: Optional[Union[str, "_models.DeploymentStatus"]] = rest_field( + name="deploymentStatus", visibility=["read"] + ) + """Known values are: \"NotStarted\", \"InProgress\", \"Succeeded\", and \"Failed\".""" + host_name: Optional[str] = rest_field(name="hostName", visibility=["read"]) + """The host name of the endpoint structured as {endpointName}.{DNSZone}, e.g. + contoso.azureedge.net.""" + auto_generated_domain_name_label_scope: Optional[Union[str, "_models.AutoGeneratedDomainNameLabelScope"]] = ( + rest_field(name="autoGeneratedDomainNameLabelScope", visibility=["read", "create", "update", "delete", "query"]) + ) + """Indicates the endpoint name reuse scope. The default value is TenantReuse. Known values are: + \"TenantReuse\", \"SubscriptionReuse\", \"ResourceGroupReuse\", and \"NoReuse\".""" + + @overload + def __init__( + self, + *, + enabled_state: Optional[Union[str, "_models.EnabledState"]] = None, + auto_generated_domain_name_label_scope: Optional[ + Union[str, "_models.AutoGeneratedDomainNameLabelScope"] + ] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class AFDEndpointPropertiesUpdateParameters(_Model): + """The JSON object containing endpoint update parameters. + + :ivar profile_name: The name of the profile which holds the endpoint. + :vartype profile_name: str + :ivar enabled_state: Whether to enable use of this rule. Permitted values are 'Enabled' or + 'Disabled'. Known values are: "Enabled" and "Disabled". + :vartype enabled_state: str or ~azure.mgmt.cdn.models.EnabledState + """ + + profile_name: Optional[str] = rest_field(name="profileName", visibility=["read"]) + """The name of the profile which holds the endpoint.""" + enabled_state: Optional[Union[str, "_models.EnabledState"]] = rest_field( + name="enabledState", visibility=["read", "create", "update", "delete", "query"] + ) + """Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled'. Known values + are: \"Enabled\" and \"Disabled\".""" + + @overload + def __init__( + self, + *, + enabled_state: Optional[Union[str, "_models.EnabledState"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class AFDEndpointUpdateParameters(_Model): + """Properties required to create or update an endpoint. + + :ivar tags: Endpoint tags. + :vartype tags: dict[str, str] + :ivar properties: The JSON object containing endpoint update parameters. + :vartype properties: ~azure.mgmt.cdn.models.AFDEndpointPropertiesUpdateParameters + """ + + tags: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Endpoint tags.""" + properties: Optional["_models.AFDEndpointPropertiesUpdateParameters"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The JSON object containing endpoint update parameters.""" + + __flattened_items = ["profile_name", "enabled_state"] + + @overload + def __init__( + self, + *, + tags: Optional[dict[str, str]] = None, + properties: Optional["_models.AFDEndpointPropertiesUpdateParameters"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class AFDOrigin(ProxyResource): + """Azure Front Door origin is the source of the content being delivered via Azure Front Door. When + the edge nodes represented by an endpoint do not have the requested content cached, they + attempt to fetch it from one or more of the configured origins. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.cdn.models.SystemData + :ivar properties: The JSON object that contains the properties of the origin. + :vartype properties: ~azure.mgmt.cdn.models.AFDOriginProperties + """ + + properties: Optional["_models.AFDOriginProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The JSON object that contains the properties of the origin.""" + + __flattened_items = [ + "origin_group_name", + "azure_origin", + "host_name", + "http_port", + "https_port", + "origin_host_header", + "priority", + "weight", + "shared_private_link_resource", + "enabled_state", + "enforce_certificate_name_check", + "provisioning_state", + "deployment_status", + ] + + @overload + def __init__( + self, + *, + properties: Optional["_models.AFDOriginProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class AFDOriginGroup(ProxyResource): + """AFDOrigin group comprising of origins is used for load balancing to origins when the content + cannot be served from Azure Front Door. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.cdn.models.SystemData + :ivar properties: The JSON object that contains the properties of the origin group. + :vartype properties: ~azure.mgmt.cdn.models.AFDOriginGroupProperties + """ + + properties: Optional["_models.AFDOriginGroupProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The JSON object that contains the properties of the origin group.""" + + __flattened_items = [ + "profile_name", + "load_balancing_settings", + "health_probe_settings", + "traffic_restoration_time_to_healed_or_new_endpoints_in_minutes", + "session_affinity_state", + "authentication", + "provisioning_state", + "deployment_status", + ] + + @overload + def __init__( + self, + *, + properties: Optional["_models.AFDOriginGroupProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class AFDOriginGroupProperties(_Model): + """The JSON object that contains the properties of the origin group. + + :ivar profile_name: The name of the profile which holds the origin group. + :vartype profile_name: str + :ivar load_balancing_settings: Load balancing settings for a backend pool. + :vartype load_balancing_settings: ~azure.mgmt.cdn.models.LoadBalancingSettingsParameters + :ivar health_probe_settings: Health probe settings to the origin that is used to determine the + health of the origin. + :vartype health_probe_settings: ~azure.mgmt.cdn.models.HealthProbeParameters + :ivar traffic_restoration_time_to_healed_or_new_endpoints_in_minutes: Time in minutes to shift + the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new + endpoint is added. Default is 10 mins. This property is currently not supported. + :vartype traffic_restoration_time_to_healed_or_new_endpoints_in_minutes: int + :ivar session_affinity_state: Whether to allow session affinity on this host. Valid options are + 'Enabled' or 'Disabled'. Known values are: "Enabled" and "Disabled". + :vartype session_affinity_state: str or ~azure.mgmt.cdn.models.EnabledState + :ivar authentication: Authentication settings for origin in origin group. + :vartype authentication: ~azure.mgmt.cdn.models.OriginAuthenticationProperties + :ivar provisioning_state: Provisioning status. Known values are: "Succeeded", "Failed", + "Updating", "Deleting", and "Creating". + :vartype provisioning_state: str or ~azure.mgmt.cdn.models.AfdProvisioningState + :ivar deployment_status: Known values are: "NotStarted", "InProgress", "Succeeded", and + "Failed". + :vartype deployment_status: str or ~azure.mgmt.cdn.models.DeploymentStatus + """ + + profile_name: Optional[str] = rest_field(name="profileName", visibility=["read"]) + """The name of the profile which holds the origin group.""" + load_balancing_settings: Optional["_models.LoadBalancingSettingsParameters"] = rest_field( + name="loadBalancingSettings", visibility=["read", "create", "update", "delete", "query"] + ) + """Load balancing settings for a backend pool.""" + health_probe_settings: Optional["_models.HealthProbeParameters"] = rest_field( + name="healthProbeSettings", visibility=["read", "create", "update", "delete", "query"] + ) + """Health probe settings to the origin that is used to determine the health of the origin.""" + traffic_restoration_time_to_healed_or_new_endpoints_in_minutes: Optional[int] = rest_field( + name="trafficRestorationTimeToHealedOrNewEndpointsInMinutes", + visibility=["read", "create", "update", "delete", "query"], + ) + """Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint comes + healthy or a new endpoint is added. Default is 10 mins. This property is currently not + supported.""" + session_affinity_state: Optional[Union[str, "_models.EnabledState"]] = rest_field( + name="sessionAffinityState", visibility=["read", "create", "update", "delete", "query"] + ) + """Whether to allow session affinity on this host. Valid options are 'Enabled' or 'Disabled'. + Known values are: \"Enabled\" and \"Disabled\".""" + authentication: Optional["_models.OriginAuthenticationProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Authentication settings for origin in origin group.""" + provisioning_state: Optional[Union[str, "_models.AfdProvisioningState"]] = rest_field( + name="provisioningState", visibility=["read"] + ) + """Provisioning status. Known values are: \"Succeeded\", \"Failed\", \"Updating\", \"Deleting\", + and \"Creating\".""" + deployment_status: Optional[Union[str, "_models.DeploymentStatus"]] = rest_field( + name="deploymentStatus", visibility=["read"] + ) + """Known values are: \"NotStarted\", \"InProgress\", \"Succeeded\", and \"Failed\".""" + + @overload + def __init__( + self, + *, + load_balancing_settings: Optional["_models.LoadBalancingSettingsParameters"] = None, + health_probe_settings: Optional["_models.HealthProbeParameters"] = None, + traffic_restoration_time_to_healed_or_new_endpoints_in_minutes: Optional[int] = None, + session_affinity_state: Optional[Union[str, "_models.EnabledState"]] = None, + authentication: Optional["_models.OriginAuthenticationProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class AFDOriginGroupUpdateParameters(_Model): + """AFDOrigin group properties needed for origin group creation or update. + + :ivar properties: The JSON object that contains the properties of the origin group. + :vartype properties: ~azure.mgmt.cdn.models.AFDOriginGroupUpdatePropertiesParameters + """ + + properties: Optional["_models.AFDOriginGroupUpdatePropertiesParameters"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The JSON object that contains the properties of the origin group.""" + + __flattened_items = [ + "profile_name", + "load_balancing_settings", + "health_probe_settings", + "traffic_restoration_time_to_healed_or_new_endpoints_in_minutes", + "session_affinity_state", + "authentication", + ] + + @overload + def __init__( + self, + *, + properties: Optional["_models.AFDOriginGroupUpdatePropertiesParameters"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class AFDOriginGroupUpdatePropertiesParameters(_Model): + """The JSON object that contains the properties of the origin group. + + :ivar profile_name: The name of the profile which holds the origin group. + :vartype profile_name: str + :ivar load_balancing_settings: Load balancing settings for a backend pool. + :vartype load_balancing_settings: ~azure.mgmt.cdn.models.LoadBalancingSettingsParameters + :ivar health_probe_settings: Health probe settings to the origin that is used to determine the + health of the origin. + :vartype health_probe_settings: ~azure.mgmt.cdn.models.HealthProbeParameters + :ivar traffic_restoration_time_to_healed_or_new_endpoints_in_minutes: Time in minutes to shift + the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new + endpoint is added. Default is 10 mins. This property is currently not supported. + :vartype traffic_restoration_time_to_healed_or_new_endpoints_in_minutes: int + :ivar session_affinity_state: Whether to allow session affinity on this host. Valid options are + 'Enabled' or 'Disabled'. Known values are: "Enabled" and "Disabled". + :vartype session_affinity_state: str or ~azure.mgmt.cdn.models.EnabledState + :ivar authentication: Authentication settings for origin in origin group. + :vartype authentication: ~azure.mgmt.cdn.models.OriginAuthenticationProperties + """ + + profile_name: Optional[str] = rest_field(name="profileName", visibility=["read"]) + """The name of the profile which holds the origin group.""" + load_balancing_settings: Optional["_models.LoadBalancingSettingsParameters"] = rest_field( + name="loadBalancingSettings", visibility=["read", "create", "update", "delete", "query"] + ) + """Load balancing settings for a backend pool.""" + health_probe_settings: Optional["_models.HealthProbeParameters"] = rest_field( + name="healthProbeSettings", visibility=["read", "create", "update", "delete", "query"] + ) + """Health probe settings to the origin that is used to determine the health of the origin.""" + traffic_restoration_time_to_healed_or_new_endpoints_in_minutes: Optional[int] = rest_field( + name="trafficRestorationTimeToHealedOrNewEndpointsInMinutes", + visibility=["read", "create", "update", "delete", "query"], + ) + """Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint comes + healthy or a new endpoint is added. Default is 10 mins. This property is currently not + supported.""" + session_affinity_state: Optional[Union[str, "_models.EnabledState"]] = rest_field( + name="sessionAffinityState", visibility=["read", "create", "update", "delete", "query"] + ) + """Whether to allow session affinity on this host. Valid options are 'Enabled' or 'Disabled'. + Known values are: \"Enabled\" and \"Disabled\".""" + authentication: Optional["_models.OriginAuthenticationProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Authentication settings for origin in origin group.""" + + @overload + def __init__( + self, + *, + load_balancing_settings: Optional["_models.LoadBalancingSettingsParameters"] = None, + health_probe_settings: Optional["_models.HealthProbeParameters"] = None, + traffic_restoration_time_to_healed_or_new_endpoints_in_minutes: Optional[int] = None, + session_affinity_state: Optional[Union[str, "_models.EnabledState"]] = None, + authentication: Optional["_models.OriginAuthenticationProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class AFDOriginProperties(_Model): + """The JSON object that contains the properties of the origin. + + :ivar origin_group_name: The name of the origin group which contains this origin. + :vartype origin_group_name: str + :ivar azure_origin: Resource reference to the Azure origin resource. + :vartype azure_origin: ~azure.mgmt.cdn.models.ResourceReference + :ivar host_name: The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses + are supported.This should be unique across all origins in an endpoint. + :vartype host_name: str + :ivar http_port: The value of the HTTP port. Must be between 1 and 65535. + :vartype http_port: int + :ivar https_port: The value of the HTTPS port. Must be between 1 and 65535. + :vartype https_port: int + :ivar origin_host_header: The host header value sent to the origin with each request. If you + leave this blank, the request hostname determines this value. Azure Front Door origins, such as + Web Apps, Blob Storage, and Cloud Services require this host header value to match the origin + hostname by default. This overrides the host header defined at Endpoint. + :vartype origin_host_header: str + :ivar priority: Priority of origin in given origin group for load balancing. Higher priorities + will not be used for load balancing if any lower priority origin is healthy.Must be between 1 + and 5. + :vartype priority: int + :ivar weight: Weight of the origin in given origin group for load balancing. Must be between 1 + and 1000. + :vartype weight: int + :ivar shared_private_link_resource: The properties of the private link resource for private + origin. + :vartype shared_private_link_resource: + ~azure.mgmt.cdn.models.SharedPrivateLinkResourceProperties + :ivar enabled_state: Whether to enable health probes to be made against backends defined under + backendPools. Health probes can only be disabled if there is a single enabled backend in single + enabled backend pool. Known values are: "Enabled" and "Disabled". + :vartype enabled_state: str or ~azure.mgmt.cdn.models.EnabledState + :ivar enforce_certificate_name_check: Whether to enable certificate name check at origin level. + :vartype enforce_certificate_name_check: bool + :ivar provisioning_state: Provisioning status. Known values are: "Succeeded", "Failed", + "Updating", "Deleting", and "Creating". + :vartype provisioning_state: str or ~azure.mgmt.cdn.models.AfdProvisioningState + :ivar deployment_status: Known values are: "NotStarted", "InProgress", "Succeeded", and + "Failed". + :vartype deployment_status: str or ~azure.mgmt.cdn.models.DeploymentStatus + """ + + origin_group_name: Optional[str] = rest_field(name="originGroupName", visibility=["read"]) + """The name of the origin group which contains this origin.""" + azure_origin: Optional["_models.ResourceReference"] = rest_field( + name="azureOrigin", visibility=["read", "create", "update", "delete", "query"] + ) + """Resource reference to the Azure origin resource.""" + host_name: Optional[str] = rest_field(name="hostName", visibility=["read", "create", "update", "delete", "query"]) + """The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported.This + should be unique across all origins in an endpoint.""" + http_port: Optional[int] = rest_field(name="httpPort", visibility=["read", "create", "update", "delete", "query"]) + """The value of the HTTP port. Must be between 1 and 65535.""" + https_port: Optional[int] = rest_field(name="httpsPort", visibility=["read", "create", "update", "delete", "query"]) + """The value of the HTTPS port. Must be between 1 and 65535.""" + origin_host_header: Optional[str] = rest_field( + name="originHostHeader", visibility=["read", "create", "update", "delete", "query"] + ) + """The host header value sent to the origin with each request. If you leave this blank, the + request hostname determines this value. Azure Front Door origins, such as Web Apps, Blob + Storage, and Cloud Services require this host header value to match the origin hostname by + default. This overrides the host header defined at Endpoint.""" + priority: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Priority of origin in given origin group for load balancing. Higher priorities will not be used + for load balancing if any lower priority origin is healthy.Must be between 1 and 5.""" + weight: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Weight of the origin in given origin group for load balancing. Must be between 1 and 1000.""" + shared_private_link_resource: Optional["_models.SharedPrivateLinkResourceProperties"] = rest_field( + name="sharedPrivateLinkResource", visibility=["read", "create", "update", "delete", "query"] + ) + """The properties of the private link resource for private origin.""" + enabled_state: Optional[Union[str, "_models.EnabledState"]] = rest_field( + name="enabledState", visibility=["read", "create", "update", "delete", "query"] + ) + """Whether to enable health probes to be made against backends defined under backendPools. Health + probes can only be disabled if there is a single enabled backend in single enabled backend + pool. Known values are: \"Enabled\" and \"Disabled\".""" + enforce_certificate_name_check: Optional[bool] = rest_field( + name="enforceCertificateNameCheck", visibility=["read", "create", "update", "delete", "query"] + ) + """Whether to enable certificate name check at origin level.""" + provisioning_state: Optional[Union[str, "_models.AfdProvisioningState"]] = rest_field( + name="provisioningState", visibility=["read"] + ) + """Provisioning status. Known values are: \"Succeeded\", \"Failed\", \"Updating\", \"Deleting\", + and \"Creating\".""" + deployment_status: Optional[Union[str, "_models.DeploymentStatus"]] = rest_field( + name="deploymentStatus", visibility=["read"] + ) + """Known values are: \"NotStarted\", \"InProgress\", \"Succeeded\", and \"Failed\".""" + + @overload + def __init__( + self, + *, + azure_origin: Optional["_models.ResourceReference"] = None, + host_name: Optional[str] = None, + http_port: Optional[int] = None, + https_port: Optional[int] = None, + origin_host_header: Optional[str] = None, + priority: Optional[int] = None, + weight: Optional[int] = None, + shared_private_link_resource: Optional["_models.SharedPrivateLinkResourceProperties"] = None, + enabled_state: Optional[Union[str, "_models.EnabledState"]] = None, + enforce_certificate_name_check: Optional[bool] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class AFDOriginUpdateParameters(_Model): + """AFDOrigin properties needed for origin update. + + :ivar properties: The JSON object that contains the properties of the origin. + :vartype properties: ~azure.mgmt.cdn.models.AFDOriginUpdatePropertiesParameters + """ + + properties: Optional["_models.AFDOriginUpdatePropertiesParameters"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The JSON object that contains the properties of the origin.""" + + __flattened_items = [ + "origin_group_name", + "azure_origin", + "host_name", + "http_port", + "https_port", + "origin_host_header", + "priority", + "weight", + "shared_private_link_resource", + "enabled_state", + "enforce_certificate_name_check", + ] + + @overload + def __init__( + self, + *, + properties: Optional["_models.AFDOriginUpdatePropertiesParameters"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class AFDOriginUpdatePropertiesParameters(_Model): + """The JSON object that contains the properties of the origin. + + :ivar origin_group_name: The name of the origin group which contains this origin. + :vartype origin_group_name: str + :ivar azure_origin: Resource reference to the Azure origin resource. + :vartype azure_origin: ~azure.mgmt.cdn.models.ResourceReference + :ivar host_name: The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses + are supported.This should be unique across all origins in an endpoint. + :vartype host_name: str + :ivar http_port: The value of the HTTP port. Must be between 1 and 65535. + :vartype http_port: int + :ivar https_port: The value of the HTTPS port. Must be between 1 and 65535. + :vartype https_port: int + :ivar origin_host_header: The host header value sent to the origin with each request. If you + leave this blank, the request hostname determines this value. Azure Front Door origins, such as + Web Apps, Blob Storage, and Cloud Services require this host header value to match the origin + hostname by default. This overrides the host header defined at Endpoint. + :vartype origin_host_header: str + :ivar priority: Priority of origin in given origin group for load balancing. Higher priorities + will not be used for load balancing if any lower priority origin is healthy.Must be between 1 + and 5. + :vartype priority: int + :ivar weight: Weight of the origin in given origin group for load balancing. Must be between 1 + and 1000. + :vartype weight: int + :ivar shared_private_link_resource: The properties of the private link resource for private + origin. + :vartype shared_private_link_resource: + ~azure.mgmt.cdn.models.SharedPrivateLinkResourceProperties + :ivar enabled_state: Whether to enable health probes to be made against backends defined under + backendPools. Health probes can only be disabled if there is a single enabled backend in single + enabled backend pool. Known values are: "Enabled" and "Disabled". + :vartype enabled_state: str or ~azure.mgmt.cdn.models.EnabledState + :ivar enforce_certificate_name_check: Whether to enable certificate name check at origin level. + :vartype enforce_certificate_name_check: bool + """ + + origin_group_name: Optional[str] = rest_field(name="originGroupName", visibility=["read"]) + """The name of the origin group which contains this origin.""" + azure_origin: Optional["_models.ResourceReference"] = rest_field( + name="azureOrigin", visibility=["read", "create", "update", "delete", "query"] + ) + """Resource reference to the Azure origin resource.""" + host_name: Optional[str] = rest_field(name="hostName", visibility=["read", "create", "update", "delete", "query"]) + """The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported.This + should be unique across all origins in an endpoint.""" + http_port: Optional[int] = rest_field(name="httpPort", visibility=["read", "create", "update", "delete", "query"]) + """The value of the HTTP port. Must be between 1 and 65535.""" + https_port: Optional[int] = rest_field(name="httpsPort", visibility=["read", "create", "update", "delete", "query"]) + """The value of the HTTPS port. Must be between 1 and 65535.""" + origin_host_header: Optional[str] = rest_field( + name="originHostHeader", visibility=["read", "create", "update", "delete", "query"] + ) + """The host header value sent to the origin with each request. If you leave this blank, the + request hostname determines this value. Azure Front Door origins, such as Web Apps, Blob + Storage, and Cloud Services require this host header value to match the origin hostname by + default. This overrides the host header defined at Endpoint.""" + priority: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Priority of origin in given origin group for load balancing. Higher priorities will not be used + for load balancing if any lower priority origin is healthy.Must be between 1 and 5.""" + weight: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Weight of the origin in given origin group for load balancing. Must be between 1 and 1000.""" + shared_private_link_resource: Optional["_models.SharedPrivateLinkResourceProperties"] = rest_field( + name="sharedPrivateLinkResource", visibility=["read", "create", "update", "delete", "query"] + ) + """The properties of the private link resource for private origin.""" + enabled_state: Optional[Union[str, "_models.EnabledState"]] = rest_field( + name="enabledState", visibility=["read", "create", "update", "delete", "query"] + ) + """Whether to enable health probes to be made against backends defined under backendPools. Health + probes can only be disabled if there is a single enabled backend in single enabled backend + pool. Known values are: \"Enabled\" and \"Disabled\".""" + enforce_certificate_name_check: Optional[bool] = rest_field( + name="enforceCertificateNameCheck", visibility=["read", "create", "update", "delete", "query"] + ) + """Whether to enable certificate name check at origin level.""" + + @overload + def __init__( + self, + *, + azure_origin: Optional["_models.ResourceReference"] = None, + host_name: Optional[str] = None, + http_port: Optional[int] = None, + https_port: Optional[int] = None, + origin_host_header: Optional[str] = None, + priority: Optional[int] = None, + weight: Optional[int] = None, + shared_private_link_resource: Optional["_models.SharedPrivateLinkResourceProperties"] = None, + enabled_state: Optional[Union[str, "_models.EnabledState"]] = None, + enforce_certificate_name_check: Optional[bool] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class AfdPurgeParameters(_Model): + """Parameters required for content purge. + + :ivar content_paths: The path to the content to be purged. Can describe a file path or a wild + card directory. Required. + :vartype content_paths: list[str] + :ivar domains: List of domains. + :vartype domains: list[str] + """ + + content_paths: list[str] = rest_field( + name="contentPaths", visibility=["read", "create", "update", "delete", "query"] + ) + """The path to the content to be purged. Can describe a file path or a wild card directory. + Required.""" + domains: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """List of domains.""" + + @overload + def __init__( + self, + *, + content_paths: list[str], + domains: Optional[list[str]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class AfdRouteCacheConfiguration(_Model): + """Caching settings for a caching-type route. To disable caching, do not provide a + cacheConfiguration object. + + :ivar query_string_caching_behavior: Defines how Frontdoor caches requests that include query + strings. You can ignore any query strings when caching, ignore specific query strings, cache + every request with a unique URL, or cache specific query strings. Known values are: + "IgnoreQueryString", "UseQueryString", "IgnoreSpecifiedQueryStrings", and + "IncludeSpecifiedQueryStrings". + :vartype query_string_caching_behavior: str or + ~azure.mgmt.cdn.models.AfdQueryStringCachingBehavior + :ivar query_parameters: query parameters to include or exclude (comma separated). + :vartype query_parameters: str + :ivar compression_settings: compression settings. + :vartype compression_settings: ~azure.mgmt.cdn.models.CompressionSettings + """ + + query_string_caching_behavior: Optional[Union[str, "_models.AfdQueryStringCachingBehavior"]] = rest_field( + name="queryStringCachingBehavior", visibility=["read", "create", "update", "delete", "query"] + ) + """Defines how Frontdoor caches requests that include query strings. You can ignore any query + strings when caching, ignore specific query strings, cache every request with a unique URL, or + cache specific query strings. Known values are: \"IgnoreQueryString\", \"UseQueryString\", + \"IgnoreSpecifiedQueryStrings\", and \"IncludeSpecifiedQueryStrings\".""" + query_parameters: Optional[str] = rest_field( + name="queryParameters", visibility=["read", "create", "update", "delete", "query"] + ) + """query parameters to include or exclude (comma separated).""" + compression_settings: Optional["_models.CompressionSettings"] = rest_field( + name="compressionSettings", visibility=["read", "create", "update", "delete", "query"] + ) + """compression settings.""" + + @overload + def __init__( + self, + *, + query_string_caching_behavior: Optional[Union[str, "_models.AfdQueryStringCachingBehavior"]] = None, + query_parameters: Optional[str] = None, + compression_settings: Optional["_models.CompressionSettings"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class AFDStateProperties(_Model): + """The tracking states for afd resources. + + :ivar provisioning_state: Provisioning status. Known values are: "Succeeded", "Failed", + "Updating", "Deleting", and "Creating". + :vartype provisioning_state: str or ~azure.mgmt.cdn.models.AfdProvisioningState + :ivar deployment_status: Known values are: "NotStarted", "InProgress", "Succeeded", and + "Failed". + :vartype deployment_status: str or ~azure.mgmt.cdn.models.DeploymentStatus + """ + + provisioning_state: Optional[Union[str, "_models.AfdProvisioningState"]] = rest_field( + name="provisioningState", visibility=["read"] + ) + """Provisioning status. Known values are: \"Succeeded\", \"Failed\", \"Updating\", \"Deleting\", + and \"Creating\".""" + deployment_status: Optional[Union[str, "_models.DeploymentStatus"]] = rest_field( + name="deploymentStatus", visibility=["read"] + ) + """Known values are: \"NotStarted\", \"InProgress\", \"Succeeded\", and \"Failed\".""" + + +class SecretParameters(_Model): + """The json object containing secret parameters. + + You probably want to use the sub-classes and not this class directly. Known sub-classes are: + AzureFirstPartyManagedCertificateParameters, CustomerCertificateParameters, + ManagedCertificateParameters, UrlSigningKeyParameters + + :ivar type: The type of the secret resource. Required. Known values are: "UrlSigningKey", + "CustomerCertificate", "ManagedCertificate", and "AzureFirstPartyManagedCertificate". + :vartype type: str or ~azure.mgmt.cdn.models.SecretType + """ + + __mapping__: dict[str, _Model] = {} + type: str = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"]) + """The type of the secret resource. Required. Known values are: \"UrlSigningKey\", + \"CustomerCertificate\", \"ManagedCertificate\", and \"AzureFirstPartyManagedCertificate\".""" + + @overload + def __init__( + self, + *, + type: str, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class AzureFirstPartyManagedCertificateParameters( + SecretParameters, discriminator="AzureFirstPartyManagedCertificate" +): # pylint: disable=name-too-long + """Azure FirstParty Managed Certificate provided by other first party resource providers to enable + HTTPS. + + :ivar secret_source: Resource reference to the Azure Key Vault certificate. Expected to be in + format of + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/secrets/{certificateName}. + :vartype secret_source: ~azure.mgmt.cdn.models.ResourceReference + :ivar subject: Subject name in the certificate. + :vartype subject: str + :ivar expiration_date: Certificate expiration date. + :vartype expiration_date: str + :ivar certificate_authority: Certificate issuing authority. + :vartype certificate_authority: str + :ivar subject_alternative_names: The list of SANs. + :vartype subject_alternative_names: list[str] + :ivar thumbprint: Certificate thumbprint. + :vartype thumbprint: str + :ivar type: The type of the secret resource. Required. AZURE_FIRST_PARTY_MANAGED_CERTIFICATE. + :vartype type: str or ~azure.mgmt.cdn.models.AZURE_FIRST_PARTY_MANAGED_CERTIFICATE + """ + + secret_source: Optional["_models.ResourceReference"] = rest_field(name="secretSource", visibility=["read"]) + """Resource reference to the Azure Key Vault certificate. Expected to be in format of + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/secrets/{certificateName}.""" + subject: Optional[str] = rest_field(visibility=["read"]) + """Subject name in the certificate.""" + expiration_date: Optional[str] = rest_field(name="expirationDate", visibility=["read"]) + """Certificate expiration date.""" + certificate_authority: Optional[str] = rest_field(name="certificateAuthority", visibility=["read"]) + """Certificate issuing authority.""" + subject_alternative_names: Optional[list[str]] = rest_field( + name="subjectAlternativeNames", visibility=["read", "create", "update", "delete", "query"] + ) + """The list of SANs.""" + thumbprint: Optional[str] = rest_field(visibility=["read"]) + """Certificate thumbprint.""" + type: Literal[SecretType.AZURE_FIRST_PARTY_MANAGED_CERTIFICATE] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"]) # type: ignore + """The type of the secret resource. Required. AZURE_FIRST_PARTY_MANAGED_CERTIFICATE.""" + + @overload + def __init__( + self, + *, + subject_alternative_names: Optional[list[str]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + self.type = SecretType.AZURE_FIRST_PARTY_MANAGED_CERTIFICATE # type: ignore + + +class CacheConfiguration(_Model): + """Caching settings for a caching-type route. To disable caching, do not provide a + cacheConfiguration object. + + :ivar query_string_caching_behavior: Defines how Frontdoor caches requests that include query + strings. You can ignore any query strings when caching, ignore specific query strings, cache + every request with a unique URL, or cache specific query strings. Known values are: + "IgnoreQueryString", "UseQueryString", "IgnoreSpecifiedQueryStrings", and + "IncludeSpecifiedQueryStrings". + :vartype query_string_caching_behavior: str or + ~azure.mgmt.cdn.models.RuleQueryStringCachingBehavior + :ivar query_parameters: query parameters to include or exclude (comma separated). + :vartype query_parameters: str + :ivar is_compression_enabled: Indicates whether content compression is enabled. If compression + is enabled, content will be served as compressed if user requests for a compressed version. + Content won't be compressed on AzureFrontDoor when requested content is smaller than 1 byte or + larger than 1 MB. Known values are: "Enabled" and "Disabled". + :vartype is_compression_enabled: str or ~azure.mgmt.cdn.models.RuleIsCompressionEnabled + :ivar cache_behavior: Caching behavior for the requests. Known values are: "HonorOrigin", + "OverrideAlways", and "OverrideIfOriginMissing". + :vartype cache_behavior: str or ~azure.mgmt.cdn.models.RuleCacheBehavior + :ivar cache_duration: The duration for which the content needs to be cached. Allowed format is + [d.]hh:mm:ss. + :vartype cache_duration: str + """ + + query_string_caching_behavior: Optional[Union[str, "_models.RuleQueryStringCachingBehavior"]] = rest_field( + name="queryStringCachingBehavior", visibility=["read", "create", "update", "delete", "query"] + ) + """Defines how Frontdoor caches requests that include query strings. You can ignore any query + strings when caching, ignore specific query strings, cache every request with a unique URL, or + cache specific query strings. Known values are: \"IgnoreQueryString\", \"UseQueryString\", + \"IgnoreSpecifiedQueryStrings\", and \"IncludeSpecifiedQueryStrings\".""" + query_parameters: Optional[str] = rest_field( + name="queryParameters", visibility=["read", "create", "update", "delete", "query"] + ) + """query parameters to include or exclude (comma separated).""" + is_compression_enabled: Optional[Union[str, "_models.RuleIsCompressionEnabled"]] = rest_field( + name="isCompressionEnabled", visibility=["read", "create", "update", "delete", "query"] + ) + """Indicates whether content compression is enabled. If compression is enabled, content will be + served as compressed if user requests for a compressed version. Content won't be compressed on + AzureFrontDoor when requested content is smaller than 1 byte or larger than 1 MB. Known values + are: \"Enabled\" and \"Disabled\".""" + cache_behavior: Optional[Union[str, "_models.RuleCacheBehavior"]] = rest_field( + name="cacheBehavior", visibility=["read", "create", "update", "delete", "query"] + ) + """Caching behavior for the requests. Known values are: \"HonorOrigin\", \"OverrideAlways\", and + \"OverrideIfOriginMissing\".""" + cache_duration: Optional[str] = rest_field( + name="cacheDuration", visibility=["read", "create", "update", "delete", "query"] + ) + """The duration for which the content needs to be cached. Allowed format is [d.]hh:mm:ss.""" + + @overload + def __init__( + self, + *, + query_string_caching_behavior: Optional[Union[str, "_models.RuleQueryStringCachingBehavior"]] = None, + query_parameters: Optional[str] = None, + is_compression_enabled: Optional[Union[str, "_models.RuleIsCompressionEnabled"]] = None, + cache_behavior: Optional[Union[str, "_models.RuleCacheBehavior"]] = None, + cache_duration: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class DeliveryRuleActionParameters(_Model): + """Defines the parameters for delivery rule actions. + + You probably want to use the sub-classes and not this class directly. Known sub-classes are: + CacheExpirationActionParameters, CacheKeyQueryStringActionParameters, HeaderActionParameters, + OriginGroupOverrideActionParameters, RouteConfigurationOverrideActionParameters, + UrlRedirectActionParameters, UrlRewriteActionParameters, UrlSigningActionParameters + + :ivar type_name: Required. Known values are: "DeliveryRuleUrlRedirectActionParameters", + "DeliveryRuleUrlSigningActionParameters", "DeliveryRuleOriginGroupOverrideActionParameters", + "DeliveryRuleUrlRewriteActionParameters", "DeliveryRuleHeaderActionParameters", + "DeliveryRuleCacheExpirationActionParameters", + "DeliveryRuleCacheKeyQueryStringBehaviorActionParameters", and + "DeliveryRuleRouteConfigurationOverrideActionParameters". + :vartype type_name: str or ~azure.mgmt.cdn.models.DeliveryRuleActionParametersType + """ + + __mapping__: dict[str, _Model] = {} + type_name: str = rest_discriminator(name="typeName", visibility=["read", "create", "update", "delete", "query"]) + """Required. Known values are: \"DeliveryRuleUrlRedirectActionParameters\", + \"DeliveryRuleUrlSigningActionParameters\", + \"DeliveryRuleOriginGroupOverrideActionParameters\", + \"DeliveryRuleUrlRewriteActionParameters\", \"DeliveryRuleHeaderActionParameters\", + \"DeliveryRuleCacheExpirationActionParameters\", + \"DeliveryRuleCacheKeyQueryStringBehaviorActionParameters\", and + \"DeliveryRuleRouteConfigurationOverrideActionParameters\".""" + + @overload + def __init__( + self, + *, + type_name: str, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class CacheExpirationActionParameters( + DeliveryRuleActionParameters, discriminator="DeliveryRuleCacheExpirationActionParameters" +): + """Defines the parameters for the cache expiration action. + + :ivar cache_behavior: Caching behavior for the requests. Required. Known values are: + "BypassCache", "Override", and "SetIfMissing". + :vartype cache_behavior: str or ~azure.mgmt.cdn.models.CacheBehavior + :ivar cache_type: The level at which the content needs to be cached. Required. "All" + :vartype cache_type: str or ~azure.mgmt.cdn.models.CacheType + :ivar cache_duration: The duration for which the content needs to be cached. Allowed format is + [d.]hh:mm:ss. + :vartype cache_duration: str + :ivar type_name: Required. DELIVERY_RULE_CACHE_EXPIRATION_ACTION_PARAMETERS. + :vartype type_name: str or + ~azure.mgmt.cdn.models.DELIVERY_RULE_CACHE_EXPIRATION_ACTION_PARAMETERS + """ + + cache_behavior: Union[str, "_models.CacheBehavior"] = rest_field( + name="cacheBehavior", visibility=["read", "create", "update", "delete", "query"] + ) + """Caching behavior for the requests. Required. Known values are: \"BypassCache\", \"Override\", + and \"SetIfMissing\".""" + cache_type: Union[str, "_models.CacheType"] = rest_field( + name="cacheType", visibility=["read", "create", "update", "delete", "query"] + ) + """The level at which the content needs to be cached. Required. \"All\"""" + cache_duration: Optional[str] = rest_field( + name="cacheDuration", visibility=["read", "create", "update", "delete", "query"] + ) + """The duration for which the content needs to be cached. Allowed format is [d.]hh:mm:ss.""" + type_name: Literal[DeliveryRuleActionParametersType.DELIVERY_RULE_CACHE_EXPIRATION_ACTION_PARAMETERS] = rest_discriminator(name="typeName", visibility=["read", "create", "update", "delete", "query"]) # type: ignore + """Required. DELIVERY_RULE_CACHE_EXPIRATION_ACTION_PARAMETERS.""" + + @overload + def __init__( + self, + *, + cache_behavior: Union[str, "_models.CacheBehavior"], + cache_type: Union[str, "_models.CacheType"], + cache_duration: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + self.type_name = DeliveryRuleActionParametersType.DELIVERY_RULE_CACHE_EXPIRATION_ACTION_PARAMETERS # type: ignore + + +class CacheKeyQueryStringActionParameters( + DeliveryRuleActionParameters, discriminator="DeliveryRuleCacheKeyQueryStringBehaviorActionParameters" +): + """Defines the parameters for the cache-key query string action. + + :ivar query_string_behavior: Caching behavior for the requests. Required. Known values are: + "Include", "IncludeAll", "Exclude", and "ExcludeAll". + :vartype query_string_behavior: str or ~azure.mgmt.cdn.models.QueryStringBehavior + :ivar query_parameters: query parameters to include or exclude (comma separated). + :vartype query_parameters: str + :ivar type_name: Required. DELIVERY_RULE_CACHE_KEY_QUERY_STRING_BEHAVIOR_ACTION_PARAMETERS. + :vartype type_name: str or + ~azure.mgmt.cdn.models.DELIVERY_RULE_CACHE_KEY_QUERY_STRING_BEHAVIOR_ACTION_PARAMETERS + """ + + query_string_behavior: Union[str, "_models.QueryStringBehavior"] = rest_field( + name="queryStringBehavior", visibility=["read", "create", "update", "delete", "query"] + ) + """Caching behavior for the requests. Required. Known values are: \"Include\", \"IncludeAll\", + \"Exclude\", and \"ExcludeAll\".""" + query_parameters: Optional[str] = rest_field( + name="queryParameters", visibility=["read", "create", "update", "delete", "query"] + ) + """query parameters to include or exclude (comma separated).""" + type_name: Literal[DeliveryRuleActionParametersType.DELIVERY_RULE_CACHE_KEY_QUERY_STRING_BEHAVIOR_ACTION_PARAMETERS] = rest_discriminator(name="typeName", visibility=["read", "create", "update", "delete", "query"]) # type: ignore + """Required. DELIVERY_RULE_CACHE_KEY_QUERY_STRING_BEHAVIOR_ACTION_PARAMETERS.""" + + @overload + def __init__( + self, + *, + query_string_behavior: Union[str, "_models.QueryStringBehavior"], + query_parameters: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + self.type_name = DeliveryRuleActionParametersType.DELIVERY_RULE_CACHE_KEY_QUERY_STRING_BEHAVIOR_ACTION_PARAMETERS # type: ignore + + +class CanMigrateParameters(_Model): + """Request body for CanMigrate operation. + + :ivar classic_resource_reference: Resource reference of the classic cdn profile or classic + frontdoor that need to be migrated. Required. + :vartype classic_resource_reference: ~azure.mgmt.cdn.models.ResourceReference + """ + + classic_resource_reference: "_models.ResourceReference" = rest_field( + name="classicResourceReference", visibility=["read", "create", "update", "delete", "query"] + ) + """Resource reference of the classic cdn profile or classic frontdoor that need to be migrated. + Required.""" + + @overload + def __init__( + self, + *, + classic_resource_reference: "_models.ResourceReference", + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class CanMigrateProperties(_Model): + """CanMigrateProperties. + + :ivar can_migrate: Flag that says if the profile can be migrated. + :vartype can_migrate: bool + :ivar default_sku: Recommended sku for the migration. Known values are: + "Standard_AzureFrontDoor" and "Premium_AzureFrontDoor". + :vartype default_sku: str or ~azure.mgmt.cdn.models.CanMigrateDefaultSku + :ivar errors: + :vartype errors: list[~azure.mgmt.cdn.models.MigrationErrorType] + """ + + can_migrate: Optional[bool] = rest_field(name="canMigrate", visibility=["read"]) + """Flag that says if the profile can be migrated.""" + default_sku: Optional[Union[str, "_models.CanMigrateDefaultSku"]] = rest_field( + name="defaultSku", visibility=["read"] + ) + """Recommended sku for the migration. Known values are: \"Standard_AzureFrontDoor\" and + \"Premium_AzureFrontDoor\".""" + errors: Optional[list["_models.MigrationErrorType"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + + @overload + def __init__( + self, + *, + errors: Optional[list["_models.MigrationErrorType"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class CanMigrateResult(_Model): + """Result for canMigrate operation. + + :ivar id: Resource ID. + :vartype id: str + :ivar type: Resource type. + :vartype type: str + :ivar properties: + :vartype properties: ~azure.mgmt.cdn.models.CanMigrateProperties + """ + + id: Optional[str] = rest_field(visibility=["read"]) + """Resource ID.""" + type: Optional[str] = rest_field(visibility=["read"]) + """Resource type.""" + properties: Optional["_models.CanMigrateProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + + __flattened_items = ["can_migrate", "default_sku", "errors"] + + @overload + def __init__( + self, + *, + properties: Optional["_models.CanMigrateProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class CertificateSourceParameters(_Model): + """Defines the parameters for certificate source. + + You probably want to use the sub-classes and not this class directly. Known sub-classes are: + CdnCertificateSourceParameters, KeyVaultCertificateSourceParameters + + :ivar type_name: Required. Known values are: "CdnCertificateSourceParameters" and + "KeyVaultCertificateSourceParameters". + :vartype type_name: str or ~azure.mgmt.cdn.models.CertificateSourceParametersType + """ + + __mapping__: dict[str, _Model] = {} + type_name: str = rest_discriminator(name="typeName", visibility=["read", "create", "update", "delete", "query"]) + """Required. Known values are: \"CdnCertificateSourceParameters\" and + \"KeyVaultCertificateSourceParameters\".""" + + @overload + def __init__( + self, + *, + type_name: str, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class CdnCertificateSourceParameters(CertificateSourceParameters, discriminator="CdnCertificateSourceParameters"): + """Defines the parameters for using CDN managed certificate for securing custom domain. + + :ivar certificate_type: Type of certificate used. Required. Known values are: "Shared" and + "Dedicated". + :vartype certificate_type: str or ~azure.mgmt.cdn.models.CertificateType + :ivar type_name: Required. CDN_CERTIFICATE_SOURCE_PARAMETERS. + :vartype type_name: str or ~azure.mgmt.cdn.models.CDN_CERTIFICATE_SOURCE_PARAMETERS + """ + + certificate_type: Union[str, "_models.CertificateType"] = rest_field( + name="certificateType", visibility=["read", "create", "update", "delete", "query"] + ) + """Type of certificate used. Required. Known values are: \"Shared\" and \"Dedicated\".""" + type_name: Literal[CertificateSourceParametersType.CDN_CERTIFICATE_SOURCE_PARAMETERS] = rest_discriminator(name="typeName", visibility=["read", "create", "update", "delete", "query"]) # type: ignore + """Required. CDN_CERTIFICATE_SOURCE_PARAMETERS.""" + + @overload + def __init__( + self, + *, + certificate_type: Union[str, "_models.CertificateType"], + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + self.type_name = CertificateSourceParametersType.CDN_CERTIFICATE_SOURCE_PARAMETERS # type: ignore + + +class CdnEndpoint(_Model): + """Defines the ARM Resource ID for the linked endpoints. + + :ivar id: ARM Resource ID string. + :vartype id: str + """ + + id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """ARM Resource ID string.""" + + @overload + def __init__( + self, + *, + id: Optional[str] = None, # pylint: disable=redefined-builtin + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class CustomDomainHttpsParameters(_Model): + """The JSON object that contains the properties to secure a custom domain. + + You probably want to use the sub-classes and not this class directly. Known sub-classes are: + UserManagedHttpsParameters, CdnManagedHttpsParameters + + :ivar certificate_source: Defines the source of the SSL certificate. Required. Known values + are: "AzureKeyVault" and "Cdn". + :vartype certificate_source: str or ~azure.mgmt.cdn.models.CertificateSource + :ivar protocol_type: Defines the TLS extension protocol that is used for secure delivery. + Required. Known values are: "ServerNameIndication" and "IPBased". + :vartype protocol_type: str or ~azure.mgmt.cdn.models.ProtocolType + :ivar minimum_tls_version: TLS protocol version that will be used for Https. Known values are: + "None", "TLS10", and "TLS12". + :vartype minimum_tls_version: str or ~azure.mgmt.cdn.models.MinimumTlsVersion + """ + + __mapping__: dict[str, _Model] = {} + certificate_source: str = rest_discriminator( + name="certificateSource", visibility=["read", "create", "update", "delete", "query"] + ) + """Defines the source of the SSL certificate. Required. Known values are: \"AzureKeyVault\" and + \"Cdn\".""" + protocol_type: Union[str, "_models.ProtocolType"] = rest_field( + name="protocolType", visibility=["read", "create", "update", "delete", "query"] + ) + """Defines the TLS extension protocol that is used for secure delivery. Required. Known values + are: \"ServerNameIndication\" and \"IPBased\".""" + minimum_tls_version: Optional[Union[str, "_models.MinimumTlsVersion"]] = rest_field( + name="minimumTlsVersion", visibility=["read", "create", "update", "delete", "query"] + ) + """TLS protocol version that will be used for Https. Known values are: \"None\", \"TLS10\", and + \"TLS12\".""" + + @overload + def __init__( + self, + *, + certificate_source: str, + protocol_type: Union[str, "_models.ProtocolType"], + minimum_tls_version: Optional[Union[str, "_models.MinimumTlsVersion"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class CdnManagedHttpsParameters(CustomDomainHttpsParameters, discriminator="Cdn"): + """Defines the certificate source parameters using CDN managed certificate for enabling SSL. + + :ivar protocol_type: Defines the TLS extension protocol that is used for secure delivery. + Required. Known values are: "ServerNameIndication" and "IPBased". + :vartype protocol_type: str or ~azure.mgmt.cdn.models.ProtocolType + :ivar minimum_tls_version: TLS protocol version that will be used for Https. Known values are: + "None", "TLS10", and "TLS12". + :vartype minimum_tls_version: str or ~azure.mgmt.cdn.models.MinimumTlsVersion + :ivar certificate_source_parameters: Defines the certificate source parameters using CDN + managed certificate for enabling SSL. Required. + :vartype certificate_source_parameters: ~azure.mgmt.cdn.models.CdnCertificateSourceParameters + :ivar certificate_source: Defines the source of the SSL certificate. Required. CDN. + :vartype certificate_source: str or ~azure.mgmt.cdn.models.CDN + """ + + certificate_source_parameters: "_models.CdnCertificateSourceParameters" = rest_field( + name="certificateSourceParameters", visibility=["read", "create", "update", "delete", "query"] + ) + """Defines the certificate source parameters using CDN managed certificate for enabling SSL. + Required.""" + certificate_source: Literal[CertificateSource.CDN] = rest_discriminator(name="certificateSource", visibility=["read", "create", "update", "delete", "query"]) # type: ignore + """Defines the source of the SSL certificate. Required. CDN.""" + + @overload + def __init__( + self, + *, + protocol_type: Union[str, "_models.ProtocolType"], + certificate_source_parameters: "_models.CdnCertificateSourceParameters", + minimum_tls_version: Optional[Union[str, "_models.MinimumTlsVersion"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + self.certificate_source = CertificateSource.CDN # type: ignore + + +class CdnMigrationToAfdParameters(_Model): + """Request body for Migrate operation. + + :ivar sku: Sku for the migration. Required. + :vartype sku: ~azure.mgmt.cdn.models.Sku + :ivar migration_endpoint_mappings: A name map between classic CDN endpoints and AFD + Premium/Standard endpoints. + :vartype migration_endpoint_mappings: list[~azure.mgmt.cdn.models.MigrationEndpointMapping] + """ + + sku: "_models.Sku" = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Sku for the migration. Required.""" + migration_endpoint_mappings: Optional[list["_models.MigrationEndpointMapping"]] = rest_field( + name="migrationEndpointMappings", visibility=["read", "create", "update", "delete", "query"] + ) + """A name map between classic CDN endpoints and AFD Premium/Standard endpoints.""" + + @overload + def __init__( + self, + *, + sku: "_models.Sku", + migration_endpoint_mappings: Optional[list["_models.MigrationEndpointMapping"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class CdnWebApplicationFirewallPolicy(TrackedResource): + """Defines web application firewall policy for Azure CDN. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.cdn.models.SystemData + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar location: The geo-location where the resource lives. Required. + :vartype location: str + :ivar properties: Properties of the web application firewall policy. + :vartype properties: ~azure.mgmt.cdn.models.CdnWebApplicationFirewallPolicyProperties + :ivar etag: Gets a unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar sku: The pricing tier (defines a CDN provider, feature list and rate) of the + CdnWebApplicationFirewallPolicy. Required. + :vartype sku: ~azure.mgmt.cdn.models.Sku + """ + + properties: Optional["_models.CdnWebApplicationFirewallPolicyProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Properties of the web application firewall policy.""" + etag: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Gets a unique read-only string that changes whenever the resource is updated.""" + sku: "_models.Sku" = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The pricing tier (defines a CDN provider, feature list and rate) of the + CdnWebApplicationFirewallPolicy. Required.""" + + __flattened_items = [ + "policy_settings", + "rate_limit_rules", + "custom_rules", + "managed_rules", + "endpoint_links", + "extended_properties", + "provisioning_state", + "resource_state", + ] + + @overload + def __init__( + self, + *, + location: str, + sku: "_models.Sku", + tags: Optional[dict[str, str]] = None, + properties: Optional["_models.CdnWebApplicationFirewallPolicyProperties"] = None, + etag: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class CdnWebApplicationFirewallPolicyPatchParameters(_Model): # pylint: disable=name-too-long + """Properties required to update a CdnWebApplicationFirewallPolicy. + + :ivar tags: CdnWebApplicationFirewallPolicy tags. + :vartype tags: dict[str, str] + """ + + tags: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """CdnWebApplicationFirewallPolicy tags.""" + + @overload + def __init__( + self, + *, + tags: Optional[dict[str, str]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class CdnWebApplicationFirewallPolicyProperties(_Model): # pylint: disable=name-too-long + """Defines CDN web application firewall policy properties. + + :ivar policy_settings: Describes policySettings for policy. + :vartype policy_settings: ~azure.mgmt.cdn.models.PolicySettings + :ivar rate_limit_rules: Describes rate limit rules inside the policy. + :vartype rate_limit_rules: ~azure.mgmt.cdn.models.RateLimitRuleList + :ivar custom_rules: Describes custom rules inside the policy. + :vartype custom_rules: ~azure.mgmt.cdn.models.CustomRuleList + :ivar managed_rules: Describes managed rules inside the policy. + :vartype managed_rules: ~azure.mgmt.cdn.models.ManagedRuleSetList + :ivar endpoint_links: Describes Azure CDN endpoints associated with this Web Application + Firewall policy. + :vartype endpoint_links: list[~azure.mgmt.cdn.models.CdnEndpoint] + :ivar extended_properties: Key-Value pair representing additional properties for Web + Application Firewall policy. + :vartype extended_properties: dict[str, str] + :ivar provisioning_state: Provisioning state of the WebApplicationFirewallPolicy. Known values + are: "Creating", "Succeeded", and "Failed". + :vartype provisioning_state: str or ~azure.mgmt.cdn.models.ProvisioningState + :ivar resource_state: Resource status of the policy. Known values are: "Creating", "Enabling", + "Enabled", "Disabling", "Disabled", and "Deleting". + :vartype resource_state: str or ~azure.mgmt.cdn.models.PolicyResourceState + """ + + policy_settings: Optional["_models.PolicySettings"] = rest_field( + name="policySettings", visibility=["read", "create", "update", "delete", "query"] + ) + """Describes policySettings for policy.""" + rate_limit_rules: Optional["_models.RateLimitRuleList"] = rest_field( + name="rateLimitRules", visibility=["read", "create", "update", "delete", "query"] + ) + """Describes rate limit rules inside the policy.""" + custom_rules: Optional["_models.CustomRuleList"] = rest_field( + name="customRules", visibility=["read", "create", "update", "delete", "query"] + ) + """Describes custom rules inside the policy.""" + managed_rules: Optional["_models.ManagedRuleSetList"] = rest_field( + name="managedRules", visibility=["read", "create", "update", "delete", "query"] + ) + """Describes managed rules inside the policy.""" + endpoint_links: Optional[list["_models.CdnEndpoint"]] = rest_field(name="endpointLinks", visibility=["read"]) + """Describes Azure CDN endpoints associated with this Web Application Firewall policy.""" + extended_properties: Optional[dict[str, str]] = rest_field( + name="extendedProperties", visibility=["read", "create", "update", "delete", "query"] + ) + """Key-Value pair representing additional properties for Web Application Firewall policy.""" + provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = rest_field( + name="provisioningState", visibility=["read"] + ) + """Provisioning state of the WebApplicationFirewallPolicy. Known values are: \"Creating\", + \"Succeeded\", and \"Failed\".""" + resource_state: Optional[Union[str, "_models.PolicyResourceState"]] = rest_field( + name="resourceState", visibility=["read"] + ) + """Resource status of the policy. Known values are: \"Creating\", \"Enabling\", \"Enabled\", + \"Disabling\", \"Disabled\", and \"Deleting\".""" + + @overload + def __init__( + self, + *, + policy_settings: Optional["_models.PolicySettings"] = None, + rate_limit_rules: Optional["_models.RateLimitRuleList"] = None, + custom_rules: Optional["_models.CustomRuleList"] = None, + managed_rules: Optional["_models.ManagedRuleSetList"] = None, + extended_properties: Optional[dict[str, str]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class CheckEndpointNameAvailabilityInput(_Model): + """Input of CheckNameAvailability API. + + :ivar name: The resource name to validate. Required. + :vartype name: str + :ivar type: The type of the resource whose name is to be validated. Required. Known values are: + "Microsoft.Cdn/Profiles/Endpoints" and "Microsoft.Cdn/Profiles/AfdEndpoints". + :vartype type: str or ~azure.mgmt.cdn.models.ResourceType + :ivar auto_generated_domain_name_label_scope: Indicates the endpoint name reuse scope. The + default value is TenantReuse. Known values are: "TenantReuse", "SubscriptionReuse", + "ResourceGroupReuse", and "NoReuse". + :vartype auto_generated_domain_name_label_scope: str or + ~azure.mgmt.cdn.models.AutoGeneratedDomainNameLabelScope + """ + + name: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The resource name to validate. Required.""" + type: Union[str, "_models.ResourceType"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The type of the resource whose name is to be validated. Required. Known values are: + \"Microsoft.Cdn/Profiles/Endpoints\" and \"Microsoft.Cdn/Profiles/AfdEndpoints\".""" + auto_generated_domain_name_label_scope: Optional[Union[str, "_models.AutoGeneratedDomainNameLabelScope"]] = ( + rest_field(name="autoGeneratedDomainNameLabelScope", visibility=["read", "create", "update", "delete", "query"]) + ) + """Indicates the endpoint name reuse scope. The default value is TenantReuse. Known values are: + \"TenantReuse\", \"SubscriptionReuse\", \"ResourceGroupReuse\", and \"NoReuse\".""" + + @overload + def __init__( + self, + *, + name: str, + type: Union[str, "_models.ResourceType"], + auto_generated_domain_name_label_scope: Optional[ + Union[str, "_models.AutoGeneratedDomainNameLabelScope"] + ] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class CheckEndpointNameAvailabilityOutput(_Model): + """Output of check name availability API. + + :ivar name_available: Indicates whether the name is available. + :vartype name_available: bool + :ivar available_hostname: Returns the available hostname generated based on the + AutoGeneratedDomainNameLabelScope when the name is available, otherwise it returns empty + string. + :vartype available_hostname: str + :ivar reason: The reason why the name is not available. + :vartype reason: str + :ivar message: The detailed error message describing why the name is not available. + :vartype message: str + """ + + name_available: Optional[bool] = rest_field(name="nameAvailable", visibility=["read"]) + """Indicates whether the name is available.""" + available_hostname: Optional[str] = rest_field(name="availableHostname", visibility=["read"]) + """Returns the available hostname generated based on the AutoGeneratedDomainNameLabelScope when + the name is available, otherwise it returns empty string.""" + reason: Optional[str] = rest_field(visibility=["read"]) + """The reason why the name is not available.""" + message: Optional[str] = rest_field(visibility=["read"]) + """The detailed error message describing why the name is not available.""" + + +class CheckHostNameAvailabilityInput(_Model): + """Input of CheckHostNameAvailability API. + + :ivar host_name: The host name to validate. Required. + :vartype host_name: str + """ + + host_name: str = rest_field(name="hostName", visibility=["read", "create", "update", "delete", "query"]) + """The host name to validate. Required.""" + + @overload + def __init__( + self, + *, + host_name: str, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class CheckNameAvailabilityInput(_Model): + """Input of CheckNameAvailability API. + + :ivar name: The resource name to validate. Required. + :vartype name: str + :ivar type: The type of the resource whose name is to be validated. Required. Known values are: + "Microsoft.Cdn/Profiles/Endpoints" and "Microsoft.Cdn/Profiles/AfdEndpoints". + :vartype type: str or ~azure.mgmt.cdn.models.ResourceType + """ + + name: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The resource name to validate. Required.""" + type: Union[str, "_models.ResourceType"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The type of the resource whose name is to be validated. Required. Known values are: + \"Microsoft.Cdn/Profiles/Endpoints\" and \"Microsoft.Cdn/Profiles/AfdEndpoints\".""" + + @overload + def __init__( + self, + *, + name: str, + type: Union[str, "_models.ResourceType"], + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class CheckNameAvailabilityOutput(_Model): + """Output of check name availability API. + + :ivar name_available: Indicates whether the name is available. + :vartype name_available: bool + :ivar reason: The reason why the name is not available. + :vartype reason: str + :ivar message: The detailed error message describing why the name is not available. + :vartype message: str + """ + + name_available: Optional[bool] = rest_field(name="nameAvailable", visibility=["read"]) + """Indicates whether the name is available.""" + reason: Optional[str] = rest_field(visibility=["read"]) + """The reason why the name is not available.""" + message: Optional[str] = rest_field(visibility=["read"]) + """The detailed error message describing why the name is not available.""" + + +class CidrIpAddress(_Model): + """CIDR Ip address. + + :ivar base_ip_address: Ip address itself. + :vartype base_ip_address: str + :ivar prefix_length: The length of the prefix of the ip address. + :vartype prefix_length: int + """ + + base_ip_address: Optional[str] = rest_field( + name="baseIpAddress", visibility=["read", "create", "update", "delete", "query"] + ) + """Ip address itself.""" + prefix_length: Optional[int] = rest_field( + name="prefixLength", visibility=["read", "create", "update", "delete", "query"] + ) + """The length of the prefix of the ip address.""" + + @overload + def __init__( + self, + *, + base_ip_address: Optional[str] = None, + prefix_length: Optional[int] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class DeliveryRuleConditionParameters(_Model): + """Defines the parameters for delivery rule match conditions. + + You probably want to use the sub-classes and not this class directly. Known sub-classes are: + ClientPortMatchConditionParameters, CookiesMatchConditionParameters, + HostNameMatchConditionParameters, HttpVersionMatchConditionParameters, + IsDeviceMatchConditionParameters, PostArgsMatchConditionParameters, + QueryStringMatchConditionParameters, RemoteAddressMatchConditionParameters, + RequestBodyMatchConditionParameters, RequestHeaderMatchConditionParameters, + RequestMethodMatchConditionParameters, RequestSchemeMatchConditionParameters, + RequestUriMatchConditionParameters, ServerPortMatchConditionParameters, + SocketAddrMatchConditionParameters, SslProtocolMatchConditionParameters, + UrlFileExtensionMatchConditionParameters, UrlFileNameMatchConditionParameters, + UrlPathMatchConditionParameters + + :ivar type_name: Required. Known values are: "DeliveryRuleRemoteAddressConditionParameters", + "DeliveryRuleRequestMethodConditionParameters", "DeliveryRuleQueryStringConditionParameters", + "DeliveryRulePostArgsConditionParameters", "DeliveryRuleRequestUriConditionParameters", + "DeliveryRuleRequestHeaderConditionParameters", "DeliveryRuleRequestBodyConditionParameters", + "DeliveryRuleRequestSchemeConditionParameters", "DeliveryRuleUrlPathMatchConditionParameters", + "DeliveryRuleUrlFileExtensionMatchConditionParameters", + "DeliveryRuleUrlFilenameConditionParameters", "DeliveryRuleHttpVersionConditionParameters", + "DeliveryRuleCookiesConditionParameters", "DeliveryRuleIsDeviceConditionParameters", + "DeliveryRuleSocketAddrConditionParameters", "DeliveryRuleClientPortConditionParameters", + "DeliveryRuleServerPortConditionParameters", "DeliveryRuleHostNameConditionParameters", and + "DeliveryRuleSslProtocolConditionParameters". + :vartype type_name: str or ~azure.mgmt.cdn.models.DeliveryRuleConditionParametersType + """ + + __mapping__: dict[str, _Model] = {} + type_name: str = rest_discriminator(name="typeName", visibility=["read", "create", "update", "delete", "query"]) + """Required. Known values are: \"DeliveryRuleRemoteAddressConditionParameters\", + \"DeliveryRuleRequestMethodConditionParameters\", + \"DeliveryRuleQueryStringConditionParameters\", \"DeliveryRulePostArgsConditionParameters\", + \"DeliveryRuleRequestUriConditionParameters\", + \"DeliveryRuleRequestHeaderConditionParameters\", + \"DeliveryRuleRequestBodyConditionParameters\", + \"DeliveryRuleRequestSchemeConditionParameters\", + \"DeliveryRuleUrlPathMatchConditionParameters\", + \"DeliveryRuleUrlFileExtensionMatchConditionParameters\", + \"DeliveryRuleUrlFilenameConditionParameters\", \"DeliveryRuleHttpVersionConditionParameters\", + \"DeliveryRuleCookiesConditionParameters\", \"DeliveryRuleIsDeviceConditionParameters\", + \"DeliveryRuleSocketAddrConditionParameters\", \"DeliveryRuleClientPortConditionParameters\", + \"DeliveryRuleServerPortConditionParameters\", \"DeliveryRuleHostNameConditionParameters\", and + \"DeliveryRuleSslProtocolConditionParameters\".""" + + @overload + def __init__( + self, + *, + type_name: str, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ClientPortMatchConditionParameters( + DeliveryRuleConditionParameters, discriminator="DeliveryRuleClientPortConditionParameters" +): + """Defines the parameters for ClientPort match conditions. + + :ivar operator: Describes operator to be matched. Required. Known values are: "Any", "Equal", + "Contains", "BeginsWith", "EndsWith", "LessThan", "LessThanOrEqual", "GreaterThan", + "GreaterThanOrEqual", and "RegEx". + :vartype operator: str or ~azure.mgmt.cdn.models.ClientPortOperator + :ivar negate_condition: Describes if this is negate condition or not. + :vartype negate_condition: bool + :ivar match_values: The match value for the condition of the delivery rule. + :vartype match_values: list[str] + :ivar transforms: List of transforms. + :vartype transforms: list[str or ~azure.mgmt.cdn.models.Transform] + :ivar type_name: Required. DELIVERY_RULE_CLIENT_PORT_CONDITION_PARAMETERS. + :vartype type_name: str or + ~azure.mgmt.cdn.models.DELIVERY_RULE_CLIENT_PORT_CONDITION_PARAMETERS + """ + + operator: Union[str, "_models.ClientPortOperator"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Describes operator to be matched. Required. Known values are: \"Any\", \"Equal\", \"Contains\", + \"BeginsWith\", \"EndsWith\", \"LessThan\", \"LessThanOrEqual\", \"GreaterThan\", + \"GreaterThanOrEqual\", and \"RegEx\".""" + negate_condition: Optional[bool] = rest_field( + name="negateCondition", visibility=["read", "create", "update", "delete", "query"] + ) + """Describes if this is negate condition or not.""" + match_values: Optional[list[str]] = rest_field( + name="matchValues", visibility=["read", "create", "update", "delete", "query"] + ) + """The match value for the condition of the delivery rule.""" + transforms: Optional[list[Union[str, "_models.Transform"]]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """List of transforms.""" + type_name: Literal[DeliveryRuleConditionParametersType.DELIVERY_RULE_CLIENT_PORT_CONDITION_PARAMETERS] = rest_discriminator(name="typeName", visibility=["read", "create", "update", "delete", "query"]) # type: ignore + """Required. DELIVERY_RULE_CLIENT_PORT_CONDITION_PARAMETERS.""" + + @overload + def __init__( + self, + *, + operator: Union[str, "_models.ClientPortOperator"], + negate_condition: Optional[bool] = None, + match_values: Optional[list[str]] = None, + transforms: Optional[list[Union[str, "_models.Transform"]]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + self.type_name = DeliveryRuleConditionParametersType.DELIVERY_RULE_CLIENT_PORT_CONDITION_PARAMETERS # type: ignore + + +class Components18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsPropertiesDataItems( + _Model +): # pylint: disable=name-too-long + """Components18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsPropertiesDataItems. + + :ivar date_time: + :vartype date_time: ~datetime.datetime + :ivar value: + :vartype value: float + """ + + date_time: Optional[datetime.datetime] = rest_field( + name="dateTime", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + value: Optional[float] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + + @overload + def __init__( + self, + *, + date_time: Optional[datetime.datetime] = None, + value: Optional[float] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class Components1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsPropertiesDataItems( + _Model +): # pylint: disable=name-too-long + """Components1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsPropertiesDataItems. + + :ivar date_time: + :vartype date_time: ~datetime.datetime + :ivar value: + :vartype value: float + """ + + date_time: Optional[datetime.datetime] = rest_field( + name="dateTime", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + value: Optional[float] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + + @overload + def __init__( + self, + *, + date_time: Optional[datetime.datetime] = None, + value: Optional[float] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItems( + _Model +): # pylint: disable=name-too-long + """ComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItems. + + :ivar metric: + :vartype metric: str + :ivar value: + :vartype value: int + :ivar percentage: + :vartype percentage: float + """ + + metric: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + value: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + percentage: Optional[float] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + + @overload + def __init__( + self, + *, + metric: Optional[str] = None, + value: Optional[int] = None, + percentage: Optional[float] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class CompressionSettings(_Model): + """settings for compression. + + :ivar content_types_to_compress: List of content types on which compression applies. The value + should be a valid MIME type. + :vartype content_types_to_compress: list[str] + :ivar is_compression_enabled: Indicates whether content compression is enabled on + AzureFrontDoor. Default value is false. If compression is enabled, content will be served as + compressed if user requests for a compressed version. Content won't be compressed on + AzureFrontDoor when requested content is smaller than 1 byte or larger than 1 MB. + :vartype is_compression_enabled: bool + """ + + content_types_to_compress: Optional[list[str]] = rest_field( + name="contentTypesToCompress", visibility=["read", "create", "update", "delete", "query"] + ) + """List of content types on which compression applies. The value should be a valid MIME type.""" + is_compression_enabled: Optional[bool] = rest_field( + name="isCompressionEnabled", visibility=["read", "create", "update", "delete", "query"] + ) + """Indicates whether content compression is enabled on AzureFrontDoor. Default value is false. If + compression is enabled, content will be served as compressed if user requests for a compressed + version. Content won't be compressed on AzureFrontDoor when requested content is smaller than 1 + byte or larger than 1 MB.""" + + @overload + def __init__( + self, + *, + content_types_to_compress: Optional[list[str]] = None, + is_compression_enabled: Optional[bool] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ContinentsResponse(_Model): + """Continents Response. + + :ivar continents: + :vartype continents: list[~azure.mgmt.cdn.models.ContinentsResponseContinentsItem] + :ivar country_or_regions: + :vartype country_or_regions: + list[~azure.mgmt.cdn.models.ContinentsResponseCountryOrRegionsItem] + """ + + continents: Optional[list["_models.ContinentsResponseContinentsItem"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + country_or_regions: Optional[list["_models.ContinentsResponseCountryOrRegionsItem"]] = rest_field( + name="countryOrRegions", visibility=["read", "create", "update", "delete", "query"] + ) + + @overload + def __init__( + self, + *, + continents: Optional[list["_models.ContinentsResponseContinentsItem"]] = None, + country_or_regions: Optional[list["_models.ContinentsResponseCountryOrRegionsItem"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ContinentsResponseContinentsItem(_Model): + """ContinentsResponseContinentsItem. + + :ivar id: + :vartype id: str + """ + + id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + + @overload + def __init__( + self, + *, + id: Optional[str] = None, # pylint: disable=redefined-builtin + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ContinentsResponseCountryOrRegionsItem(_Model): + """ContinentsResponseCountryOrRegionsItem. + + :ivar id: + :vartype id: str + :ivar continent_id: + :vartype continent_id: str + """ + + id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + continent_id: Optional[str] = rest_field( + name="continentId", visibility=["read", "create", "update", "delete", "query"] + ) + + @overload + def __init__( + self, + *, + id: Optional[str] = None, # pylint: disable=redefined-builtin + continent_id: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class CookiesMatchConditionParameters( + DeliveryRuleConditionParameters, discriminator="DeliveryRuleCookiesConditionParameters" +): + """Defines the parameters for Cookies match conditions. + + :ivar selector: Name of Cookies to be matched. + :vartype selector: str + :ivar operator: Describes operator to be matched. Required. Known values are: "Any", "Equal", + "Contains", "BeginsWith", "EndsWith", "LessThan", "LessThanOrEqual", "GreaterThan", + "GreaterThanOrEqual", and "RegEx". + :vartype operator: str or ~azure.mgmt.cdn.models.CookiesOperator + :ivar negate_condition: Describes if this is negate condition or not. + :vartype negate_condition: bool + :ivar match_values: The match value for the condition of the delivery rule. + :vartype match_values: list[str] + :ivar transforms: List of transforms. + :vartype transforms: list[str or ~azure.mgmt.cdn.models.Transform] + :ivar type_name: Required. DELIVERY_RULE_COOKIES_CONDITION_PARAMETERS. + :vartype type_name: str or ~azure.mgmt.cdn.models.DELIVERY_RULE_COOKIES_CONDITION_PARAMETERS + """ + + selector: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Name of Cookies to be matched.""" + operator: Union[str, "_models.CookiesOperator"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Describes operator to be matched. Required. Known values are: \"Any\", \"Equal\", \"Contains\", + \"BeginsWith\", \"EndsWith\", \"LessThan\", \"LessThanOrEqual\", \"GreaterThan\", + \"GreaterThanOrEqual\", and \"RegEx\".""" + negate_condition: Optional[bool] = rest_field( + name="negateCondition", visibility=["read", "create", "update", "delete", "query"] + ) + """Describes if this is negate condition or not.""" + match_values: Optional[list[str]] = rest_field( + name="matchValues", visibility=["read", "create", "update", "delete", "query"] + ) + """The match value for the condition of the delivery rule.""" + transforms: Optional[list[Union[str, "_models.Transform"]]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """List of transforms.""" + type_name: Literal[DeliveryRuleConditionParametersType.DELIVERY_RULE_COOKIES_CONDITION_PARAMETERS] = rest_discriminator(name="typeName", visibility=["read", "create", "update", "delete", "query"]) # type: ignore + """Required. DELIVERY_RULE_COOKIES_CONDITION_PARAMETERS.""" + + @overload + def __init__( + self, + *, + operator: Union[str, "_models.CookiesOperator"], + selector: Optional[str] = None, + negate_condition: Optional[bool] = None, + match_values: Optional[list[str]] = None, + transforms: Optional[list[Union[str, "_models.Transform"]]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + self.type_name = DeliveryRuleConditionParametersType.DELIVERY_RULE_COOKIES_CONDITION_PARAMETERS # type: ignore + + +class CustomDomain(ProxyResource): + """Friendly domain name mapping to the endpoint hostname that the customer provides for branding + purposes, e.g. `www.contoso.com `_. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.cdn.models.SystemData + :ivar properties: The JSON object that contains the properties of the custom domain to create. + :vartype properties: ~azure.mgmt.cdn.models.CustomDomainProperties + """ + + properties: Optional["_models.CustomDomainProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The JSON object that contains the properties of the custom domain to create.""" + + __flattened_items = [ + "host_name", + "resource_state", + "custom_https_provisioning_state", + "custom_https_provisioning_substate", + "custom_https_parameters", + "validation_data", + "provisioning_state", + ] + + @overload + def __init__( + self, + *, + properties: Optional["_models.CustomDomainProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class CustomDomainParameters(_Model): + """The customDomain JSON object required for custom domain creation or update. + + :ivar properties: The JSON object that contains the properties of the custom domain to create. + :vartype properties: ~azure.mgmt.cdn.models.CustomDomainPropertiesParameters + """ + + properties: Optional["_models.CustomDomainPropertiesParameters"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The JSON object that contains the properties of the custom domain to create.""" + + __flattened_items = ["host_name"] + + @overload + def __init__( + self, + *, + properties: Optional["_models.CustomDomainPropertiesParameters"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class CustomDomainProperties(_Model): + """The JSON object that contains the properties of the custom domain to create. + + :ivar host_name: The host name of the custom domain. Must be a domain name. Required. + :vartype host_name: str + :ivar resource_state: Resource status of the custom domain. Known values are: "Creating", + "Active", and "Deleting". + :vartype resource_state: str or ~azure.mgmt.cdn.models.CustomDomainResourceState + :ivar custom_https_provisioning_state: Provisioning status of the custom domain. Known values + are: "Enabling", "Enabled", "Disabling", "Disabled", and "Failed". + :vartype custom_https_provisioning_state: str or + ~azure.mgmt.cdn.models.CustomHttpsProvisioningState + :ivar custom_https_provisioning_substate: Provisioning substate shows the progress of custom + HTTPS enabling/disabling process step by step. Known values are: + "SubmittingDomainControlValidationRequest", "PendingDomainControlValidationREquestApproval", + "DomainControlValidationRequestApproved", "DomainControlValidationRequestRejected", + "DomainControlValidationRequestTimedOut", "IssuingCertificate", "DeployingCertificate", + "CertificateDeployed", "DeletingCertificate", and "CertificateDeleted". + :vartype custom_https_provisioning_substate: str or + ~azure.mgmt.cdn.models.CustomHttpsProvisioningSubstate + :ivar custom_https_parameters: Certificate parameters for securing custom HTTPS. + :vartype custom_https_parameters: ~azure.mgmt.cdn.models.CustomDomainHttpsParameters + :ivar validation_data: Special validation or data may be required when delivering CDN to some + regions due to local compliance reasons. E.g. ICP license number of a custom domain is required + to deliver content in China. + :vartype validation_data: str + :ivar provisioning_state: Provisioning status of Custom Https of the custom domain. Known + values are: "Enabling", "Enabled", "Disabling", "Disabled", and "Failed". + :vartype provisioning_state: str or ~azure.mgmt.cdn.models.CustomHttpsProvisioningState + """ + + host_name: str = rest_field(name="hostName", visibility=["read", "create", "update", "delete", "query"]) + """The host name of the custom domain. Must be a domain name. Required.""" + resource_state: Optional[Union[str, "_models.CustomDomainResourceState"]] = rest_field( + name="resourceState", visibility=["read"] + ) + """Resource status of the custom domain. Known values are: \"Creating\", \"Active\", and + \"Deleting\".""" + custom_https_provisioning_state: Optional[Union[str, "_models.CustomHttpsProvisioningState"]] = rest_field( + name="customHttpsProvisioningState", visibility=["read"] + ) + """Provisioning status of the custom domain. Known values are: \"Enabling\", \"Enabled\", + \"Disabling\", \"Disabled\", and \"Failed\".""" + custom_https_provisioning_substate: Optional[Union[str, "_models.CustomHttpsProvisioningSubstate"]] = rest_field( + name="customHttpsProvisioningSubstate", visibility=["read"] + ) + """Provisioning substate shows the progress of custom HTTPS enabling/disabling process step by + step. Known values are: \"SubmittingDomainControlValidationRequest\", + \"PendingDomainControlValidationREquestApproval\", \"DomainControlValidationRequestApproved\", + \"DomainControlValidationRequestRejected\", \"DomainControlValidationRequestTimedOut\", + \"IssuingCertificate\", \"DeployingCertificate\", \"CertificateDeployed\", + \"DeletingCertificate\", and \"CertificateDeleted\".""" + custom_https_parameters: Optional["_models.CustomDomainHttpsParameters"] = rest_field( + name="customHttpsParameters", visibility=["read", "create", "update", "delete", "query"] + ) + """Certificate parameters for securing custom HTTPS.""" + validation_data: Optional[str] = rest_field( + name="validationData", visibility=["read", "create", "update", "delete", "query"] + ) + """Special validation or data may be required when delivering CDN to some regions due to local + compliance reasons. E.g. ICP license number of a custom domain is required to deliver content + in China.""" + provisioning_state: Optional[Union[str, "_models.CustomHttpsProvisioningState"]] = rest_field( + name="provisioningState", visibility=["read"] + ) + """Provisioning status of Custom Https of the custom domain. Known values are: \"Enabling\", + \"Enabled\", \"Disabling\", \"Disabled\", and \"Failed\".""" + + @overload + def __init__( + self, + *, + host_name: str, + custom_https_parameters: Optional["_models.CustomDomainHttpsParameters"] = None, + validation_data: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class CustomDomainPropertiesParameters(_Model): + """The JSON object that contains the properties of the custom domain to create. + + :ivar host_name: The host name of the custom domain. Must be a domain name. Required. + :vartype host_name: str + """ + + host_name: str = rest_field(name="hostName", visibility=["read", "create", "update", "delete", "query"]) + """The host name of the custom domain. Must be a domain name. Required.""" + + @overload + def __init__( + self, + *, + host_name: str, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class CustomerCertificateParameters(SecretParameters, discriminator="CustomerCertificate"): + """Customer Certificate used for https. + + :ivar secret_source: Resource reference to the Azure Key Vault certificate. Expected to be in + format of + /subscriptions/{​​​​​​​​​subscriptionId}​​​​​​​​​/resourceGroups/{​​​​​​​​​resourceGroupName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/providers/Microsoft.KeyVault/vaults/{vaultName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/secrets/{certificateName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​. + Required. + :vartype secret_source: ~azure.mgmt.cdn.models.ResourceReference + :ivar secret_version: Version of the secret to be used. + :vartype secret_version: str + :ivar use_latest_version: Whether to use the latest version for the certificate. + :vartype use_latest_version: bool + :ivar subject: Subject name in the certificate. + :vartype subject: str + :ivar expiration_date: Certificate expiration date. + :vartype expiration_date: str + :ivar certificate_authority: Certificate issuing authority. + :vartype certificate_authority: str + :ivar subject_alternative_names: The list of SANs. + :vartype subject_alternative_names: list[str] + :ivar thumbprint: Certificate thumbprint. + :vartype thumbprint: str + :ivar type: The type of the secret resource. Required. CUSTOMER_CERTIFICATE. + :vartype type: str or ~azure.mgmt.cdn.models.CUSTOMER_CERTIFICATE + """ + + secret_source: "_models.ResourceReference" = rest_field( + name="secretSource", visibility=["read", "create", "update", "delete", "query"] + ) + """Resource reference to the Azure Key Vault certificate. Expected to be in format of + /subscriptions/{​​​​​​​​​subscriptionId}​​​​​​​​​/resourceGroups/{​​​​​​​​​resourceGroupName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/providers/Microsoft.KeyVault/vaults/{vaultName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/secrets/{certificateName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​. + Required.""" + secret_version: Optional[str] = rest_field( + name="secretVersion", visibility=["read", "create", "update", "delete", "query"] + ) + """Version of the secret to be used.""" + use_latest_version: Optional[bool] = rest_field( + name="useLatestVersion", visibility=["read", "create", "update", "delete", "query"] + ) + """Whether to use the latest version for the certificate.""" + subject: Optional[str] = rest_field(visibility=["read"]) + """Subject name in the certificate.""" + expiration_date: Optional[str] = rest_field(name="expirationDate", visibility=["read"]) + """Certificate expiration date.""" + certificate_authority: Optional[str] = rest_field(name="certificateAuthority", visibility=["read"]) + """Certificate issuing authority.""" + subject_alternative_names: Optional[list[str]] = rest_field(name="subjectAlternativeNames", visibility=["read"]) + """The list of SANs.""" + thumbprint: Optional[str] = rest_field(visibility=["read"]) + """Certificate thumbprint.""" + type: Literal[SecretType.CUSTOMER_CERTIFICATE] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"]) # type: ignore + """The type of the secret resource. Required. CUSTOMER_CERTIFICATE.""" + + @overload + def __init__( + self, + *, + secret_source: "_models.ResourceReference", + secret_version: Optional[str] = None, + use_latest_version: Optional[bool] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + self.type = SecretType.CUSTOMER_CERTIFICATE # type: ignore + + +class CustomRule(_Model): + """Defines the common attributes for a custom rule that can be included in a waf policy. + + :ivar name: Defines the name of the custom rule. Required. + :vartype name: str + :ivar enabled_state: Describes if the custom rule is in enabled or disabled state. Defaults to + Enabled if not specified. Known values are: "Disabled" and "Enabled". + :vartype enabled_state: str or ~azure.mgmt.cdn.models.CustomRuleEnabledState + :ivar priority: Defines in what order this rule be evaluated in the overall list of custom + rules. Required. + :vartype priority: int + :ivar match_conditions: List of match conditions. Required. + :vartype match_conditions: list[~azure.mgmt.cdn.models.MatchCondition] + :ivar action: Describes what action to be applied when rule matches. Required. Known values + are: "Allow", "Block", "Log", and "Redirect". + :vartype action: str or ~azure.mgmt.cdn.models.ActionType + """ + + name: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Defines the name of the custom rule. Required.""" + enabled_state: Optional[Union[str, "_models.CustomRuleEnabledState"]] = rest_field( + name="enabledState", visibility=["read", "create", "update", "delete", "query"] + ) + """Describes if the custom rule is in enabled or disabled state. Defaults to Enabled if not + specified. Known values are: \"Disabled\" and \"Enabled\".""" + priority: int = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Defines in what order this rule be evaluated in the overall list of custom rules. Required.""" + match_conditions: list["_models.MatchCondition"] = rest_field( + name="matchConditions", visibility=["read", "create", "update", "delete", "query"] + ) + """List of match conditions. Required.""" + action: Union[str, "_models.ActionType"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Describes what action to be applied when rule matches. Required. Known values are: \"Allow\", + \"Block\", \"Log\", and \"Redirect\".""" + + @overload + def __init__( + self, + *, + name: str, + priority: int, + match_conditions: list["_models.MatchCondition"], + action: Union[str, "_models.ActionType"], + enabled_state: Optional[Union[str, "_models.CustomRuleEnabledState"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class CustomRuleList(_Model): + """Defines contents of custom rules. + + :ivar rules: List of rules. + :vartype rules: list[~azure.mgmt.cdn.models.CustomRule] + """ + + rules: Optional[list["_models.CustomRule"]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """List of rules.""" + + @overload + def __init__( + self, + *, + rules: Optional[list["_models.CustomRule"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class DeepCreatedCustomDomain(_Model): + """Custom domains created on the CDN endpoint. + + :ivar name: Custom domain name. Required. + :vartype name: str + :ivar properties: Properties of the custom domain created on the CDN endpoint. + :vartype properties: ~azure.mgmt.cdn.models.DeepCreatedCustomDomainProperties + """ + + name: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Custom domain name. Required.""" + properties: Optional["_models.DeepCreatedCustomDomainProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Properties of the custom domain created on the CDN endpoint.""" + + __flattened_items = ["host_name", "validation_data"] + + @overload + def __init__( + self, + *, + name: str, + properties: Optional["_models.DeepCreatedCustomDomainProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class DeepCreatedCustomDomainProperties(_Model): + """Properties of the custom domain created on the CDN endpoint. + + :ivar host_name: The host name of the custom domain. Must be a domain name. Required. + :vartype host_name: str + :ivar validation_data: Special validation or data may be required when delivering CDN to some + regions due to local compliance reasons. E.g. ICP license number of a custom domain is required + to deliver content in China. + :vartype validation_data: str + """ + + host_name: str = rest_field(name="hostName", visibility=["read", "create", "update", "delete", "query"]) + """The host name of the custom domain. Must be a domain name. Required.""" + validation_data: Optional[str] = rest_field( + name="validationData", visibility=["read", "create", "update", "delete", "query"] + ) + """Special validation or data may be required when delivering CDN to some regions due to local + compliance reasons. E.g. ICP license number of a custom domain is required to deliver content + in China.""" + + @overload + def __init__( + self, + *, + host_name: str, + validation_data: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class DeepCreatedOrigin(_Model): + """The main origin of CDN content which is added when creating a CDN endpoint. + + :ivar name: Origin name which must be unique within the endpoint. Required. + :vartype name: str + :ivar properties: Properties of the origin created on the CDN endpoint. + :vartype properties: ~azure.mgmt.cdn.models.DeepCreatedOriginProperties + """ + + name: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Origin name which must be unique within the endpoint. Required.""" + properties: Optional["_models.DeepCreatedOriginProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Properties of the origin created on the CDN endpoint.""" + + __flattened_items = [ + "host_name", + "http_port", + "https_port", + "origin_host_header", + "priority", + "weight", + "enabled", + "private_link_alias", + "private_link_resource_id", + "private_link_location", + "private_link_approval_message", + "private_endpoint_status", + ] + + @overload + def __init__( + self, + *, + name: str, + properties: Optional["_models.DeepCreatedOriginProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class DeepCreatedOriginGroup(_Model): + """The origin group for CDN content which is added when creating a CDN endpoint. Traffic is sent + to the origins within the origin group based on origin health. + + :ivar name: Origin group name which must be unique within the endpoint. Required. + :vartype name: str + :ivar properties: Properties of the origin group created on the CDN endpoint. + :vartype properties: ~azure.mgmt.cdn.models.DeepCreatedOriginGroupProperties + """ + + name: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Origin group name which must be unique within the endpoint. Required.""" + properties: Optional["_models.DeepCreatedOriginGroupProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Properties of the origin group created on the CDN endpoint.""" + + __flattened_items = [ + "health_probe_settings", + "origins", + "traffic_restoration_time_to_healed_or_new_endpoints_in_minutes", + "response_based_origin_error_detection_settings", + ] + + @overload + def __init__( + self, + *, + name: str, + properties: Optional["_models.DeepCreatedOriginGroupProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class DeepCreatedOriginGroupProperties(_Model): + """Properties of the origin group created on the CDN endpoint. + + :ivar health_probe_settings: Health probe settings to the origin that is used to determine the + health of the origin. + :vartype health_probe_settings: ~azure.mgmt.cdn.models.HealthProbeParameters + :ivar origins: The source of the content being delivered via CDN within given origin group. + Required. + :vartype origins: list[~azure.mgmt.cdn.models.ResourceReference] + :ivar traffic_restoration_time_to_healed_or_new_endpoints_in_minutes: Time in minutes to shift + the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new + endpoint is added. Default is 10 mins. This property is currently not supported. + :vartype traffic_restoration_time_to_healed_or_new_endpoints_in_minutes: int + :ivar response_based_origin_error_detection_settings: The JSON object that contains the + properties to determine origin health using real requests/responses.This property is currently + not supported. + :vartype response_based_origin_error_detection_settings: + ~azure.mgmt.cdn.models.ResponseBasedOriginErrorDetectionParameters + """ + + health_probe_settings: Optional["_models.HealthProbeParameters"] = rest_field( + name="healthProbeSettings", visibility=["read", "create", "update", "delete", "query"] + ) + """Health probe settings to the origin that is used to determine the health of the origin.""" + origins: list["_models.ResourceReference"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The source of the content being delivered via CDN within given origin group. Required.""" + traffic_restoration_time_to_healed_or_new_endpoints_in_minutes: Optional[int] = rest_field( + name="trafficRestorationTimeToHealedOrNewEndpointsInMinutes", + visibility=["read", "create", "update", "delete", "query"], + ) + """Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint comes + healthy or a new endpoint is added. Default is 10 mins. This property is currently not + supported.""" + response_based_origin_error_detection_settings: Optional["_models.ResponseBasedOriginErrorDetectionParameters"] = ( + rest_field( + name="responseBasedOriginErrorDetectionSettings", visibility=["read", "create", "update", "delete", "query"] + ) + ) + """The JSON object that contains the properties to determine origin health using real + requests/responses.This property is currently not supported.""" + + @overload + def __init__( + self, + *, + origins: list["_models.ResourceReference"], + health_probe_settings: Optional["_models.HealthProbeParameters"] = None, + traffic_restoration_time_to_healed_or_new_endpoints_in_minutes: Optional[int] = None, + response_based_origin_error_detection_settings: Optional[ + "_models.ResponseBasedOriginErrorDetectionParameters" + ] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class DeepCreatedOriginProperties(_Model): + """Properties of the origin created on the CDN endpoint. + + :ivar host_name: The address of the origin. It can be a domain name, IPv4 address, or IPv6 + address. This should be unique across all origins in an endpoint. Required. + :vartype host_name: str + :ivar http_port: The value of the HTTP port. Must be between 1 and 65535. + :vartype http_port: int + :ivar https_port: The value of the HTTPS port. Must be between 1 and 65535. + :vartype https_port: int + :ivar origin_host_header: The host header value sent to the origin with each request. If you + leave this blank, the request hostname determines this value. Azure CDN origins, such as Web + Apps, Blob Storage, and Cloud Services require this host header value to match the origin + hostname by default. + :vartype origin_host_header: str + :ivar priority: Priority of origin in given origin group for load balancing. Higher priorities + will not be used for load balancing if any lower priority origin is healthy.Must be between 1 + and 5. + :vartype priority: int + :ivar weight: Weight of the origin in given origin group for load balancing. Must be between 1 + and 1000. + :vartype weight: int + :ivar enabled: Origin is enabled for load balancing or not. By default, origin is always + enabled. + :vartype enabled: bool + :ivar private_link_alias: The Alias of the Private Link resource. Populating this optional + field indicates that this origin is 'Private'. + :vartype private_link_alias: str + :ivar private_link_resource_id: The Resource Id of the Private Link resource. Populating this + optional field indicates that this backend is 'Private'. + :vartype private_link_resource_id: str + :ivar private_link_location: The location of the Private Link resource. Required only if + 'privateLinkResourceId' is populated. + :vartype private_link_location: str + :ivar private_link_approval_message: A custom message to be included in the approval request to + connect to the Private Link. + :vartype private_link_approval_message: str + :ivar private_endpoint_status: The approval status for the connection to the Private Link. + Known values are: "Pending", "Approved", "Rejected", "Disconnected", and "Timeout". + :vartype private_endpoint_status: str or ~azure.mgmt.cdn.models.PrivateEndpointStatus + """ + + host_name: str = rest_field(name="hostName", visibility=["read", "create", "update", "delete", "query"]) + """The address of the origin. It can be a domain name, IPv4 address, or IPv6 address. This should + be unique across all origins in an endpoint. Required.""" + http_port: Optional[int] = rest_field(name="httpPort", visibility=["read", "create", "update", "delete", "query"]) + """The value of the HTTP port. Must be between 1 and 65535.""" + https_port: Optional[int] = rest_field(name="httpsPort", visibility=["read", "create", "update", "delete", "query"]) + """The value of the HTTPS port. Must be between 1 and 65535.""" + origin_host_header: Optional[str] = rest_field( + name="originHostHeader", visibility=["read", "create", "update", "delete", "query"] + ) + """The host header value sent to the origin with each request. If you leave this blank, the + request hostname determines this value. Azure CDN origins, such as Web Apps, Blob Storage, and + Cloud Services require this host header value to match the origin hostname by default.""" + priority: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Priority of origin in given origin group for load balancing. Higher priorities will not be used + for load balancing if any lower priority origin is healthy.Must be between 1 and 5.""" + weight: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Weight of the origin in given origin group for load balancing. Must be between 1 and 1000.""" + enabled: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Origin is enabled for load balancing or not. By default, origin is always enabled.""" + private_link_alias: Optional[str] = rest_field( + name="privateLinkAlias", visibility=["read", "create", "update", "delete", "query"] + ) + """The Alias of the Private Link resource. Populating this optional field indicates that this + origin is 'Private'.""" + private_link_resource_id: Optional[str] = rest_field( + name="privateLinkResourceId", visibility=["read", "create", "update", "delete", "query"] + ) + """The Resource Id of the Private Link resource. Populating this optional field indicates that + this backend is 'Private'.""" + private_link_location: Optional[str] = rest_field( + name="privateLinkLocation", visibility=["read", "create", "update", "delete", "query"] + ) + """The location of the Private Link resource. Required only if 'privateLinkResourceId' is + populated.""" + private_link_approval_message: Optional[str] = rest_field( + name="privateLinkApprovalMessage", visibility=["read", "create", "update", "delete", "query"] + ) + """A custom message to be included in the approval request to connect to the Private Link.""" + private_endpoint_status: Optional[Union[str, "_models.PrivateEndpointStatus"]] = rest_field( + name="privateEndpointStatus", visibility=["read"] + ) + """The approval status for the connection to the Private Link. Known values are: \"Pending\", + \"Approved\", \"Rejected\", \"Disconnected\", and \"Timeout\".""" + + @overload + def __init__( + self, + *, + host_name: str, + http_port: Optional[int] = None, + https_port: Optional[int] = None, + origin_host_header: Optional[str] = None, + priority: Optional[int] = None, + weight: Optional[int] = None, + enabled: Optional[bool] = None, + private_link_alias: Optional[str] = None, + private_link_resource_id: Optional[str] = None, + private_link_location: Optional[str] = None, + private_link_approval_message: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class DeliveryRule(_Model): + """A rule that specifies a set of actions and conditions. + + :ivar name: Name of the rule. + :vartype name: str + :ivar order: The order in which the rules are applied for the endpoint. Possible values + {0,1,2,3,………}. A rule with a lesser order will be applied before a rule with a greater order. + Rule with order 0 is a special rule. It does not require any condition and actions listed in it + will always be applied. Required. + :vartype order: int + :ivar conditions: A list of conditions that must be matched for the actions to be executed. + :vartype conditions: list[~azure.mgmt.cdn.models.DeliveryRuleCondition] + :ivar actions: A list of actions that are executed when all the conditions of a rule are + satisfied. Required. + :vartype actions: list[~azure.mgmt.cdn.models.DeliveryRuleAction] + """ + + name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Name of the rule.""" + order: int = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The order in which the rules are applied for the endpoint. Possible values {0,1,2,3,………}. A + rule with a lesser order will be applied before a rule with a greater order. Rule with order 0 + is a special rule. It does not require any condition and actions listed in it will always be + applied. Required.""" + conditions: Optional[list["_models.DeliveryRuleCondition"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """A list of conditions that must be matched for the actions to be executed.""" + actions: list["_models.DeliveryRuleAction"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """A list of actions that are executed when all the conditions of a rule are satisfied. Required.""" + + @overload + def __init__( + self, + *, + order: int, + actions: list["_models.DeliveryRuleAction"], + name: Optional[str] = None, + conditions: Optional[list["_models.DeliveryRuleCondition"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class DeliveryRuleAction(_Model): + """An action for the delivery rule. + + You probably want to use the sub-classes and not this class directly. Known sub-classes are: + DeliveryRuleCacheExpirationAction, DeliveryRuleCacheKeyQueryStringAction, + DeliveryRuleRequestHeaderAction, DeliveryRuleResponseHeaderAction, OriginGroupOverrideAction, + DeliveryRuleRouteConfigurationOverrideAction, UrlRedirectAction, UrlRewriteAction, + UrlSigningAction + + :ivar name: The name of the action for the delivery rule. Required. Known values are: + "CacheExpiration", "CacheKeyQueryString", "ModifyRequestHeader", "ModifyResponseHeader", + "UrlRedirect", "UrlRewrite", "UrlSigning", "OriginGroupOverride", and + "RouteConfigurationOverride". + :vartype name: str or ~azure.mgmt.cdn.models.DeliveryRuleActionName + """ + + __mapping__: dict[str, _Model] = {} + name: str = rest_discriminator(name="name", visibility=["read", "create", "update", "delete", "query"]) + """The name of the action for the delivery rule. Required. Known values are: \"CacheExpiration\", + \"CacheKeyQueryString\", \"ModifyRequestHeader\", \"ModifyResponseHeader\", \"UrlRedirect\", + \"UrlRewrite\", \"UrlSigning\", \"OriginGroupOverride\", and \"RouteConfigurationOverride\".""" + + @overload + def __init__( + self, + *, + name: str, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class DeliveryRuleCacheExpirationAction(DeliveryRuleAction, discriminator="CacheExpiration"): + """Defines the cache expiration action for the delivery rule. + + :ivar parameters: Defines the parameters for the action. Required. + :vartype parameters: ~azure.mgmt.cdn.models.CacheExpirationActionParameters + :ivar name: The name of the action for the delivery rule. Required. CACHE_EXPIRATION. + :vartype name: str or ~azure.mgmt.cdn.models.CACHE_EXPIRATION + """ + + parameters: "_models.CacheExpirationActionParameters" = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Defines the parameters for the action. Required.""" + name: Literal[DeliveryRuleActionName.CACHE_EXPIRATION] = rest_discriminator(name="name", visibility=["read", "create", "update", "delete", "query"]) # type: ignore + """The name of the action for the delivery rule. Required. CACHE_EXPIRATION.""" + + @overload + def __init__( + self, + *, + parameters: "_models.CacheExpirationActionParameters", + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + self.name = DeliveryRuleActionName.CACHE_EXPIRATION # type: ignore + + +class DeliveryRuleCacheKeyQueryStringAction(DeliveryRuleAction, discriminator="CacheKeyQueryString"): + """Defines the cache-key query string action for the delivery rule. + + :ivar parameters: Defines the parameters for the action. Required. + :vartype parameters: ~azure.mgmt.cdn.models.CacheKeyQueryStringActionParameters + :ivar name: The name of the action for the delivery rule. Required. CACHE_KEY_QUERY_STRING. + :vartype name: str or ~azure.mgmt.cdn.models.CACHE_KEY_QUERY_STRING + """ + + parameters: "_models.CacheKeyQueryStringActionParameters" = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Defines the parameters for the action. Required.""" + name: Literal[DeliveryRuleActionName.CACHE_KEY_QUERY_STRING] = rest_discriminator(name="name", visibility=["read", "create", "update", "delete", "query"]) # type: ignore + """The name of the action for the delivery rule. Required. CACHE_KEY_QUERY_STRING.""" + + @overload + def __init__( + self, + *, + parameters: "_models.CacheKeyQueryStringActionParameters", + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + self.name = DeliveryRuleActionName.CACHE_KEY_QUERY_STRING # type: ignore + + +class DeliveryRuleCondition(_Model): + """A condition for the delivery rule. + + You probably want to use the sub-classes and not this class directly. Known sub-classes are: + DeliveryRuleClientPortCondition, DeliveryRuleCookiesCondition, DeliveryRuleHostNameCondition, + DeliveryRuleHttpVersionCondition, DeliveryRuleIsDeviceCondition, DeliveryRulePostArgsCondition, + DeliveryRuleQueryStringCondition, DeliveryRuleRemoteAddressCondition, + DeliveryRuleRequestBodyCondition, DeliveryRuleRequestHeaderCondition, + DeliveryRuleRequestMethodCondition, DeliveryRuleRequestSchemeCondition, + DeliveryRuleRequestUriCondition, DeliveryRuleServerPortCondition, + DeliveryRuleSocketAddrCondition, DeliveryRuleSslProtocolCondition, + DeliveryRuleUrlFileExtensionCondition, DeliveryRuleUrlFileNameCondition, + DeliveryRuleUrlPathCondition + + :ivar name: The name of the condition for the delivery rule. Required. Known values are: + "RemoteAddress", "RequestMethod", "QueryString", "PostArgs", "RequestUri", "RequestHeader", + "RequestBody", "RequestScheme", "UrlPath", "UrlFileExtension", "UrlFileName", "HttpVersion", + "Cookies", "IsDevice", "SocketAddr", "ClientPort", "ServerPort", "HostName", and "SslProtocol". + :vartype name: str or ~azure.mgmt.cdn.models.MatchVariable + """ + + __mapping__: dict[str, _Model] = {} + name: str = rest_discriminator(name="name", visibility=["read", "create", "update", "delete", "query"]) + """The name of the condition for the delivery rule. Required. Known values are: \"RemoteAddress\", + \"RequestMethod\", \"QueryString\", \"PostArgs\", \"RequestUri\", \"RequestHeader\", + \"RequestBody\", \"RequestScheme\", \"UrlPath\", \"UrlFileExtension\", \"UrlFileName\", + \"HttpVersion\", \"Cookies\", \"IsDevice\", \"SocketAddr\", \"ClientPort\", \"ServerPort\", + \"HostName\", and \"SslProtocol\".""" + + @overload + def __init__( + self, + *, + name: str, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class DeliveryRuleClientPortCondition(DeliveryRuleCondition, discriminator="ClientPort"): + """Defines the ClientPort condition for the delivery rule. + + :ivar parameters: Defines the parameters for the condition. Required. + :vartype parameters: ~azure.mgmt.cdn.models.ClientPortMatchConditionParameters + :ivar name: The name of the condition for the delivery rule. Required. CLIENT_PORT. + :vartype name: str or ~azure.mgmt.cdn.models.CLIENT_PORT + """ + + parameters: "_models.ClientPortMatchConditionParameters" = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Defines the parameters for the condition. Required.""" + name: Literal[MatchVariable.CLIENT_PORT] = rest_discriminator(name="name", visibility=["read", "create", "update", "delete", "query"]) # type: ignore + """The name of the condition for the delivery rule. Required. CLIENT_PORT.""" + + @overload + def __init__( + self, + *, + parameters: "_models.ClientPortMatchConditionParameters", + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + self.name = MatchVariable.CLIENT_PORT # type: ignore + + +class DeliveryRuleCookiesCondition(DeliveryRuleCondition, discriminator="Cookies"): + """Defines the Cookies condition for the delivery rule. + + :ivar parameters: Defines the parameters for the condition. Required. + :vartype parameters: ~azure.mgmt.cdn.models.CookiesMatchConditionParameters + :ivar name: The name of the condition for the delivery rule. Required. COOKIES. + :vartype name: str or ~azure.mgmt.cdn.models.COOKIES + """ + + parameters: "_models.CookiesMatchConditionParameters" = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Defines the parameters for the condition. Required.""" + name: Literal[MatchVariable.COOKIES] = rest_discriminator(name="name", visibility=["read", "create", "update", "delete", "query"]) # type: ignore + """The name of the condition for the delivery rule. Required. COOKIES.""" + + @overload + def __init__( + self, + *, + parameters: "_models.CookiesMatchConditionParameters", + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + self.name = MatchVariable.COOKIES # type: ignore + + +class DeliveryRuleHostNameCondition(DeliveryRuleCondition, discriminator="HostName"): + """Defines the HostName condition for the delivery rule. + + :ivar parameters: Defines the parameters for the condition. Required. + :vartype parameters: ~azure.mgmt.cdn.models.HostNameMatchConditionParameters + :ivar name: The name of the condition for the delivery rule. Required. HOST_NAME. + :vartype name: str or ~azure.mgmt.cdn.models.HOST_NAME + """ + + parameters: "_models.HostNameMatchConditionParameters" = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Defines the parameters for the condition. Required.""" + name: Literal[MatchVariable.HOST_NAME] = rest_discriminator(name="name", visibility=["read", "create", "update", "delete", "query"]) # type: ignore + """The name of the condition for the delivery rule. Required. HOST_NAME.""" + + @overload + def __init__( + self, + *, + parameters: "_models.HostNameMatchConditionParameters", + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + self.name = MatchVariable.HOST_NAME # type: ignore + + +class DeliveryRuleHttpVersionCondition(DeliveryRuleCondition, discriminator="HttpVersion"): + """Defines the HttpVersion condition for the delivery rule. + + :ivar parameters: Defines the parameters for the condition. Required. + :vartype parameters: ~azure.mgmt.cdn.models.HttpVersionMatchConditionParameters + :ivar name: The name of the condition for the delivery rule. Required. HTTP_VERSION. + :vartype name: str or ~azure.mgmt.cdn.models.HTTP_VERSION + """ + + parameters: "_models.HttpVersionMatchConditionParameters" = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Defines the parameters for the condition. Required.""" + name: Literal[MatchVariable.HTTP_VERSION] = rest_discriminator(name="name", visibility=["read", "create", "update", "delete", "query"]) # type: ignore + """The name of the condition for the delivery rule. Required. HTTP_VERSION.""" + + @overload + def __init__( + self, + *, + parameters: "_models.HttpVersionMatchConditionParameters", + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + self.name = MatchVariable.HTTP_VERSION # type: ignore + + +class DeliveryRuleIsDeviceCondition(DeliveryRuleCondition, discriminator="IsDevice"): + """Defines the IsDevice condition for the delivery rule. + + :ivar parameters: Defines the parameters for the condition. Required. + :vartype parameters: ~azure.mgmt.cdn.models.IsDeviceMatchConditionParameters + :ivar name: The name of the condition for the delivery rule. Required. IS_DEVICE. + :vartype name: str or ~azure.mgmt.cdn.models.IS_DEVICE + """ + + parameters: "_models.IsDeviceMatchConditionParameters" = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Defines the parameters for the condition. Required.""" + name: Literal[MatchVariable.IS_DEVICE] = rest_discriminator(name="name", visibility=["read", "create", "update", "delete", "query"]) # type: ignore + """The name of the condition for the delivery rule. Required. IS_DEVICE.""" + + @overload + def __init__( + self, + *, + parameters: "_models.IsDeviceMatchConditionParameters", + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + self.name = MatchVariable.IS_DEVICE # type: ignore + + +class DeliveryRulePostArgsCondition(DeliveryRuleCondition, discriminator="PostArgs"): + """Defines the PostArgs condition for the delivery rule. + + :ivar parameters: Defines the parameters for the condition. Required. + :vartype parameters: ~azure.mgmt.cdn.models.PostArgsMatchConditionParameters + :ivar name: The name of the condition for the delivery rule. Required. POST_ARGS. + :vartype name: str or ~azure.mgmt.cdn.models.POST_ARGS + """ + + parameters: "_models.PostArgsMatchConditionParameters" = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Defines the parameters for the condition. Required.""" + name: Literal[MatchVariable.POST_ARGS] = rest_discriminator(name="name", visibility=["read", "create", "update", "delete", "query"]) # type: ignore + """The name of the condition for the delivery rule. Required. POST_ARGS.""" + + @overload + def __init__( + self, + *, + parameters: "_models.PostArgsMatchConditionParameters", + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + self.name = MatchVariable.POST_ARGS # type: ignore + + +class DeliveryRuleQueryStringCondition(DeliveryRuleCondition, discriminator="QueryString"): + """Defines the QueryString condition for the delivery rule. + + :ivar parameters: Defines the parameters for the condition. Required. + :vartype parameters: ~azure.mgmt.cdn.models.QueryStringMatchConditionParameters + :ivar name: The name of the condition for the delivery rule. Required. QUERY_STRING. + :vartype name: str or ~azure.mgmt.cdn.models.QUERY_STRING + """ + + parameters: "_models.QueryStringMatchConditionParameters" = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Defines the parameters for the condition. Required.""" + name: Literal[MatchVariable.QUERY_STRING] = rest_discriminator(name="name", visibility=["read", "create", "update", "delete", "query"]) # type: ignore + """The name of the condition for the delivery rule. Required. QUERY_STRING.""" + + @overload + def __init__( + self, + *, + parameters: "_models.QueryStringMatchConditionParameters", + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + self.name = MatchVariable.QUERY_STRING # type: ignore + + +class DeliveryRuleRemoteAddressCondition(DeliveryRuleCondition, discriminator="RemoteAddress"): + """Defines the RemoteAddress condition for the delivery rule. + + :ivar parameters: Defines the parameters for the condition. Required. + :vartype parameters: ~azure.mgmt.cdn.models.RemoteAddressMatchConditionParameters + :ivar name: The name of the condition for the delivery rule. Required. REMOTE_ADDRESS. + :vartype name: str or ~azure.mgmt.cdn.models.REMOTE_ADDRESS + """ + + parameters: "_models.RemoteAddressMatchConditionParameters" = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Defines the parameters for the condition. Required.""" + name: Literal[MatchVariable.REMOTE_ADDRESS] = rest_discriminator(name="name", visibility=["read", "create", "update", "delete", "query"]) # type: ignore + """The name of the condition for the delivery rule. Required. REMOTE_ADDRESS.""" + + @overload + def __init__( + self, + *, + parameters: "_models.RemoteAddressMatchConditionParameters", + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + self.name = MatchVariable.REMOTE_ADDRESS # type: ignore + + +class DeliveryRuleRequestBodyCondition(DeliveryRuleCondition, discriminator="RequestBody"): + """Defines the RequestBody condition for the delivery rule. + + :ivar parameters: Defines the parameters for the condition. Required. + :vartype parameters: ~azure.mgmt.cdn.models.RequestBodyMatchConditionParameters + :ivar name: The name of the condition for the delivery rule. Required. REQUEST_BODY. + :vartype name: str or ~azure.mgmt.cdn.models.REQUEST_BODY + """ + + parameters: "_models.RequestBodyMatchConditionParameters" = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Defines the parameters for the condition. Required.""" + name: Literal[MatchVariable.REQUEST_BODY] = rest_discriminator(name="name", visibility=["read", "create", "update", "delete", "query"]) # type: ignore + """The name of the condition for the delivery rule. Required. REQUEST_BODY.""" + + @overload + def __init__( + self, + *, + parameters: "_models.RequestBodyMatchConditionParameters", + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + self.name = MatchVariable.REQUEST_BODY # type: ignore + + +class DeliveryRuleRequestHeaderAction(DeliveryRuleAction, discriminator="ModifyRequestHeader"): + """Defines the request header action for the delivery rule. + + :ivar parameters: Defines the parameters for the action. Required. + :vartype parameters: ~azure.mgmt.cdn.models.HeaderActionParameters + :ivar name: The name of the action for the delivery rule. Required. MODIFY_REQUEST_HEADER. + :vartype name: str or ~azure.mgmt.cdn.models.MODIFY_REQUEST_HEADER + """ + + parameters: "_models.HeaderActionParameters" = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Defines the parameters for the action. Required.""" + name: Literal[DeliveryRuleActionName.MODIFY_REQUEST_HEADER] = rest_discriminator(name="name", visibility=["read", "create", "update", "delete", "query"]) # type: ignore + """The name of the action for the delivery rule. Required. MODIFY_REQUEST_HEADER.""" + + @overload + def __init__( + self, + *, + parameters: "_models.HeaderActionParameters", + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + self.name = DeliveryRuleActionName.MODIFY_REQUEST_HEADER # type: ignore + + +class DeliveryRuleRequestHeaderCondition(DeliveryRuleCondition, discriminator="RequestHeader"): + """Defines the RequestHeader condition for the delivery rule. + + :ivar parameters: Defines the parameters for the condition. Required. + :vartype parameters: ~azure.mgmt.cdn.models.RequestHeaderMatchConditionParameters + :ivar name: The name of the condition for the delivery rule. Required. REQUEST_HEADER. + :vartype name: str or ~azure.mgmt.cdn.models.REQUEST_HEADER + """ + + parameters: "_models.RequestHeaderMatchConditionParameters" = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Defines the parameters for the condition. Required.""" + name: Literal[MatchVariable.REQUEST_HEADER] = rest_discriminator(name="name", visibility=["read", "create", "update", "delete", "query"]) # type: ignore + """The name of the condition for the delivery rule. Required. REQUEST_HEADER.""" + + @overload + def __init__( + self, + *, + parameters: "_models.RequestHeaderMatchConditionParameters", + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + self.name = MatchVariable.REQUEST_HEADER # type: ignore + + +class DeliveryRuleRequestMethodCondition(DeliveryRuleCondition, discriminator="RequestMethod"): + """Defines the RequestMethod condition for the delivery rule. + + :ivar parameters: Defines the parameters for the condition. Required. + :vartype parameters: ~azure.mgmt.cdn.models.RequestMethodMatchConditionParameters + :ivar name: The name of the condition for the delivery rule. Required. REQUEST_METHOD. + :vartype name: str or ~azure.mgmt.cdn.models.REQUEST_METHOD + """ + + parameters: "_models.RequestMethodMatchConditionParameters" = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Defines the parameters for the condition. Required.""" + name: Literal[MatchVariable.REQUEST_METHOD] = rest_discriminator(name="name", visibility=["read", "create", "update", "delete", "query"]) # type: ignore + """The name of the condition for the delivery rule. Required. REQUEST_METHOD.""" + + @overload + def __init__( + self, + *, + parameters: "_models.RequestMethodMatchConditionParameters", + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + self.name = MatchVariable.REQUEST_METHOD # type: ignore + + +class DeliveryRuleRequestSchemeCondition(DeliveryRuleCondition, discriminator="RequestScheme"): + """Defines the RequestScheme condition for the delivery rule. + + :ivar parameters: Defines the parameters for the condition. Required. + :vartype parameters: ~azure.mgmt.cdn.models.RequestSchemeMatchConditionParameters + :ivar name: The name of the condition for the delivery rule. Required. REQUEST_SCHEME. + :vartype name: str or ~azure.mgmt.cdn.models.REQUEST_SCHEME + """ + + parameters: "_models.RequestSchemeMatchConditionParameters" = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Defines the parameters for the condition. Required.""" + name: Literal[MatchVariable.REQUEST_SCHEME] = rest_discriminator(name="name", visibility=["read", "create", "update", "delete", "query"]) # type: ignore + """The name of the condition for the delivery rule. Required. REQUEST_SCHEME.""" + + @overload + def __init__( + self, + *, + parameters: "_models.RequestSchemeMatchConditionParameters", + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + self.name = MatchVariable.REQUEST_SCHEME # type: ignore + + +class DeliveryRuleRequestUriCondition(DeliveryRuleCondition, discriminator="RequestUri"): + """Defines the RequestUri condition for the delivery rule. + + :ivar parameters: Defines the parameters for the condition. Required. + :vartype parameters: ~azure.mgmt.cdn.models.RequestUriMatchConditionParameters + :ivar name: The name of the condition for the delivery rule. Required. REQUEST_URI. + :vartype name: str or ~azure.mgmt.cdn.models.REQUEST_URI + """ + + parameters: "_models.RequestUriMatchConditionParameters" = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Defines the parameters for the condition. Required.""" + name: Literal[MatchVariable.REQUEST_URI] = rest_discriminator(name="name", visibility=["read", "create", "update", "delete", "query"]) # type: ignore + """The name of the condition for the delivery rule. Required. REQUEST_URI.""" + + @overload + def __init__( + self, + *, + parameters: "_models.RequestUriMatchConditionParameters", + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + self.name = MatchVariable.REQUEST_URI # type: ignore + + +class DeliveryRuleResponseHeaderAction(DeliveryRuleAction, discriminator="ModifyResponseHeader"): + """Defines the response header action for the delivery rule. + + :ivar parameters: Defines the parameters for the action. Required. + :vartype parameters: ~azure.mgmt.cdn.models.HeaderActionParameters + :ivar name: The name of the action for the delivery rule. Required. MODIFY_RESPONSE_HEADER. + :vartype name: str or ~azure.mgmt.cdn.models.MODIFY_RESPONSE_HEADER + """ + + parameters: "_models.HeaderActionParameters" = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Defines the parameters for the action. Required.""" + name: Literal[DeliveryRuleActionName.MODIFY_RESPONSE_HEADER] = rest_discriminator(name="name", visibility=["read", "create", "update", "delete", "query"]) # type: ignore + """The name of the action for the delivery rule. Required. MODIFY_RESPONSE_HEADER.""" + + @overload + def __init__( + self, + *, + parameters: "_models.HeaderActionParameters", + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + self.name = DeliveryRuleActionName.MODIFY_RESPONSE_HEADER # type: ignore + + +class DeliveryRuleRouteConfigurationOverrideAction( + DeliveryRuleAction, discriminator="RouteConfigurationOverride" +): # pylint: disable=name-too-long + """Defines the route configuration override action for the delivery rule. Only applicable to + Frontdoor Standard/Premium Profiles. + + :ivar parameters: Defines the parameters for the action. Required. + :vartype parameters: ~azure.mgmt.cdn.models.RouteConfigurationOverrideActionParameters + :ivar name: The name of the action for the delivery rule. Required. + ROUTE_CONFIGURATION_OVERRIDE. + :vartype name: str or ~azure.mgmt.cdn.models.ROUTE_CONFIGURATION_OVERRIDE + """ + + parameters: "_models.RouteConfigurationOverrideActionParameters" = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Defines the parameters for the action. Required.""" + name: Literal[DeliveryRuleActionName.ROUTE_CONFIGURATION_OVERRIDE] = rest_discriminator(name="name", visibility=["read", "create", "update", "delete", "query"]) # type: ignore + """The name of the action for the delivery rule. Required. ROUTE_CONFIGURATION_OVERRIDE.""" + + @overload + def __init__( + self, + *, + parameters: "_models.RouteConfigurationOverrideActionParameters", + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + self.name = DeliveryRuleActionName.ROUTE_CONFIGURATION_OVERRIDE # type: ignore + + +class DeliveryRuleServerPortCondition(DeliveryRuleCondition, discriminator="ServerPort"): + """Defines the ServerPort condition for the delivery rule. + + :ivar parameters: Defines the parameters for the condition. Required. + :vartype parameters: ~azure.mgmt.cdn.models.ServerPortMatchConditionParameters + :ivar name: The name of the condition for the delivery rule. Required. SERVER_PORT. + :vartype name: str or ~azure.mgmt.cdn.models.SERVER_PORT + """ + + parameters: "_models.ServerPortMatchConditionParameters" = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Defines the parameters for the condition. Required.""" + name: Literal[MatchVariable.SERVER_PORT] = rest_discriminator(name="name", visibility=["read", "create", "update", "delete", "query"]) # type: ignore + """The name of the condition for the delivery rule. Required. SERVER_PORT.""" + + @overload + def __init__( + self, + *, + parameters: "_models.ServerPortMatchConditionParameters", + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + self.name = MatchVariable.SERVER_PORT # type: ignore + + +class DeliveryRuleSocketAddrCondition(DeliveryRuleCondition, discriminator="SocketAddr"): + """Defines the SocketAddress condition for the delivery rule. + + :ivar parameters: Defines the parameters for the condition. Required. + :vartype parameters: ~azure.mgmt.cdn.models.SocketAddrMatchConditionParameters + :ivar name: The name of the condition for the delivery rule. Required. SOCKET_ADDR. + :vartype name: str or ~azure.mgmt.cdn.models.SOCKET_ADDR + """ + + parameters: "_models.SocketAddrMatchConditionParameters" = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Defines the parameters for the condition. Required.""" + name: Literal[MatchVariable.SOCKET_ADDR] = rest_discriminator(name="name", visibility=["read", "create", "update", "delete", "query"]) # type: ignore + """The name of the condition for the delivery rule. Required. SOCKET_ADDR.""" + + @overload + def __init__( + self, + *, + parameters: "_models.SocketAddrMatchConditionParameters", + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + self.name = MatchVariable.SOCKET_ADDR # type: ignore + + +class DeliveryRuleSslProtocolCondition(DeliveryRuleCondition, discriminator="SslProtocol"): + """Defines the SslProtocol condition for the delivery rule. + + :ivar parameters: Defines the parameters for the condition. Required. + :vartype parameters: ~azure.mgmt.cdn.models.SslProtocolMatchConditionParameters + :ivar name: The name of the condition for the delivery rule. Required. SSL_PROTOCOL. + :vartype name: str or ~azure.mgmt.cdn.models.SSL_PROTOCOL + """ + + parameters: "_models.SslProtocolMatchConditionParameters" = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Defines the parameters for the condition. Required.""" + name: Literal[MatchVariable.SSL_PROTOCOL] = rest_discriminator(name="name", visibility=["read", "create", "update", "delete", "query"]) # type: ignore + """The name of the condition for the delivery rule. Required. SSL_PROTOCOL.""" + + @overload + def __init__( + self, + *, + parameters: "_models.SslProtocolMatchConditionParameters", + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + self.name = MatchVariable.SSL_PROTOCOL # type: ignore + + +class DeliveryRuleUrlFileExtensionCondition(DeliveryRuleCondition, discriminator="UrlFileExtension"): + """Defines the UrlFileExtension condition for the delivery rule. + + :ivar parameters: Defines the parameters for the condition. Required. + :vartype parameters: ~azure.mgmt.cdn.models.UrlFileExtensionMatchConditionParameters + :ivar name: The name of the condition for the delivery rule. Required. URL_FILE_EXTENSION. + :vartype name: str or ~azure.mgmt.cdn.models.URL_FILE_EXTENSION + """ + + parameters: "_models.UrlFileExtensionMatchConditionParameters" = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Defines the parameters for the condition. Required.""" + name: Literal[MatchVariable.URL_FILE_EXTENSION] = rest_discriminator(name="name", visibility=["read", "create", "update", "delete", "query"]) # type: ignore + """The name of the condition for the delivery rule. Required. URL_FILE_EXTENSION.""" + + @overload + def __init__( + self, + *, + parameters: "_models.UrlFileExtensionMatchConditionParameters", + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + self.name = MatchVariable.URL_FILE_EXTENSION # type: ignore + + +class DeliveryRuleUrlFileNameCondition(DeliveryRuleCondition, discriminator="UrlFileName"): + """Defines the UrlFileName condition for the delivery rule. + + :ivar parameters: Defines the parameters for the condition. Required. + :vartype parameters: ~azure.mgmt.cdn.models.UrlFileNameMatchConditionParameters + :ivar name: The name of the condition for the delivery rule. Required. URL_FILE_NAME. + :vartype name: str or ~azure.mgmt.cdn.models.URL_FILE_NAME + """ + + parameters: "_models.UrlFileNameMatchConditionParameters" = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Defines the parameters for the condition. Required.""" + name: Literal[MatchVariable.URL_FILE_NAME] = rest_discriminator(name="name", visibility=["read", "create", "update", "delete", "query"]) # type: ignore + """The name of the condition for the delivery rule. Required. URL_FILE_NAME.""" + + @overload + def __init__( + self, + *, + parameters: "_models.UrlFileNameMatchConditionParameters", + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + self.name = MatchVariable.URL_FILE_NAME # type: ignore + + +class DeliveryRuleUrlPathCondition(DeliveryRuleCondition, discriminator="UrlPath"): + """Defines the UrlPath condition for the delivery rule. + + :ivar parameters: Defines the parameters for the condition. Required. + :vartype parameters: ~azure.mgmt.cdn.models.UrlPathMatchConditionParameters + :ivar name: The name of the condition for the delivery rule. Required. URL_PATH. + :vartype name: str or ~azure.mgmt.cdn.models.URL_PATH + """ + + parameters: "_models.UrlPathMatchConditionParameters" = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Defines the parameters for the condition. Required.""" + name: Literal[MatchVariable.URL_PATH] = rest_discriminator(name="name", visibility=["read", "create", "update", "delete", "query"]) # type: ignore + """The name of the condition for the delivery rule. Required. URL_PATH.""" + + @overload + def __init__( + self, + *, + parameters: "_models.UrlPathMatchConditionParameters", + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + self.name = MatchVariable.URL_PATH # type: ignore + + +class DimensionProperties(_Model): + """Type of operation: get, read, delete, etc. + + :ivar name: Name of dimension. + :vartype name: str + :ivar display_name: Display name of dimension. + :vartype display_name: str + :ivar internal_name: Internal name of dimension. + :vartype internal_name: str + """ + + name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Name of dimension.""" + display_name: Optional[str] = rest_field( + name="displayName", visibility=["read", "create", "update", "delete", "query"] + ) + """Display name of dimension.""" + internal_name: Optional[str] = rest_field( + name="internalName", visibility=["read", "create", "update", "delete", "query"] + ) + """Internal name of dimension.""" + + @overload + def __init__( + self, + *, + name: Optional[str] = None, + display_name: Optional[str] = None, + internal_name: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class DomainValidationProperties(_Model): + """The JSON object that contains the properties to validate a domain. + + :ivar validation_token: Challenge used for DNS TXT record or file based validation. + :vartype validation_token: str + :ivar expiration_date: The date time that the token expires. + :vartype expiration_date: str + """ + + validation_token: Optional[str] = rest_field(name="validationToken", visibility=["read"]) + """Challenge used for DNS TXT record or file based validation.""" + expiration_date: Optional[str] = rest_field(name="expirationDate", visibility=["read"]) + """The date time that the token expires.""" + + +class EdgeNode(ProxyResource): + """Edgenode is a global Point of Presence (POP) location used to deliver CDN content to end users. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.cdn.models.SystemData + :ivar properties: The JSON object that contains the properties required to create an edgenode. + :vartype properties: ~azure.mgmt.cdn.models.EdgeNodeProperties + """ + + properties: Optional["_models.EdgeNodeProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The JSON object that contains the properties required to create an edgenode.""" + + __flattened_items = ["ip_address_groups"] + + @overload + def __init__( + self, + *, + properties: Optional["_models.EdgeNodeProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class EdgeNodeProperties(_Model): + """The JSON object that contains the properties required to create an edgenode. + + :ivar ip_address_groups: List of ip address groups. Required. + :vartype ip_address_groups: list[~azure.mgmt.cdn.models.IpAddressGroup] + """ + + ip_address_groups: list["_models.IpAddressGroup"] = rest_field( + name="ipAddressGroups", visibility=["read", "create", "update", "delete", "query"] + ) + """List of ip address groups. Required.""" + + @overload + def __init__( + self, + *, + ip_address_groups: list["_models.IpAddressGroup"], + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class Endpoint(TrackedResource): + """CDN endpoint is the entity within a CDN profile containing configuration information such as + origin, protocol, content caching and delivery behavior. The CDN endpoint uses the URL format + .azureedge.net. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.cdn.models.SystemData + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar location: The geo-location where the resource lives. Required. + :vartype location: str + :ivar properties: The JSON object that contains the properties required to create an endpoint. + :vartype properties: ~azure.mgmt.cdn.models.EndpointProperties + """ + + properties: Optional["_models.EndpointProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The JSON object that contains the properties required to create an endpoint.""" + + __flattened_items = [ + "origin_path", + "content_types_to_compress", + "origin_host_header", + "is_compression_enabled", + "is_http_allowed", + "is_https_allowed", + "query_string_caching_behavior", + "optimization_type", + "probe_path", + "geo_filters", + "default_origin_group", + "url_signing_keys", + "delivery_policy", + "web_application_firewall_policy_link", + "host_name", + "origins", + "origin_groups", + "custom_domains", + "resource_state", + "provisioning_state", + ] + + @overload + def __init__( + self, + *, + location: str, + tags: Optional[dict[str, str]] = None, + properties: Optional["_models.EndpointProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class EndpointPropertiesUpdateParameters(_Model): + """The JSON object containing endpoint update parameters. + + :ivar origin_path: A directory path on the origin that CDN can use to retrieve content from, + e.g. contoso.cloudapp.net/originpath. + :vartype origin_path: str + :ivar content_types_to_compress: List of content types on which compression applies. The value + should be a valid MIME type. + :vartype content_types_to_compress: list[str] + :ivar origin_host_header: The host header value sent to the origin with each request. This + property at Endpoint is only allowed when endpoint uses single origin and can be overridden by + the same property specified at origin.If you leave this blank, the request hostname determines + this value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this + host header value to match the origin hostname by default. + :vartype origin_host_header: str + :ivar is_compression_enabled: Indicates whether content compression is enabled on CDN. Default + value is false. If compression is enabled, content will be served as compressed if user + requests for a compressed version. Content won't be compressed on CDN when requested content is + smaller than 1 byte or larger than 1 MB. + :vartype is_compression_enabled: bool + :ivar is_http_allowed: Indicates whether HTTP traffic is allowed on the endpoint. Default value + is true. At least one protocol (HTTP or HTTPS) must be allowed. + :vartype is_http_allowed: bool + :ivar is_https_allowed: Indicates whether HTTPS traffic is allowed on the endpoint. Default + value is true. At least one protocol (HTTP or HTTPS) must be allowed. + :vartype is_https_allowed: bool + :ivar query_string_caching_behavior: Defines how CDN caches requests that include query + strings. You can ignore any query strings when caching, bypass caching to prevent requests that + contain query strings from being cached, or cache every request with a unique URL. Known values + are: "IgnoreQueryString", "BypassCaching", "UseQueryString", and "NotSet". + :vartype query_string_caching_behavior: str or + ~azure.mgmt.cdn.models.QueryStringCachingBehavior + :ivar optimization_type: Specifies what scenario the customer wants this CDN endpoint to + optimize for, e.g. Download, Media services. With this information, CDN can apply scenario + driven optimization. Known values are: "GeneralWebDelivery", "GeneralMediaStreaming", + "VideoOnDemandMediaStreaming", "LargeFileDownload", and "DynamicSiteAcceleration". + :vartype optimization_type: str or ~azure.mgmt.cdn.models.OptimizationType + :ivar probe_path: Path to a file hosted on the origin which helps accelerate delivery of the + dynamic content and calculate the most optimal routes for the CDN. This is relative to the + origin path. This property is only relevant when using a single origin. + :vartype probe_path: str + :ivar geo_filters: List of rules defining the user's geo access within a CDN endpoint. Each geo + filter defines an access rule to a specified path or content, e.g. block APAC for path + /pictures/. + :vartype geo_filters: list[~azure.mgmt.cdn.models.GeoFilter] + :ivar default_origin_group: A reference to the origin group. + :vartype default_origin_group: ~azure.mgmt.cdn.models.ResourceReference + :ivar url_signing_keys: List of keys used to validate the signed URL hashes. + :vartype url_signing_keys: list[~azure.mgmt.cdn.models.UrlSigningKey] + :ivar delivery_policy: A policy that specifies the delivery rules to be used for an endpoint. + :vartype delivery_policy: + ~azure.mgmt.cdn.models.EndpointPropertiesUpdateParametersDeliveryPolicy + :ivar web_application_firewall_policy_link: Defines the Web Application Firewall policy for the + endpoint (if applicable). + :vartype web_application_firewall_policy_link: + ~azure.mgmt.cdn.models.EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink + """ + + origin_path: Optional[str] = rest_field( + name="originPath", visibility=["read", "create", "update", "delete", "query"] + ) + """A directory path on the origin that CDN can use to retrieve content from, e.g. + contoso.cloudapp.net/originpath.""" + content_types_to_compress: Optional[list[str]] = rest_field( + name="contentTypesToCompress", visibility=["read", "create", "update", "delete", "query"] + ) + """List of content types on which compression applies. The value should be a valid MIME type.""" + origin_host_header: Optional[str] = rest_field( + name="originHostHeader", visibility=["read", "create", "update", "delete", "query"] + ) + """The host header value sent to the origin with each request. This property at Endpoint is only + allowed when endpoint uses single origin and can be overridden by the same property specified + at origin.If you leave this blank, the request hostname determines this value. Azure CDN + origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to + match the origin hostname by default.""" + is_compression_enabled: Optional[bool] = rest_field( + name="isCompressionEnabled", visibility=["read", "create", "update", "delete", "query"] + ) + """Indicates whether content compression is enabled on CDN. Default value is false. If compression + is enabled, content will be served as compressed if user requests for a compressed version. + Content won't be compressed on CDN when requested content is smaller than 1 byte or larger than + 1 MB.""" + is_http_allowed: Optional[bool] = rest_field( + name="isHttpAllowed", visibility=["read", "create", "update", "delete", "query"] + ) + """Indicates whether HTTP traffic is allowed on the endpoint. Default value is true. At least one + protocol (HTTP or HTTPS) must be allowed.""" + is_https_allowed: Optional[bool] = rest_field( + name="isHttpsAllowed", visibility=["read", "create", "update", "delete", "query"] + ) + """Indicates whether HTTPS traffic is allowed on the endpoint. Default value is true. At least one + protocol (HTTP or HTTPS) must be allowed.""" + query_string_caching_behavior: Optional[Union[str, "_models.QueryStringCachingBehavior"]] = rest_field( + name="queryStringCachingBehavior", visibility=["read", "create", "update", "delete", "query"] + ) + """Defines how CDN caches requests that include query strings. You can ignore any query strings + when caching, bypass caching to prevent requests that contain query strings from being cached, + or cache every request with a unique URL. Known values are: \"IgnoreQueryString\", + \"BypassCaching\", \"UseQueryString\", and \"NotSet\".""" + optimization_type: Optional[Union[str, "_models.OptimizationType"]] = rest_field( + name="optimizationType", visibility=["read", "create", "update", "delete", "query"] + ) + """Specifies what scenario the customer wants this CDN endpoint to optimize for, e.g. Download, + Media services. With this information, CDN can apply scenario driven optimization. Known values + are: \"GeneralWebDelivery\", \"GeneralMediaStreaming\", \"VideoOnDemandMediaStreaming\", + \"LargeFileDownload\", and \"DynamicSiteAcceleration\".""" + probe_path: Optional[str] = rest_field(name="probePath", visibility=["read", "create", "update", "delete", "query"]) + """Path to a file hosted on the origin which helps accelerate delivery of the dynamic content and + calculate the most optimal routes for the CDN. This is relative to the origin path. This + property is only relevant when using a single origin.""" + geo_filters: Optional[list["_models.GeoFilter"]] = rest_field( + name="geoFilters", visibility=["read", "create", "update", "delete", "query"] + ) + """List of rules defining the user's geo access within a CDN endpoint. Each geo filter defines an + access rule to a specified path or content, e.g. block APAC for path /pictures/.""" + default_origin_group: Optional["_models.ResourceReference"] = rest_field( + name="defaultOriginGroup", visibility=["read", "create", "update", "delete", "query"] + ) + """A reference to the origin group.""" + url_signing_keys: Optional[list["_models.UrlSigningKey"]] = rest_field( + name="urlSigningKeys", visibility=["read", "create", "update", "delete", "query"] + ) + """List of keys used to validate the signed URL hashes.""" + delivery_policy: Optional["_models.EndpointPropertiesUpdateParametersDeliveryPolicy"] = rest_field( + name="deliveryPolicy", visibility=["read", "create", "update", "delete", "query"] + ) + """A policy that specifies the delivery rules to be used for an endpoint.""" + web_application_firewall_policy_link: Optional[ + "_models.EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink" + ] = rest_field(name="webApplicationFirewallPolicyLink", visibility=["read", "create", "update", "delete", "query"]) + """Defines the Web Application Firewall policy for the endpoint (if applicable).""" + + @overload + def __init__( + self, + *, + origin_path: Optional[str] = None, + content_types_to_compress: Optional[list[str]] = None, + origin_host_header: Optional[str] = None, + is_compression_enabled: Optional[bool] = None, + is_http_allowed: Optional[bool] = None, + is_https_allowed: Optional[bool] = None, + query_string_caching_behavior: Optional[Union[str, "_models.QueryStringCachingBehavior"]] = None, + optimization_type: Optional[Union[str, "_models.OptimizationType"]] = None, + probe_path: Optional[str] = None, + geo_filters: Optional[list["_models.GeoFilter"]] = None, + default_origin_group: Optional["_models.ResourceReference"] = None, + url_signing_keys: Optional[list["_models.UrlSigningKey"]] = None, + delivery_policy: Optional["_models.EndpointPropertiesUpdateParametersDeliveryPolicy"] = None, + web_application_firewall_policy_link: Optional[ + "_models.EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink" + ] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class EndpointProperties(EndpointPropertiesUpdateParameters): + """The JSON object that contains the properties required to create an endpoint. + + :ivar origin_path: A directory path on the origin that CDN can use to retrieve content from, + e.g. contoso.cloudapp.net/originpath. + :vartype origin_path: str + :ivar content_types_to_compress: List of content types on which compression applies. The value + should be a valid MIME type. + :vartype content_types_to_compress: list[str] + :ivar origin_host_header: The host header value sent to the origin with each request. This + property at Endpoint is only allowed when endpoint uses single origin and can be overridden by + the same property specified at origin.If you leave this blank, the request hostname determines + this value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this + host header value to match the origin hostname by default. + :vartype origin_host_header: str + :ivar is_compression_enabled: Indicates whether content compression is enabled on CDN. Default + value is false. If compression is enabled, content will be served as compressed if user + requests for a compressed version. Content won't be compressed on CDN when requested content is + smaller than 1 byte or larger than 1 MB. + :vartype is_compression_enabled: bool + :ivar is_http_allowed: Indicates whether HTTP traffic is allowed on the endpoint. Default value + is true. At least one protocol (HTTP or HTTPS) must be allowed. + :vartype is_http_allowed: bool + :ivar is_https_allowed: Indicates whether HTTPS traffic is allowed on the endpoint. Default + value is true. At least one protocol (HTTP or HTTPS) must be allowed. + :vartype is_https_allowed: bool + :ivar query_string_caching_behavior: Defines how CDN caches requests that include query + strings. You can ignore any query strings when caching, bypass caching to prevent requests that + contain query strings from being cached, or cache every request with a unique URL. Known values + are: "IgnoreQueryString", "BypassCaching", "UseQueryString", and "NotSet". + :vartype query_string_caching_behavior: str or + ~azure.mgmt.cdn.models.QueryStringCachingBehavior + :ivar optimization_type: Specifies what scenario the customer wants this CDN endpoint to + optimize for, e.g. Download, Media services. With this information, CDN can apply scenario + driven optimization. Known values are: "GeneralWebDelivery", "GeneralMediaStreaming", + "VideoOnDemandMediaStreaming", "LargeFileDownload", and "DynamicSiteAcceleration". + :vartype optimization_type: str or ~azure.mgmt.cdn.models.OptimizationType + :ivar probe_path: Path to a file hosted on the origin which helps accelerate delivery of the + dynamic content and calculate the most optimal routes for the CDN. This is relative to the + origin path. This property is only relevant when using a single origin. + :vartype probe_path: str + :ivar geo_filters: List of rules defining the user's geo access within a CDN endpoint. Each geo + filter defines an access rule to a specified path or content, e.g. block APAC for path + /pictures/. + :vartype geo_filters: list[~azure.mgmt.cdn.models.GeoFilter] + :ivar default_origin_group: A reference to the origin group. + :vartype default_origin_group: ~azure.mgmt.cdn.models.ResourceReference + :ivar url_signing_keys: List of keys used to validate the signed URL hashes. + :vartype url_signing_keys: list[~azure.mgmt.cdn.models.UrlSigningKey] + :ivar delivery_policy: A policy that specifies the delivery rules to be used for an endpoint. + :vartype delivery_policy: + ~azure.mgmt.cdn.models.EndpointPropertiesUpdateParametersDeliveryPolicy + :ivar web_application_firewall_policy_link: Defines the Web Application Firewall policy for the + endpoint (if applicable). + :vartype web_application_firewall_policy_link: + ~azure.mgmt.cdn.models.EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink + :ivar host_name: The host name of the endpoint structured as {endpointName}.{DNSZone}, e.g. + contoso.azureedge.net. + :vartype host_name: str + :ivar origins: The source of the content being delivered via CDN. Required. + :vartype origins: list[~azure.mgmt.cdn.models.DeepCreatedOrigin] + :ivar origin_groups: The origin groups comprising of origins that are used for load balancing + the traffic based on availability. + :vartype origin_groups: list[~azure.mgmt.cdn.models.DeepCreatedOriginGroup] + :ivar custom_domains: The custom domains under the endpoint. + :vartype custom_domains: list[~azure.mgmt.cdn.models.DeepCreatedCustomDomain] + :ivar resource_state: Resource status of the endpoint. Known values are: "Creating", + "Deleting", "Running", "Starting", "Stopped", and "Stopping". + :vartype resource_state: str or ~azure.mgmt.cdn.models.EndpointResourceState + :ivar provisioning_state: Provisioning status of the endpoint. Known values are: "Succeeded", + "Failed", "Updating", "Deleting", and "Creating". + :vartype provisioning_state: str or ~azure.mgmt.cdn.models.EndpointProvisioningState + """ + + host_name: Optional[str] = rest_field(name="hostName", visibility=["read"]) + """The host name of the endpoint structured as {endpointName}.{DNSZone}, e.g. + contoso.azureedge.net.""" + origins: list["_models.DeepCreatedOrigin"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The source of the content being delivered via CDN. Required.""" + origin_groups: Optional[list["_models.DeepCreatedOriginGroup"]] = rest_field( + name="originGroups", visibility=["read", "create", "update", "delete", "query"] + ) + """The origin groups comprising of origins that are used for load balancing the traffic based on + availability.""" + custom_domains: Optional[list["_models.DeepCreatedCustomDomain"]] = rest_field( + name="customDomains", visibility=["read"] + ) + """The custom domains under the endpoint.""" + resource_state: Optional[Union[str, "_models.EndpointResourceState"]] = rest_field( + name="resourceState", visibility=["read"] + ) + """Resource status of the endpoint. Known values are: \"Creating\", \"Deleting\", \"Running\", + \"Starting\", \"Stopped\", and \"Stopping\".""" + provisioning_state: Optional[Union[str, "_models.EndpointProvisioningState"]] = rest_field( + name="provisioningState", visibility=["read"] + ) + """Provisioning status of the endpoint. Known values are: \"Succeeded\", \"Failed\", \"Updating\", + \"Deleting\", and \"Creating\".""" + + @overload + def __init__( + self, + *, + origins: list["_models.DeepCreatedOrigin"], + origin_path: Optional[str] = None, + content_types_to_compress: Optional[list[str]] = None, + origin_host_header: Optional[str] = None, + is_compression_enabled: Optional[bool] = None, + is_http_allowed: Optional[bool] = None, + is_https_allowed: Optional[bool] = None, + query_string_caching_behavior: Optional[Union[str, "_models.QueryStringCachingBehavior"]] = None, + optimization_type: Optional[Union[str, "_models.OptimizationType"]] = None, + probe_path: Optional[str] = None, + geo_filters: Optional[list["_models.GeoFilter"]] = None, + default_origin_group: Optional["_models.ResourceReference"] = None, + url_signing_keys: Optional[list["_models.UrlSigningKey"]] = None, + delivery_policy: Optional["_models.EndpointPropertiesUpdateParametersDeliveryPolicy"] = None, + web_application_firewall_policy_link: Optional[ + "_models.EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink" + ] = None, + origin_groups: Optional[list["_models.DeepCreatedOriginGroup"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class EndpointPropertiesUpdateParametersDeliveryPolicy(_Model): # pylint: disable=name-too-long + """A policy that specifies the delivery rules to be used for an endpoint. + + :ivar description: User-friendly description of the policy. + :vartype description: str + :ivar rules: A list of the delivery rules. Required. + :vartype rules: list[~azure.mgmt.cdn.models.DeliveryRule] + """ + + description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """User-friendly description of the policy.""" + rules: list["_models.DeliveryRule"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """A list of the delivery rules. Required.""" + + @overload + def __init__( + self, + *, + rules: list["_models.DeliveryRule"], + description: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink(_Model): # pylint: disable=name-too-long + """Defines the Web Application Firewall policy for the endpoint (if applicable). + + :ivar id: Resource ID. + :vartype id: str + """ + + id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Resource ID.""" + + @overload + def __init__( + self, + *, + id: Optional[str] = None, # pylint: disable=redefined-builtin + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class EndpointUpdateParameters(_Model): + """Properties required to create or update an endpoint. + + :ivar tags: Endpoint tags. + :vartype tags: dict[str, str] + :ivar properties: The JSON object containing endpoint update parameters. + :vartype properties: ~azure.mgmt.cdn.models.EndpointPropertiesUpdateParameters + """ + + tags: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Endpoint tags.""" + properties: Optional["_models.EndpointPropertiesUpdateParameters"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The JSON object containing endpoint update parameters.""" + + __flattened_items = [ + "origin_path", + "content_types_to_compress", + "origin_host_header", + "is_compression_enabled", + "is_http_allowed", + "is_https_allowed", + "query_string_caching_behavior", + "optimization_type", + "probe_path", + "geo_filters", + "default_origin_group", + "url_signing_keys", + "delivery_policy", + "web_application_firewall_policy_link", + ] + + @overload + def __init__( + self, + *, + tags: Optional[dict[str, str]] = None, + properties: Optional["_models.EndpointPropertiesUpdateParameters"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class ErrorAdditionalInfo(_Model): + """The resource management error additional info. + + :ivar type: The additional info type. + :vartype type: str + :ivar info: The additional info. + :vartype info: any + """ + + type: Optional[str] = rest_field(visibility=["read"]) + """The additional info type.""" + info: Optional[Any] = rest_field(visibility=["read"]) + """The additional info.""" + + +class ErrorDetail(_Model): + """The error detail. + + :ivar code: The error code. + :vartype code: str + :ivar message: The error message. + :vartype message: str + :ivar target: The error target. + :vartype target: str + :ivar details: The error details. + :vartype details: list[~azure.mgmt.cdn.models.ErrorDetail] + :ivar additional_info: The error additional info. + :vartype additional_info: list[~azure.mgmt.cdn.models.ErrorAdditionalInfo] + """ + + code: Optional[str] = rest_field(visibility=["read"]) + """The error code.""" + message: Optional[str] = rest_field(visibility=["read"]) + """The error message.""" + target: Optional[str] = rest_field(visibility=["read"]) + """The error target.""" + details: Optional[list["_models.ErrorDetail"]] = rest_field(visibility=["read"]) + """The error details.""" + additional_info: Optional[list["_models.ErrorAdditionalInfo"]] = rest_field( + name="additionalInfo", visibility=["read"] + ) + """The error additional info.""" + + +class ErrorResponse(_Model): + """Error response. + + :ivar error: The error object. + :vartype error: ~azure.mgmt.cdn.models.ErrorDetail + """ + + error: Optional["_models.ErrorDetail"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The error object.""" + + @overload + def __init__( + self, + *, + error: Optional["_models.ErrorDetail"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class GeoFilter(_Model): + """Rules defining user's geo access within a CDN endpoint. + + :ivar relative_path: Relative path applicable to geo filter. (e.g. '/mypictures', + '/mypicture/kitty.jpg', and etc.). Required. + :vartype relative_path: str + :ivar action: Action of the geo filter, i.e. allow or block access. Required. Known values are: + "Block" and "Allow". + :vartype action: str or ~azure.mgmt.cdn.models.GeoFilterActions + :ivar country_codes: Two letter country or region codes defining user country or region access + in a geo filter, e.g. AU, MX, US. Required. + :vartype country_codes: list[str] + """ + + relative_path: str = rest_field(name="relativePath", visibility=["read", "create", "update", "delete", "query"]) + """Relative path applicable to geo filter. (e.g. '/mypictures', '/mypicture/kitty.jpg', and etc.). + Required.""" + action: Union[str, "_models.GeoFilterActions"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Action of the geo filter, i.e. allow or block access. Required. Known values are: \"Block\" and + \"Allow\".""" + country_codes: list[str] = rest_field( + name="countryCodes", visibility=["read", "create", "update", "delete", "query"] + ) + """Two letter country or region codes defining user country or region access in a geo filter, e.g. + AU, MX, US. Required.""" + + @overload + def __init__( + self, + *, + relative_path: str, + action: Union[str, "_models.GeoFilterActions"], + country_codes: list[str], + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class HeaderActionParameters(DeliveryRuleActionParameters, discriminator="DeliveryRuleHeaderActionParameters"): + """Defines the parameters for the request header action. + + :ivar header_action: Action to perform. Required. Known values are: "Append", "Overwrite", and + "Delete". + :vartype header_action: str or ~azure.mgmt.cdn.models.HeaderAction + :ivar header_name: Name of the header to modify. Required. + :vartype header_name: str + :ivar value: Value for the specified action. + :vartype value: str + :ivar type_name: Required. DELIVERY_RULE_HEADER_ACTION_PARAMETERS. + :vartype type_name: str or ~azure.mgmt.cdn.models.DELIVERY_RULE_HEADER_ACTION_PARAMETERS + """ + + header_action: Union[str, "_models.HeaderAction"] = rest_field( + name="headerAction", visibility=["read", "create", "update", "delete", "query"] + ) + """Action to perform. Required. Known values are: \"Append\", \"Overwrite\", and \"Delete\".""" + header_name: str = rest_field(name="headerName", visibility=["read", "create", "update", "delete", "query"]) + """Name of the header to modify. Required.""" + value: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Value for the specified action.""" + type_name: Literal[DeliveryRuleActionParametersType.DELIVERY_RULE_HEADER_ACTION_PARAMETERS] = rest_discriminator(name="typeName", visibility=["read", "create", "update", "delete", "query"]) # type: ignore + """Required. DELIVERY_RULE_HEADER_ACTION_PARAMETERS.""" + + @overload + def __init__( + self, + *, + header_action: Union[str, "_models.HeaderAction"], + header_name: str, + value: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + self.type_name = DeliveryRuleActionParametersType.DELIVERY_RULE_HEADER_ACTION_PARAMETERS # type: ignore + + +class HealthProbeParameters(_Model): + """The JSON object that contains the properties to send health probes to origin. + + :ivar probe_path: The path relative to the origin that is used to determine the health of the + origin. + :vartype probe_path: str + :ivar probe_request_type: The type of health probe request that is made. Known values are: + "NotSet", "GET", and "HEAD". + :vartype probe_request_type: str or ~azure.mgmt.cdn.models.HealthProbeRequestType + :ivar probe_protocol: Protocol to use for health probe. Known values are: "NotSet", "Http", and + "Https". + :vartype probe_protocol: str or ~azure.mgmt.cdn.models.ProbeProtocol + :ivar probe_interval_in_seconds: The number of seconds between health probes.Default is 240sec. + :vartype probe_interval_in_seconds: int + """ + + probe_path: Optional[str] = rest_field(name="probePath", visibility=["read", "create", "update", "delete", "query"]) + """The path relative to the origin that is used to determine the health of the origin.""" + probe_request_type: Optional[Union[str, "_models.HealthProbeRequestType"]] = rest_field( + name="probeRequestType", visibility=["read", "create", "update", "delete", "query"] + ) + """The type of health probe request that is made. Known values are: \"NotSet\", \"GET\", and + \"HEAD\".""" + probe_protocol: Optional[Union[str, "_models.ProbeProtocol"]] = rest_field( + name="probeProtocol", visibility=["read", "create", "update", "delete", "query"] + ) + """Protocol to use for health probe. Known values are: \"NotSet\", \"Http\", and \"Https\".""" + probe_interval_in_seconds: Optional[int] = rest_field( + name="probeIntervalInSeconds", visibility=["read", "create", "update", "delete", "query"] + ) + """The number of seconds between health probes.Default is 240sec.""" + + @overload + def __init__( + self, + *, + probe_path: Optional[str] = None, + probe_request_type: Optional[Union[str, "_models.HealthProbeRequestType"]] = None, + probe_protocol: Optional[Union[str, "_models.ProbeProtocol"]] = None, + probe_interval_in_seconds: Optional[int] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class HostNameMatchConditionParameters( + DeliveryRuleConditionParameters, discriminator="DeliveryRuleHostNameConditionParameters" +): + """Defines the parameters for HostName match conditions. + + :ivar operator: Describes operator to be matched. Required. Known values are: "Any", "Equal", + "Contains", "BeginsWith", "EndsWith", "LessThan", "LessThanOrEqual", "GreaterThan", + "GreaterThanOrEqual", and "RegEx". + :vartype operator: str or ~azure.mgmt.cdn.models.HostNameOperator + :ivar negate_condition: Describes if this is negate condition or not. + :vartype negate_condition: bool + :ivar match_values: The match value for the condition of the delivery rule. + :vartype match_values: list[str] + :ivar transforms: List of transforms. + :vartype transforms: list[str or ~azure.mgmt.cdn.models.Transform] + :ivar type_name: Required. DELIVERY_RULE_HOST_NAME_CONDITION_PARAMETERS. + :vartype type_name: str or ~azure.mgmt.cdn.models.DELIVERY_RULE_HOST_NAME_CONDITION_PARAMETERS + """ + + operator: Union[str, "_models.HostNameOperator"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Describes operator to be matched. Required. Known values are: \"Any\", \"Equal\", \"Contains\", + \"BeginsWith\", \"EndsWith\", \"LessThan\", \"LessThanOrEqual\", \"GreaterThan\", + \"GreaterThanOrEqual\", and \"RegEx\".""" + negate_condition: Optional[bool] = rest_field( + name="negateCondition", visibility=["read", "create", "update", "delete", "query"] + ) + """Describes if this is negate condition or not.""" + match_values: Optional[list[str]] = rest_field( + name="matchValues", visibility=["read", "create", "update", "delete", "query"] + ) + """The match value for the condition of the delivery rule.""" + transforms: Optional[list[Union[str, "_models.Transform"]]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """List of transforms.""" + type_name: Literal[DeliveryRuleConditionParametersType.DELIVERY_RULE_HOST_NAME_CONDITION_PARAMETERS] = rest_discriminator(name="typeName", visibility=["read", "create", "update", "delete", "query"]) # type: ignore + """Required. DELIVERY_RULE_HOST_NAME_CONDITION_PARAMETERS.""" + + @overload + def __init__( + self, + *, + operator: Union[str, "_models.HostNameOperator"], + negate_condition: Optional[bool] = None, + match_values: Optional[list[str]] = None, + transforms: Optional[list[Union[str, "_models.Transform"]]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + self.type_name = DeliveryRuleConditionParametersType.DELIVERY_RULE_HOST_NAME_CONDITION_PARAMETERS # type: ignore + + +class HttpErrorRangeParameters(_Model): + """The JSON object that represents the range for http status codes. + + :ivar begin: The inclusive start of the http status code range. + :vartype begin: int + :ivar end: The inclusive end of the http status code range. + :vartype end: int + """ + + begin: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The inclusive start of the http status code range.""" + end: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The inclusive end of the http status code range.""" + + @overload + def __init__( + self, + *, + begin: Optional[int] = None, + end: Optional[int] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class HttpVersionMatchConditionParameters( + DeliveryRuleConditionParameters, discriminator="DeliveryRuleHttpVersionConditionParameters" +): + """Defines the parameters for HttpVersion match conditions. + + :ivar operator: Describes operator to be matched. Required. "Equal" + :vartype operator: str or ~azure.mgmt.cdn.models.HttpVersionOperator + :ivar negate_condition: Describes if this is negate condition or not. + :vartype negate_condition: bool + :ivar match_values: The match value for the condition of the delivery rule. + :vartype match_values: list[str] + :ivar transforms: List of transforms. + :vartype transforms: list[str or ~azure.mgmt.cdn.models.Transform] + :ivar type_name: Required. DELIVERY_RULE_HTTP_VERSION_CONDITION_PARAMETERS. + :vartype type_name: str or + ~azure.mgmt.cdn.models.DELIVERY_RULE_HTTP_VERSION_CONDITION_PARAMETERS + """ + + operator: Union[str, "_models.HttpVersionOperator"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Describes operator to be matched. Required. \"Equal\"""" + negate_condition: Optional[bool] = rest_field( + name="negateCondition", visibility=["read", "create", "update", "delete", "query"] + ) + """Describes if this is negate condition or not.""" + match_values: Optional[list[str]] = rest_field( + name="matchValues", visibility=["read", "create", "update", "delete", "query"] + ) + """The match value for the condition of the delivery rule.""" + transforms: Optional[list[Union[str, "_models.Transform"]]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """List of transforms.""" + type_name: Literal[DeliveryRuleConditionParametersType.DELIVERY_RULE_HTTP_VERSION_CONDITION_PARAMETERS] = rest_discriminator(name="typeName", visibility=["read", "create", "update", "delete", "query"]) # type: ignore + """Required. DELIVERY_RULE_HTTP_VERSION_CONDITION_PARAMETERS.""" + + @overload + def __init__( + self, + *, + operator: Union[str, "_models.HttpVersionOperator"], + negate_condition: Optional[bool] = None, + match_values: Optional[list[str]] = None, + transforms: Optional[list[Union[str, "_models.Transform"]]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + self.type_name = DeliveryRuleConditionParametersType.DELIVERY_RULE_HTTP_VERSION_CONDITION_PARAMETERS # type: ignore + + +class IpAddressGroup(_Model): + """CDN Ip address group. + + :ivar delivery_region: The delivery region of the ip address group. + :vartype delivery_region: str + :ivar ipv4_addresses: The list of ip v4 addresses. + :vartype ipv4_addresses: list[~azure.mgmt.cdn.models.CidrIpAddress] + :ivar ipv6_addresses: The list of ip v6 addresses. + :vartype ipv6_addresses: list[~azure.mgmt.cdn.models.CidrIpAddress] + """ + + delivery_region: Optional[str] = rest_field( + name="deliveryRegion", visibility=["read", "create", "update", "delete", "query"] + ) + """The delivery region of the ip address group.""" + ipv4_addresses: Optional[list["_models.CidrIpAddress"]] = rest_field( + name="ipv4Addresses", visibility=["read", "create", "update", "delete", "query"] + ) + """The list of ip v4 addresses.""" + ipv6_addresses: Optional[list["_models.CidrIpAddress"]] = rest_field( + name="ipv6Addresses", visibility=["read", "create", "update", "delete", "query"] + ) + """The list of ip v6 addresses.""" + + @overload + def __init__( + self, + *, + delivery_region: Optional[str] = None, + ipv4_addresses: Optional[list["_models.CidrIpAddress"]] = None, + ipv6_addresses: Optional[list["_models.CidrIpAddress"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class IsDeviceMatchConditionParameters( + DeliveryRuleConditionParameters, discriminator="DeliveryRuleIsDeviceConditionParameters" +): + """Defines the parameters for IsDevice match conditions. + + :ivar operator: Describes operator to be matched. Required. "Equal" + :vartype operator: str or ~azure.mgmt.cdn.models.IsDeviceOperator + :ivar negate_condition: Describes if this is negate condition or not. + :vartype negate_condition: bool + :ivar match_values: The match value for the condition of the delivery rule. + :vartype match_values: list[str or ~azure.mgmt.cdn.models.IsDeviceMatchValue] + :ivar transforms: List of transforms. + :vartype transforms: list[str or ~azure.mgmt.cdn.models.Transform] + :ivar type_name: Required. DELIVERY_RULE_IS_DEVICE_CONDITION_PARAMETERS. + :vartype type_name: str or ~azure.mgmt.cdn.models.DELIVERY_RULE_IS_DEVICE_CONDITION_PARAMETERS + """ + + operator: Union[str, "_models.IsDeviceOperator"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Describes operator to be matched. Required. \"Equal\"""" + negate_condition: Optional[bool] = rest_field( + name="negateCondition", visibility=["read", "create", "update", "delete", "query"] + ) + """Describes if this is negate condition or not.""" + match_values: Optional[list[Union[str, "_models.IsDeviceMatchValue"]]] = rest_field( + name="matchValues", visibility=["read", "create", "update", "delete", "query"] + ) + """The match value for the condition of the delivery rule.""" + transforms: Optional[list[Union[str, "_models.Transform"]]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """List of transforms.""" + type_name: Literal[DeliveryRuleConditionParametersType.DELIVERY_RULE_IS_DEVICE_CONDITION_PARAMETERS] = rest_discriminator(name="typeName", visibility=["read", "create", "update", "delete", "query"]) # type: ignore + """Required. DELIVERY_RULE_IS_DEVICE_CONDITION_PARAMETERS.""" + + @overload + def __init__( + self, + *, + operator: Union[str, "_models.IsDeviceOperator"], + negate_condition: Optional[bool] = None, + match_values: Optional[list[Union[str, "_models.IsDeviceMatchValue"]]] = None, + transforms: Optional[list[Union[str, "_models.Transform"]]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + self.type_name = DeliveryRuleConditionParametersType.DELIVERY_RULE_IS_DEVICE_CONDITION_PARAMETERS # type: ignore + + +class KeyVaultCertificateSourceParameters( + CertificateSourceParameters, discriminator="KeyVaultCertificateSourceParameters" +): + """Describes the parameters for using a user's KeyVault certificate for securing custom domain. + + :ivar subscription_id: Subscription Id of the user's Key Vault containing the SSL certificate. + Required. + :vartype subscription_id: str + :ivar resource_group_name: Resource group of the user's Key Vault containing the SSL + certificate. Required. + :vartype resource_group_name: str + :ivar vault_name: The name of the user's Key Vault containing the SSL certificate. Required. + :vartype vault_name: str + :ivar secret_name: The name of Key Vault Secret (representing the full certificate PFX) in Key + Vault. Required. + :vartype secret_name: str + :ivar secret_version: The version(GUID) of Key Vault Secret in Key Vault. + :vartype secret_version: str + :ivar update_rule: Describes the action that shall be taken when the certificate is updated in + Key Vault. Required. "NoAction" + :vartype update_rule: str or ~azure.mgmt.cdn.models.UpdateRule + :ivar delete_rule: Describes the action that shall be taken when the certificate is removed + from Key Vault. Required. "NoAction" + :vartype delete_rule: str or ~azure.mgmt.cdn.models.DeleteRule + :ivar type_name: Required. KEY_VAULT_CERTIFICATE_SOURCE_PARAMETERS. + :vartype type_name: str or ~azure.mgmt.cdn.models.KEY_VAULT_CERTIFICATE_SOURCE_PARAMETERS + """ + + subscription_id: str = rest_field(name="subscriptionId", visibility=["read", "create", "update", "delete", "query"]) + """Subscription Id of the user's Key Vault containing the SSL certificate. Required.""" + resource_group_name: str = rest_field( + name="resourceGroupName", visibility=["read", "create", "update", "delete", "query"] + ) + """Resource group of the user's Key Vault containing the SSL certificate. Required.""" + vault_name: str = rest_field(name="vaultName", visibility=["read", "create", "update", "delete", "query"]) + """The name of the user's Key Vault containing the SSL certificate. Required.""" + secret_name: str = rest_field(name="secretName", visibility=["read", "create", "update", "delete", "query"]) + """The name of Key Vault Secret (representing the full certificate PFX) in Key Vault. Required.""" + secret_version: Optional[str] = rest_field( + name="secretVersion", visibility=["read", "create", "update", "delete", "query"] + ) + """The version(GUID) of Key Vault Secret in Key Vault.""" + update_rule: Union[str, "_models.UpdateRule"] = rest_field( + name="updateRule", visibility=["read", "create", "update", "delete", "query"] + ) + """Describes the action that shall be taken when the certificate is updated in Key Vault. + Required. \"NoAction\"""" + delete_rule: Union[str, "_models.DeleteRule"] = rest_field( + name="deleteRule", visibility=["read", "create", "update", "delete", "query"] + ) + """Describes the action that shall be taken when the certificate is removed from Key Vault. + Required. \"NoAction\"""" + type_name: Literal[CertificateSourceParametersType.KEY_VAULT_CERTIFICATE_SOURCE_PARAMETERS] = rest_discriminator(name="typeName", visibility=["read", "create", "update", "delete", "query"]) # type: ignore + """Required. KEY_VAULT_CERTIFICATE_SOURCE_PARAMETERS.""" + + @overload + def __init__( + self, + *, + subscription_id: str, + resource_group_name: str, + vault_name: str, + secret_name: str, + update_rule: Union[str, "_models.UpdateRule"], + delete_rule: Union[str, "_models.DeleteRule"], + secret_version: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + self.type_name = CertificateSourceParametersType.KEY_VAULT_CERTIFICATE_SOURCE_PARAMETERS # type: ignore + + +class KeyVaultSigningKeyParameters(_Model): + """Describes the parameters for using a user's KeyVault for URL Signing Key. + + :ivar type_name: Required. "KeyVaultSigningKeyParameters" + :vartype type_name: str or ~azure.mgmt.cdn.models.KeyVaultSigningKeyParametersType + :ivar subscription_id: Subscription Id of the user's Key Vault containing the secret. Required. + :vartype subscription_id: str + :ivar resource_group_name: Resource group of the user's Key Vault containing the secret. + Required. + :vartype resource_group_name: str + :ivar vault_name: The name of the user's Key Vault containing the secret. Required. + :vartype vault_name: str + :ivar secret_name: The name of secret in Key Vault. Required. + :vartype secret_name: str + :ivar secret_version: The version(GUID) of secret in Key Vault. Required. + :vartype secret_version: str + """ + + type_name: Union[str, "_models.KeyVaultSigningKeyParametersType"] = rest_field( + name="typeName", visibility=["read", "create", "update", "delete", "query"] + ) + """Required. \"KeyVaultSigningKeyParameters\"""" + subscription_id: str = rest_field(name="subscriptionId", visibility=["read", "create", "update", "delete", "query"]) + """Subscription Id of the user's Key Vault containing the secret. Required.""" + resource_group_name: str = rest_field( + name="resourceGroupName", visibility=["read", "create", "update", "delete", "query"] + ) + """Resource group of the user's Key Vault containing the secret. Required.""" + vault_name: str = rest_field(name="vaultName", visibility=["read", "create", "update", "delete", "query"]) + """The name of the user's Key Vault containing the secret. Required.""" + secret_name: str = rest_field(name="secretName", visibility=["read", "create", "update", "delete", "query"]) + """The name of secret in Key Vault. Required.""" + secret_version: str = rest_field(name="secretVersion", visibility=["read", "create", "update", "delete", "query"]) + """The version(GUID) of secret in Key Vault. Required.""" + + @overload + def __init__( + self, + *, + type_name: Union[str, "_models.KeyVaultSigningKeyParametersType"], + subscription_id: str, + resource_group_name: str, + vault_name: str, + secret_name: str, + secret_version: str, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class LoadBalancingSettingsParameters(_Model): + """Round-Robin load balancing settings for a backend pool. + + :ivar sample_size: The number of samples to consider for load balancing decisions. + :vartype sample_size: int + :ivar successful_samples_required: The number of samples within the sample period that must + succeed. + :vartype successful_samples_required: int + :ivar additional_latency_in_milliseconds: The additional latency in milliseconds for probes to + fall into the lowest latency bucket. + :vartype additional_latency_in_milliseconds: int + """ + + sample_size: Optional[int] = rest_field( + name="sampleSize", visibility=["read", "create", "update", "delete", "query"] + ) + """The number of samples to consider for load balancing decisions.""" + successful_samples_required: Optional[int] = rest_field( + name="successfulSamplesRequired", visibility=["read", "create", "update", "delete", "query"] + ) + """The number of samples within the sample period that must succeed.""" + additional_latency_in_milliseconds: Optional[int] = rest_field( + name="additionalLatencyInMilliseconds", visibility=["read", "create", "update", "delete", "query"] + ) + """The additional latency in milliseconds for probes to fall into the lowest latency bucket.""" + + @overload + def __init__( + self, + *, + sample_size: Optional[int] = None, + successful_samples_required: Optional[int] = None, + additional_latency_in_milliseconds: Optional[int] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class LoadParameters(_Model): + """Parameters required for content load. + + :ivar content_paths: The path to the content to be loaded. Path should be a relative file URL + of the origin. Required. + :vartype content_paths: list[str] + """ + + content_paths: list[str] = rest_field( + name="contentPaths", visibility=["read", "create", "update", "delete", "query"] + ) + """The path to the content to be loaded. Path should be a relative file URL of the origin. + Required.""" + + @overload + def __init__( + self, + *, + content_paths: list[str], + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class LogSpecification(_Model): + """Log specification of operation. + + :ivar name: Name of log specification. + :vartype name: str + :ivar display_name: Display name of log specification. + :vartype display_name: str + :ivar blob_duration: Blob duration of specification. + :vartype blob_duration: str + :ivar log_filter_pattern: Pattern to filter based on name. + :vartype log_filter_pattern: str + """ + + name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Name of log specification.""" + display_name: Optional[str] = rest_field( + name="displayName", visibility=["read", "create", "update", "delete", "query"] + ) + """Display name of log specification.""" + blob_duration: Optional[str] = rest_field( + name="blobDuration", visibility=["read", "create", "update", "delete", "query"] + ) + """Blob duration of specification.""" + log_filter_pattern: Optional[str] = rest_field( + name="logFilterPattern", visibility=["read", "create", "update", "delete", "query"] + ) + """Pattern to filter based on name.""" + + @overload + def __init__( + self, + *, + name: Optional[str] = None, + display_name: Optional[str] = None, + blob_duration: Optional[str] = None, + log_filter_pattern: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ManagedCertificateParameters(SecretParameters, discriminator="ManagedCertificate"): + """Managed Certificate used for https. + + :ivar subject: Subject name in the certificate. + :vartype subject: str + :ivar expiration_date: Certificate expiration date. + :vartype expiration_date: str + :ivar type: The type of the secret resource. Required. MANAGED_CERTIFICATE. + :vartype type: str or ~azure.mgmt.cdn.models.MANAGED_CERTIFICATE + """ + + subject: Optional[str] = rest_field(visibility=["read"]) + """Subject name in the certificate.""" + expiration_date: Optional[str] = rest_field(name="expirationDate", visibility=["read"]) + """Certificate expiration date.""" + type: Literal[SecretType.MANAGED_CERTIFICATE] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"]) # type: ignore + """The type of the secret resource. Required. MANAGED_CERTIFICATE.""" + + @overload + def __init__( + self, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + self.type = SecretType.MANAGED_CERTIFICATE # type: ignore + + +class ManagedRuleDefinition(_Model): + """Describes a managed rule definition. + + :ivar rule_id: Identifier for the managed rule. + :vartype rule_id: str + :ivar description: Describes the functionality of the managed rule. + :vartype description: str + """ + + rule_id: Optional[str] = rest_field(name="ruleId", visibility=["read"]) + """Identifier for the managed rule.""" + description: Optional[str] = rest_field(visibility=["read"]) + """Describes the functionality of the managed rule.""" + + +class ManagedRuleGroupDefinition(_Model): + """Describes a managed rule group. + + :ivar rule_group_name: Name of the managed rule group. + :vartype rule_group_name: str + :ivar description: Description of the managed rule group. + :vartype description: str + :ivar rules: List of rules within the managed rule group. + :vartype rules: list[~azure.mgmt.cdn.models.ManagedRuleDefinition] + """ + + rule_group_name: Optional[str] = rest_field(name="ruleGroupName", visibility=["read"]) + """Name of the managed rule group.""" + description: Optional[str] = rest_field(visibility=["read"]) + """Description of the managed rule group.""" + rules: Optional[list["_models.ManagedRuleDefinition"]] = rest_field(visibility=["read"]) + """List of rules within the managed rule group.""" + + +class ManagedRuleGroupOverride(_Model): + """Defines a managed rule group override setting. + + :ivar rule_group_name: Describes the managed rule group within the rule set to override. + Required. + :vartype rule_group_name: str + :ivar rules: List of rules that will be enabled. If none specified, all rules in the group will + be disabled. + :vartype rules: list[~azure.mgmt.cdn.models.ManagedRuleOverride] + """ + + rule_group_name: str = rest_field(name="ruleGroupName", visibility=["read", "create", "update", "delete", "query"]) + """Describes the managed rule group within the rule set to override. Required.""" + rules: Optional[list["_models.ManagedRuleOverride"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """List of rules that will be enabled. If none specified, all rules in the group will be disabled.""" + + @overload + def __init__( + self, + *, + rule_group_name: str, + rules: Optional[list["_models.ManagedRuleOverride"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ManagedRuleOverride(_Model): + """Defines a managed rule group override setting. + + :ivar rule_id: Identifier for the managed rule. Required. + :vartype rule_id: str + :ivar enabled_state: Describes if the managed rule is in enabled or disabled state. Defaults to + Disabled if not specified. Known values are: "Disabled" and "Enabled". + :vartype enabled_state: str or ~azure.mgmt.cdn.models.ManagedRuleEnabledState + :ivar action: Describes the override action to be applied when rule matches. Known values are: + "Allow", "Block", "Log", and "Redirect". + :vartype action: str or ~azure.mgmt.cdn.models.ActionType + """ + + rule_id: str = rest_field(name="ruleId", visibility=["read", "create", "update", "delete", "query"]) + """Identifier for the managed rule. Required.""" + enabled_state: Optional[Union[str, "_models.ManagedRuleEnabledState"]] = rest_field( + name="enabledState", visibility=["read", "create", "update", "delete", "query"] + ) + """Describes if the managed rule is in enabled or disabled state. Defaults to Disabled if not + specified. Known values are: \"Disabled\" and \"Enabled\".""" + action: Optional[Union[str, "_models.ActionType"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Describes the override action to be applied when rule matches. Known values are: \"Allow\", + \"Block\", \"Log\", and \"Redirect\".""" + + @overload + def __init__( + self, + *, + rule_id: str, + enabled_state: Optional[Union[str, "_models.ManagedRuleEnabledState"]] = None, + action: Optional[Union[str, "_models.ActionType"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ManagedRuleSet(_Model): + """Defines a managed rule set. + + :ivar rule_set_type: Defines the rule set type to use. Required. + :vartype rule_set_type: str + :ivar rule_set_version: Defines the version of the rule set to use. Required. + :vartype rule_set_version: str + :ivar anomaly_score: Verizon only : If the rule set supports anomaly detection mode, this + describes the threshold for blocking requests. + :vartype anomaly_score: int + :ivar rule_group_overrides: Defines the rule overrides to apply to the rule set. + :vartype rule_group_overrides: list[~azure.mgmt.cdn.models.ManagedRuleGroupOverride] + """ + + rule_set_type: str = rest_field(name="ruleSetType", visibility=["read", "create", "update", "delete", "query"]) + """Defines the rule set type to use. Required.""" + rule_set_version: str = rest_field( + name="ruleSetVersion", visibility=["read", "create", "update", "delete", "query"] + ) + """Defines the version of the rule set to use. Required.""" + anomaly_score: Optional[int] = rest_field( + name="anomalyScore", visibility=["read", "create", "update", "delete", "query"] + ) + """Verizon only : If the rule set supports anomaly detection mode, this describes the threshold + for blocking requests.""" + rule_group_overrides: Optional[list["_models.ManagedRuleGroupOverride"]] = rest_field( + name="ruleGroupOverrides", visibility=["read", "create", "update", "delete", "query"] + ) + """Defines the rule overrides to apply to the rule set.""" + + @overload + def __init__( + self, + *, + rule_set_type: str, + rule_set_version: str, + anomaly_score: Optional[int] = None, + rule_group_overrides: Optional[list["_models.ManagedRuleGroupOverride"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ManagedRuleSetDefinition(Resource): + """Describes a managed rule set definition. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.cdn.models.SystemData + :ivar properties: Describes managed rule set definition properties. + :vartype properties: ~azure.mgmt.cdn.models.ManagedRuleSetDefinitionProperties + :ivar sku: The pricing tier (defines a CDN provider, feature list and rate) of the + CdnWebApplicationFirewallPolicy. + :vartype sku: ~azure.mgmt.cdn.models.Sku + """ + + properties: Optional["_models.ManagedRuleSetDefinitionProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Describes managed rule set definition properties.""" + sku: Optional["_models.Sku"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The pricing tier (defines a CDN provider, feature list and rate) of the + CdnWebApplicationFirewallPolicy.""" + + __flattened_items = ["provisioning_state", "rule_set_type", "rule_set_version", "rule_groups"] + + @overload + def __init__( + self, + *, + properties: Optional["_models.ManagedRuleSetDefinitionProperties"] = None, + sku: Optional["_models.Sku"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class ManagedRuleSetDefinitionProperties(_Model): + """Properties for a managed rule set definition. + + :ivar provisioning_state: Provisioning state of the managed rule set. + :vartype provisioning_state: str + :ivar rule_set_type: Type of the managed rule set. + :vartype rule_set_type: str + :ivar rule_set_version: Version of the managed rule set type. + :vartype rule_set_version: str + :ivar rule_groups: Rule groups of the managed rule set. + :vartype rule_groups: list[~azure.mgmt.cdn.models.ManagedRuleGroupDefinition] + """ + + provisioning_state: Optional[str] = rest_field(name="provisioningState", visibility=["read"]) + """Provisioning state of the managed rule set.""" + rule_set_type: Optional[str] = rest_field(name="ruleSetType", visibility=["read"]) + """Type of the managed rule set.""" + rule_set_version: Optional[str] = rest_field(name="ruleSetVersion", visibility=["read"]) + """Version of the managed rule set type.""" + rule_groups: Optional[list["_models.ManagedRuleGroupDefinition"]] = rest_field( + name="ruleGroups", visibility=["read"] + ) + """Rule groups of the managed rule set.""" + + +class ManagedRuleSetList(_Model): + """Defines the list of managed rule sets for the policy. + + :ivar managed_rule_sets: List of rule sets. + :vartype managed_rule_sets: list[~azure.mgmt.cdn.models.ManagedRuleSet] + """ + + managed_rule_sets: Optional[list["_models.ManagedRuleSet"]] = rest_field( + name="managedRuleSets", visibility=["read", "create", "update", "delete", "query"] + ) + """List of rule sets.""" + + @overload + def __init__( + self, + *, + managed_rule_sets: Optional[list["_models.ManagedRuleSet"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ManagedServiceIdentity(_Model): + """Managed service identity (system assigned and/or user assigned identities). + + :ivar principal_id: The service principal ID of the system assigned identity. This property + will only be provided for a system assigned identity. + :vartype principal_id: str + :ivar tenant_id: The tenant ID of the system assigned identity. This property will only be + provided for a system assigned identity. + :vartype tenant_id: str + :ivar type: The type of managed identity assigned to this resource. Required. Known values are: + "None", "SystemAssigned", "UserAssigned", and "SystemAssigned,UserAssigned". + :vartype type: str or ~azure.mgmt.cdn.models.ManagedServiceIdentityType + :ivar user_assigned_identities: The identities assigned to this resource by the user. + :vartype user_assigned_identities: dict[str, ~azure.mgmt.cdn.models.UserAssignedIdentity] + """ + + principal_id: Optional[str] = rest_field(name="principalId", visibility=["read"]) + """The service principal ID of the system assigned identity. This property will only be provided + for a system assigned identity.""" + tenant_id: Optional[str] = rest_field(name="tenantId", visibility=["read"]) + """The tenant ID of the system assigned identity. This property will only be provided for a system + assigned identity.""" + type: Union[str, "_models.ManagedServiceIdentityType"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The type of managed identity assigned to this resource. Required. Known values are: \"None\", + \"SystemAssigned\", \"UserAssigned\", and \"SystemAssigned,UserAssigned\".""" + user_assigned_identities: Optional[dict[str, "_models.UserAssignedIdentity"]] = rest_field( + name="userAssignedIdentities", visibility=["read", "create", "update", "delete", "query"] + ) + """The identities assigned to this resource by the user.""" + + @overload + def __init__( + self, + *, + type: Union[str, "_models.ManagedServiceIdentityType"], + user_assigned_identities: Optional[dict[str, "_models.UserAssignedIdentity"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class MatchCondition(_Model): + """Define match conditions. + + :ivar match_variable: Match variable to compare against. Required. Known values are: + "RemoteAddr", "SocketAddr", "RequestMethod", "RequestHeader", "RequestUri", "QueryString", + "RequestBody", "Cookies", and "PostArgs". + :vartype match_variable: str or ~azure.mgmt.cdn.models.WafMatchVariable + :ivar selector: Selector can used to match a specific key for QueryString, Cookies, + RequestHeader or PostArgs. + :vartype selector: str + :ivar operator: Describes operator to be matched. Required. Known values are: "Any", "IPMatch", + "GeoMatch", "Equal", "Contains", "LessThan", "GreaterThan", "LessThanOrEqual", + "GreaterThanOrEqual", "BeginsWith", "EndsWith", and "RegEx". + :vartype operator: str or ~azure.mgmt.cdn.models.Operator + :ivar negate_condition: Describes if the result of this condition should be negated. + :vartype negate_condition: bool + :ivar match_value: List of possible match values. Required. + :vartype match_value: list[str] + :ivar transforms: List of transforms. + :vartype transforms: list[str or ~azure.mgmt.cdn.models.TransformType] + """ + + match_variable: Union[str, "_models.WafMatchVariable"] = rest_field( + name="matchVariable", visibility=["read", "create", "update", "delete", "query"] + ) + """Match variable to compare against. Required. Known values are: \"RemoteAddr\", \"SocketAddr\", + \"RequestMethod\", \"RequestHeader\", \"RequestUri\", \"QueryString\", \"RequestBody\", + \"Cookies\", and \"PostArgs\".""" + selector: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Selector can used to match a specific key for QueryString, Cookies, RequestHeader or PostArgs.""" + operator: Union[str, "_models.Operator"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Describes operator to be matched. Required. Known values are: \"Any\", \"IPMatch\", + \"GeoMatch\", \"Equal\", \"Contains\", \"LessThan\", \"GreaterThan\", \"LessThanOrEqual\", + \"GreaterThanOrEqual\", \"BeginsWith\", \"EndsWith\", and \"RegEx\".""" + negate_condition: Optional[bool] = rest_field( + name="negateCondition", visibility=["read", "create", "update", "delete", "query"] + ) + """Describes if the result of this condition should be negated.""" + match_value: list[str] = rest_field(name="matchValue", visibility=["read", "create", "update", "delete", "query"]) + """List of possible match values. Required.""" + transforms: Optional[list[Union[str, "_models.TransformType"]]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """List of transforms.""" + + @overload + def __init__( + self, + *, + match_variable: Union[str, "_models.WafMatchVariable"], + operator: Union[str, "_models.Operator"], + match_value: list[str], + selector: Optional[str] = None, + negate_condition: Optional[bool] = None, + transforms: Optional[list[Union[str, "_models.TransformType"]]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class MetricAvailability(_Model): + """Retention policy of a resource metric. + + :ivar time_grain: + :vartype time_grain: str + :ivar blob_duration: + :vartype blob_duration: str + """ + + time_grain: Optional[str] = rest_field(name="timeGrain", visibility=["read", "create", "update", "delete", "query"]) + blob_duration: Optional[str] = rest_field( + name="blobDuration", visibility=["read", "create", "update", "delete", "query"] + ) + + @overload + def __init__( + self, + *, + time_grain: Optional[str] = None, + blob_duration: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class MetricSpecification(_Model): + """Metric specification of operation. + + :ivar name: Name of metric specification. + :vartype name: str + :ivar display_name: Display name of metric specification. + :vartype display_name: str + :ivar display_description: Display description of metric specification. + :vartype display_description: str + :ivar unit: The metric unit. Possible values include: 'Bytes', 'Count', 'Milliseconds'. + :vartype unit: str + :ivar aggregation_type: The metric aggregation type. Possible values include: 'Average', + 'Count', 'Total'. + :vartype aggregation_type: str + :ivar availabilities: Retention policies of a resource metric. + :vartype availabilities: list[~azure.mgmt.cdn.models.MetricAvailability] + :ivar supported_time_grain_types: The supported time grain types for the metrics. + :vartype supported_time_grain_types: list[str] + :ivar dimensions: The dimensions of metric. + :vartype dimensions: list[~azure.mgmt.cdn.models.DimensionProperties] + :ivar fill_gap_with_zero: Property to specify whether to fill gap with zero. + :vartype fill_gap_with_zero: bool + :ivar metric_filter_pattern: Pattern to filter based on name. + :vartype metric_filter_pattern: str + :ivar is_internal: Property to specify metric is internal or not. + :vartype is_internal: bool + """ + + name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Name of metric specification.""" + display_name: Optional[str] = rest_field( + name="displayName", visibility=["read", "create", "update", "delete", "query"] + ) + """Display name of metric specification.""" + display_description: Optional[str] = rest_field( + name="displayDescription", visibility=["read", "create", "update", "delete", "query"] + ) + """Display description of metric specification.""" + unit: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The metric unit. Possible values include: 'Bytes', 'Count', 'Milliseconds'.""" + aggregation_type: Optional[str] = rest_field( + name="aggregationType", visibility=["read", "create", "update", "delete", "query"] + ) + """The metric aggregation type. Possible values include: 'Average', 'Count', 'Total'.""" + availabilities: Optional[list["_models.MetricAvailability"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Retention policies of a resource metric.""" + supported_time_grain_types: Optional[list[str]] = rest_field( + name="supportedTimeGrainTypes", visibility=["read", "create", "update", "delete", "query"] + ) + """The supported time grain types for the metrics.""" + dimensions: Optional[list["_models.DimensionProperties"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The dimensions of metric.""" + fill_gap_with_zero: Optional[bool] = rest_field( + name="fillGapWithZero", visibility=["read", "create", "update", "delete", "query"] + ) + """Property to specify whether to fill gap with zero.""" + metric_filter_pattern: Optional[str] = rest_field( + name="metricFilterPattern", visibility=["read", "create", "update", "delete", "query"] + ) + """Pattern to filter based on name.""" + is_internal: Optional[bool] = rest_field( + name="isInternal", visibility=["read", "create", "update", "delete", "query"] + ) + """Property to specify metric is internal or not.""" + + @overload + def __init__( + self, + *, + name: Optional[str] = None, + display_name: Optional[str] = None, + display_description: Optional[str] = None, + unit: Optional[str] = None, + aggregation_type: Optional[str] = None, + availabilities: Optional[list["_models.MetricAvailability"]] = None, + supported_time_grain_types: Optional[list[str]] = None, + dimensions: Optional[list["_models.DimensionProperties"]] = None, + fill_gap_with_zero: Optional[bool] = None, + metric_filter_pattern: Optional[str] = None, + is_internal: Optional[bool] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class MetricsResponse(_Model): + """Metrics Response. + + :ivar date_time_begin: + :vartype date_time_begin: ~datetime.datetime + :ivar date_time_end: + :vartype date_time_end: ~datetime.datetime + :ivar granularity: Known values are: "PT5M", "PT1H", and "P1D". + :vartype granularity: str or ~azure.mgmt.cdn.models.MetricsGranularity + :ivar series: + :vartype series: list[~azure.mgmt.cdn.models.MetricsResponseSeriesItem] + """ + + date_time_begin: Optional[datetime.datetime] = rest_field( + name="dateTimeBegin", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + date_time_end: Optional[datetime.datetime] = rest_field( + name="dateTimeEnd", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + granularity: Optional[Union[str, "_models.MetricsGranularity"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Known values are: \"PT5M\", \"PT1H\", and \"P1D\".""" + series: Optional[list["_models.MetricsResponseSeriesItem"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + + @overload + def __init__( + self, + *, + date_time_begin: Optional[datetime.datetime] = None, + date_time_end: Optional[datetime.datetime] = None, + granularity: Optional[Union[str, "_models.MetricsGranularity"]] = None, + series: Optional[list["_models.MetricsResponseSeriesItem"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class MetricsResponseSeriesItem(_Model): + """MetricsResponseSeriesItem. + + :ivar metric: + :vartype metric: str + :ivar unit: Known values are: "count", "bytes", "bitsPerSecond", and "milliSeconds". + :vartype unit: str or ~azure.mgmt.cdn.models.MetricsSeriesUnit + :ivar groups: + :vartype groups: list[~azure.mgmt.cdn.models.MetricsResponseSeriesPropertiesItemsItem] + :ivar data: + :vartype data: + list[~azure.mgmt.cdn.models.Components1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsPropertiesDataItems] + """ + + metric: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + unit: Optional[Union[str, "_models.MetricsSeriesUnit"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Known values are: \"count\", \"bytes\", \"bitsPerSecond\", and \"milliSeconds\".""" + groups: Optional[list["_models.MetricsResponseSeriesPropertiesItemsItem"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + data: Optional[list["_models.Components1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsPropertiesDataItems"]] = ( + rest_field(visibility=["read", "create", "update", "delete", "query"]) + ) + + @overload + def __init__( + self, + *, + metric: Optional[str] = None, + unit: Optional[Union[str, "_models.MetricsSeriesUnit"]] = None, + groups: Optional[list["_models.MetricsResponseSeriesPropertiesItemsItem"]] = None, + data: Optional[ + list["_models.Components1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsPropertiesDataItems"] + ] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class MetricsResponseSeriesPropertiesItemsItem(_Model): + """MetricsResponseSeriesPropertiesItemsItem. + + :ivar name: + :vartype name: str + :ivar value: + :vartype value: str + """ + + name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + value: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + + @overload + def __init__( + self, + *, + name: Optional[str] = None, + value: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class MigrateResult(_Model): + """Result for migrate operation. + + :ivar id: Resource ID. + :vartype id: str + :ivar type: Resource type. + :vartype type: str + :ivar properties: + :vartype properties: ~azure.mgmt.cdn.models.MigrateResultProperties + """ + + id: Optional[str] = rest_field(visibility=["read"]) + """Resource ID.""" + type: Optional[str] = rest_field(visibility=["read"]) + """Resource type.""" + properties: Optional["_models.MigrateResultProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + + __flattened_items = ["migrated_profile_resource_id"] + + @overload + def __init__( + self, + *, + properties: Optional["_models.MigrateResultProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class MigrateResultProperties(_Model): + """MigrateResultProperties. + + :ivar migrated_profile_resource_id: Arm resource id of the migrated profile. + :vartype migrated_profile_resource_id: ~azure.mgmt.cdn.models.ResourceReference + """ + + migrated_profile_resource_id: Optional["_models.ResourceReference"] = rest_field( + name="migratedProfileResourceId", visibility=["read"] + ) + """Arm resource id of the migrated profile.""" + + +class MigrationEndpointMapping(_Model): + """CDN Endpoint Mapping. + + :ivar migrated_from: Name of the classic CDN profile endpoint. + :vartype migrated_from: str + :ivar migrated_to: Name of the newly created migrated Azure Frontdoor Standard/Premium profile + endpoint. This name will replace the name of the classic CDN endpoint resource. + :vartype migrated_to: str + """ + + migrated_from: Optional[str] = rest_field( + name="migratedFrom", visibility=["read", "create", "update", "delete", "query"] + ) + """Name of the classic CDN profile endpoint.""" + migrated_to: Optional[str] = rest_field( + name="migratedTo", visibility=["read", "create", "update", "delete", "query"] + ) + """Name of the newly created migrated Azure Frontdoor Standard/Premium profile endpoint. This name + will replace the name of the classic CDN endpoint resource.""" + + @overload + def __init__( + self, + *, + migrated_from: Optional[str] = None, + migrated_to: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class MigrationErrorType(_Model): + """Error response indicates CDN service is not able to process the incoming request. The reason is + provided in the error message. + + :ivar code: Error code. + :vartype code: str + :ivar resource_name: Resource which has the problem. + :vartype resource_name: str + :ivar error_message: Error message indicating why the operation failed. + :vartype error_message: str + :ivar next_steps: Describes what needs to be done to fix the problem. + :vartype next_steps: str + """ + + code: Optional[str] = rest_field(visibility=["read"]) + """Error code.""" + resource_name: Optional[str] = rest_field(name="resourceName", visibility=["read"]) + """Resource which has the problem.""" + error_message: Optional[str] = rest_field(name="errorMessage", visibility=["read"]) + """Error message indicating why the operation failed.""" + next_steps: Optional[str] = rest_field(name="nextSteps", visibility=["read"]) + """Describes what needs to be done to fix the problem.""" + + +class MigrationParameters(_Model): + """Request body for Migrate operation. + + :ivar sku: Sku for the migration. Required. + :vartype sku: ~azure.mgmt.cdn.models.Sku + :ivar classic_resource_reference: Resource reference of the classic cdn profile or classic + frontdoor that need to be migrated. Required. + :vartype classic_resource_reference: ~azure.mgmt.cdn.models.ResourceReference + :ivar profile_name: Name of the new profile that need to be created. Required. + :vartype profile_name: str + :ivar migration_web_application_firewall_mappings: Waf mapping for the migrated profile. + :vartype migration_web_application_firewall_mappings: + list[~azure.mgmt.cdn.models.MigrationWebApplicationFirewallMapping] + """ + + sku: "_models.Sku" = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Sku for the migration. Required.""" + classic_resource_reference: "_models.ResourceReference" = rest_field( + name="classicResourceReference", visibility=["read", "create", "update", "delete", "query"] + ) + """Resource reference of the classic cdn profile or classic frontdoor that need to be migrated. + Required.""" + profile_name: str = rest_field(name="profileName", visibility=["read", "create", "update", "delete", "query"]) + """Name of the new profile that need to be created. Required.""" + migration_web_application_firewall_mappings: Optional[list["_models.MigrationWebApplicationFirewallMapping"]] = ( + rest_field( + name="migrationWebApplicationFirewallMappings", visibility=["read", "create", "update", "delete", "query"] + ) + ) + """Waf mapping for the migrated profile.""" + + @overload + def __init__( + self, + *, + sku: "_models.Sku", + classic_resource_reference: "_models.ResourceReference", + profile_name: str, + migration_web_application_firewall_mappings: Optional[ + list["_models.MigrationWebApplicationFirewallMapping"] + ] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class MigrationWebApplicationFirewallMapping(_Model): + """Web Application Firewall Mapping. + + :ivar migrated_from: Migration From Waf policy. + :vartype migrated_from: ~azure.mgmt.cdn.models.ResourceReference + :ivar migrated_to: Migration to Waf policy. + :vartype migrated_to: ~azure.mgmt.cdn.models.ResourceReference + """ + + migrated_from: Optional["_models.ResourceReference"] = rest_field( + name="migratedFrom", visibility=["read", "create", "update", "delete", "query"] + ) + """Migration From Waf policy.""" + migrated_to: Optional["_models.ResourceReference"] = rest_field( + name="migratedTo", visibility=["read", "create", "update", "delete", "query"] + ) + """Migration to Waf policy.""" + + @overload + def __init__( + self, + *, + migrated_from: Optional["_models.ResourceReference"] = None, + migrated_to: Optional["_models.ResourceReference"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class Operation(_Model): + """CDN REST API operation. + + :ivar name: Operation name: {provider}/{resource}/{operation}. + :vartype name: str + :ivar is_data_action: Indicates whether the operation is a data action. + :vartype is_data_action: bool + :ivar display: The object that represents the operation. + :vartype display: ~azure.mgmt.cdn.models.OperationDisplay + :ivar origin: The origin of operations. + :vartype origin: str + :ivar operation_properties: Properties of operation, include metric specifications. + :vartype operation_properties: ~azure.mgmt.cdn.models.OperationProperties + """ + + name: Optional[str] = rest_field(visibility=["read"]) + """Operation name: {provider}/{resource}/{operation}.""" + is_data_action: Optional[bool] = rest_field( + name="isDataAction", visibility=["read", "create", "update", "delete", "query"] + ) + """Indicates whether the operation is a data action.""" + display: Optional["_models.OperationDisplay"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The object that represents the operation.""" + origin: Optional[str] = rest_field(visibility=["read"]) + """The origin of operations.""" + operation_properties: Optional["_models.OperationProperties"] = rest_field( + name="properties", visibility=["read", "create", "update", "delete", "query"] + ) + """Properties of operation, include metric specifications.""" + + __flattened_items = ["service_specification"] + + @overload + def __init__( + self, + *, + is_data_action: Optional[bool] = None, + display: Optional["_models.OperationDisplay"] = None, + operation_properties: Optional["_models.OperationProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.operation_properties is None: + return None + return getattr(self.operation_properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.operation_properties is None: + self.operation_properties = self._attr_to_rest_field["operation_properties"]._class_type() + setattr(self.operation_properties, key, value) + else: + super().__setattr__(key, value) + + +class OperationDisplay(_Model): + """The object that represents the operation. + + :ivar provider: Service provider: Microsoft.Cdn. + :vartype provider: str + :ivar resource: Resource on which the operation is performed: Profile, endpoint, etc. + :vartype resource: str + :ivar operation: Operation type: Read, write, delete, etc. + :vartype operation: str + :ivar description: Description of operation. + :vartype description: str + """ + + provider: Optional[str] = rest_field(visibility=["read"]) + """Service provider: Microsoft.Cdn.""" + resource: Optional[str] = rest_field(visibility=["read"]) + """Resource on which the operation is performed: Profile, endpoint, etc.""" + operation: Optional[str] = rest_field(visibility=["read"]) + """Operation type: Read, write, delete, etc.""" + description: Optional[str] = rest_field(visibility=["read"]) + """Description of operation.""" + + +class OperationProperties(_Model): + """Properties of operation, include metric specifications. + + :ivar service_specification: One property of operation, include metric specifications. + :vartype service_specification: ~azure.mgmt.cdn.models.ServiceSpecification + """ + + service_specification: Optional["_models.ServiceSpecification"] = rest_field( + name="serviceSpecification", visibility=["read", "create", "update", "delete", "query"] + ) + """One property of operation, include metric specifications.""" + + @overload + def __init__( + self, + *, + service_specification: Optional["_models.ServiceSpecification"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class Origin(ProxyResource): + """CDN origin is the source of the content being delivered via CDN. When the edge nodes + represented by an endpoint do not have the requested content cached, they attempt to fetch it + from one or more of the configured origins. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.cdn.models.SystemData + :ivar properties: The JSON object that contains the properties of the origin. + :vartype properties: ~azure.mgmt.cdn.models.OriginProperties + """ + + properties: Optional["_models.OriginProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The JSON object that contains the properties of the origin.""" + + __flattened_items = [ + "http_port", + "https_port", + "origin_host_header", + "priority", + "weight", + "enabled", + "private_link_alias", + "private_link_resource_id", + "private_link_location", + "private_link_approval_message", + "resource_state", + "provisioning_state", + "private_endpoint_status", + "host_name", + ] + + @overload + def __init__( + self, + *, + properties: Optional["_models.OriginProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class OriginAuthenticationProperties(_Model): + """The JSON object that contains the properties of the origin authentication settings. + + :ivar type: The type of the authentication for the origin. Known values are: + "SystemAssignedIdentity" and "UserAssignedIdentity". + :vartype type: str or ~azure.mgmt.cdn.models.OriginAuthenticationType + :ivar user_assigned_identity: The user assigned managed identity to use for the origin + authentication if type is UserAssignedIdentity. + :vartype user_assigned_identity: ~azure.mgmt.cdn.models.ResourceReference + :ivar scope: The scope used when requesting token from Microsoft Entra. For example, for Azure + Blob Storage, scope could be "`https://storage.azure.com/.default + `_". + :vartype scope: str + """ + + type: Optional[Union[str, "_models.OriginAuthenticationType"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The type of the authentication for the origin. Known values are: \"SystemAssignedIdentity\" and + \"UserAssignedIdentity\".""" + user_assigned_identity: Optional["_models.ResourceReference"] = rest_field( + name="userAssignedIdentity", visibility=["read", "create", "update", "delete", "query"] + ) + """The user assigned managed identity to use for the origin authentication if type is + UserAssignedIdentity.""" + scope: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The scope used when requesting token from Microsoft Entra. For example, for Azure Blob Storage, + scope could be \"`https://storage.azure.com/.default `_\".""" + + @overload + def __init__( + self, + *, + type: Optional[Union[str, "_models.OriginAuthenticationType"]] = None, + user_assigned_identity: Optional["_models.ResourceReference"] = None, + scope: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class OriginGroup(ProxyResource): + """Origin group comprising of origins is used for load balancing to origins when the content + cannot be served from CDN. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.cdn.models.SystemData + :ivar properties: The JSON object that contains the properties of the origin group. + :vartype properties: ~azure.mgmt.cdn.models.OriginGroupProperties + """ + + properties: Optional["_models.OriginGroupProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The JSON object that contains the properties of the origin group.""" + + __flattened_items = [ + "health_probe_settings", + "origins", + "traffic_restoration_time_to_healed_or_new_endpoints_in_minutes", + "response_based_origin_error_detection_settings", + "resource_state", + "provisioning_state", + ] + + @overload + def __init__( + self, + *, + properties: Optional["_models.OriginGroupProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class OriginGroupOverride(_Model): + """Defines the parameters for the origin group override configuration. + + :ivar origin_group: defines the OriginGroup that would override the DefaultOriginGroup on + route. + :vartype origin_group: ~azure.mgmt.cdn.models.ResourceReference + :ivar forwarding_protocol: Protocol this rule will use when forwarding traffic to backends. + Known values are: "HttpOnly", "HttpsOnly", and "MatchRequest". + :vartype forwarding_protocol: str or ~azure.mgmt.cdn.models.ForwardingProtocol + """ + + origin_group: Optional["_models.ResourceReference"] = rest_field( + name="originGroup", visibility=["read", "create", "update", "delete", "query"] + ) + """defines the OriginGroup that would override the DefaultOriginGroup on route.""" + forwarding_protocol: Optional[Union[str, "_models.ForwardingProtocol"]] = rest_field( + name="forwardingProtocol", visibility=["read", "create", "update", "delete", "query"] + ) + """Protocol this rule will use when forwarding traffic to backends. Known values are: + \"HttpOnly\", \"HttpsOnly\", and \"MatchRequest\".""" + + @overload + def __init__( + self, + *, + origin_group: Optional["_models.ResourceReference"] = None, + forwarding_protocol: Optional[Union[str, "_models.ForwardingProtocol"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class OriginGroupOverrideAction(DeliveryRuleAction, discriminator="OriginGroupOverride"): + """Defines the origin group override action for the delivery rule. + + :ivar parameters: Defines the parameters for the action. Required. + :vartype parameters: ~azure.mgmt.cdn.models.OriginGroupOverrideActionParameters + :ivar name: The name of the action for the delivery rule. Required. ORIGIN_GROUP_OVERRIDE. + :vartype name: str or ~azure.mgmt.cdn.models.ORIGIN_GROUP_OVERRIDE + """ + + parameters: "_models.OriginGroupOverrideActionParameters" = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Defines the parameters for the action. Required.""" + name: Literal[DeliveryRuleActionName.ORIGIN_GROUP_OVERRIDE] = rest_discriminator(name="name", visibility=["read", "create", "update", "delete", "query"]) # type: ignore + """The name of the action for the delivery rule. Required. ORIGIN_GROUP_OVERRIDE.""" + + @overload + def __init__( + self, + *, + parameters: "_models.OriginGroupOverrideActionParameters", + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + self.name = DeliveryRuleActionName.ORIGIN_GROUP_OVERRIDE # type: ignore + + +class OriginGroupOverrideActionParameters( + DeliveryRuleActionParameters, discriminator="DeliveryRuleOriginGroupOverrideActionParameters" +): + """Defines the parameters for the origin group override action. + + :ivar origin_group: defines the OriginGroup that would override the DefaultOriginGroup. + Required. + :vartype origin_group: ~azure.mgmt.cdn.models.ResourceReference + :ivar type_name: Required. DELIVERY_RULE_ORIGIN_GROUP_OVERRIDE_ACTION_PARAMETERS. + :vartype type_name: str or + ~azure.mgmt.cdn.models.DELIVERY_RULE_ORIGIN_GROUP_OVERRIDE_ACTION_PARAMETERS + """ + + origin_group: "_models.ResourceReference" = rest_field( + name="originGroup", visibility=["read", "create", "update", "delete", "query"] + ) + """defines the OriginGroup that would override the DefaultOriginGroup. Required.""" + type_name: Literal[DeliveryRuleActionParametersType.DELIVERY_RULE_ORIGIN_GROUP_OVERRIDE_ACTION_PARAMETERS] = rest_discriminator(name="typeName", visibility=["read", "create", "update", "delete", "query"]) # type: ignore + """Required. DELIVERY_RULE_ORIGIN_GROUP_OVERRIDE_ACTION_PARAMETERS.""" + + @overload + def __init__( + self, + *, + origin_group: "_models.ResourceReference", + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + self.type_name = DeliveryRuleActionParametersType.DELIVERY_RULE_ORIGIN_GROUP_OVERRIDE_ACTION_PARAMETERS # type: ignore + + +class OriginGroupUpdatePropertiesParameters(_Model): + """The JSON object that contains the properties of the origin group. + + :ivar health_probe_settings: Health probe settings to the origin that is used to determine the + health of the origin. + :vartype health_probe_settings: ~azure.mgmt.cdn.models.HealthProbeParameters + :ivar origins: The source of the content being delivered via CDN within given origin group. + :vartype origins: list[~azure.mgmt.cdn.models.ResourceReference] + :ivar traffic_restoration_time_to_healed_or_new_endpoints_in_minutes: Time in minutes to shift + the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new + endpoint is added. Default is 10 mins. This property is currently not supported. + :vartype traffic_restoration_time_to_healed_or_new_endpoints_in_minutes: int + :ivar response_based_origin_error_detection_settings: The JSON object that contains the + properties to determine origin health using real requests/responses. This property is currently + not supported. + :vartype response_based_origin_error_detection_settings: + ~azure.mgmt.cdn.models.ResponseBasedOriginErrorDetectionParameters + """ + + health_probe_settings: Optional["_models.HealthProbeParameters"] = rest_field( + name="healthProbeSettings", visibility=["read", "create", "update", "delete", "query"] + ) + """Health probe settings to the origin that is used to determine the health of the origin.""" + origins: Optional[list["_models.ResourceReference"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The source of the content being delivered via CDN within given origin group.""" + traffic_restoration_time_to_healed_or_new_endpoints_in_minutes: Optional[int] = rest_field( + name="trafficRestorationTimeToHealedOrNewEndpointsInMinutes", + visibility=["read", "create", "update", "delete", "query"], + ) + """Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint comes + healthy or a new endpoint is added. Default is 10 mins. This property is currently not + supported.""" + response_based_origin_error_detection_settings: Optional["_models.ResponseBasedOriginErrorDetectionParameters"] = ( + rest_field( + name="responseBasedOriginErrorDetectionSettings", visibility=["read", "create", "update", "delete", "query"] + ) + ) + """The JSON object that contains the properties to determine origin health using real + requests/responses. This property is currently not supported.""" + + @overload + def __init__( + self, + *, + health_probe_settings: Optional["_models.HealthProbeParameters"] = None, + origins: Optional[list["_models.ResourceReference"]] = None, + traffic_restoration_time_to_healed_or_new_endpoints_in_minutes: Optional[int] = None, + response_based_origin_error_detection_settings: Optional[ + "_models.ResponseBasedOriginErrorDetectionParameters" + ] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class OriginGroupProperties(OriginGroupUpdatePropertiesParameters): + """The JSON object that contains the properties of the origin group. + + :ivar health_probe_settings: Health probe settings to the origin that is used to determine the + health of the origin. + :vartype health_probe_settings: ~azure.mgmt.cdn.models.HealthProbeParameters + :ivar origins: The source of the content being delivered via CDN within given origin group. + :vartype origins: list[~azure.mgmt.cdn.models.ResourceReference] + :ivar traffic_restoration_time_to_healed_or_new_endpoints_in_minutes: Time in minutes to shift + the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new + endpoint is added. Default is 10 mins. This property is currently not supported. + :vartype traffic_restoration_time_to_healed_or_new_endpoints_in_minutes: int + :ivar response_based_origin_error_detection_settings: The JSON object that contains the + properties to determine origin health using real requests/responses. This property is currently + not supported. + :vartype response_based_origin_error_detection_settings: + ~azure.mgmt.cdn.models.ResponseBasedOriginErrorDetectionParameters + :ivar resource_state: Resource status of the origin group. Known values are: "Creating", + "Active", and "Deleting". + :vartype resource_state: str or ~azure.mgmt.cdn.models.OriginGroupResourceState + :ivar provisioning_state: Provisioning status of the origin group. Known values are: + "Succeeded", "Failed", "Updating", "Deleting", and "Creating". + :vartype provisioning_state: str or ~azure.mgmt.cdn.models.OriginGroupProvisioningState + """ + + resource_state: Optional[Union[str, "_models.OriginGroupResourceState"]] = rest_field( + name="resourceState", visibility=["read"] + ) + """Resource status of the origin group. Known values are: \"Creating\", \"Active\", and + \"Deleting\".""" + provisioning_state: Optional[Union[str, "_models.OriginGroupProvisioningState"]] = rest_field( + name="provisioningState", visibility=["read"] + ) + """Provisioning status of the origin group. Known values are: \"Succeeded\", \"Failed\", + \"Updating\", \"Deleting\", and \"Creating\".""" + + @overload + def __init__( + self, + *, + health_probe_settings: Optional["_models.HealthProbeParameters"] = None, + origins: Optional[list["_models.ResourceReference"]] = None, + traffic_restoration_time_to_healed_or_new_endpoints_in_minutes: Optional[int] = None, + response_based_origin_error_detection_settings: Optional[ + "_models.ResponseBasedOriginErrorDetectionParameters" + ] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class OriginGroupUpdateParameters(_Model): + """Origin group properties needed for origin group creation or update. + + :ivar properties: The JSON object that contains the properties of the origin group. + :vartype properties: ~azure.mgmt.cdn.models.OriginGroupUpdatePropertiesParameters + """ + + properties: Optional["_models.OriginGroupUpdatePropertiesParameters"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The JSON object that contains the properties of the origin group.""" + + __flattened_items = [ + "health_probe_settings", + "origins", + "traffic_restoration_time_to_healed_or_new_endpoints_in_minutes", + "response_based_origin_error_detection_settings", + ] + + @overload + def __init__( + self, + *, + properties: Optional["_models.OriginGroupUpdatePropertiesParameters"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class OriginUpdatePropertiesParameters(_Model): + """The JSON object that contains the properties of the origin. + + :ivar host_name: The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses + are supported.This should be unique across all origins in an endpoint. + :vartype host_name: str + :ivar http_port: The value of the HTTP port. Must be between 1 and 65535. + :vartype http_port: int + :ivar https_port: The value of the HTTPS port. Must be between 1 and 65535. + :vartype https_port: int + :ivar origin_host_header: The host header value sent to the origin with each request. If you + leave this blank, the request hostname determines this value. Azure CDN origins, such as Web + Apps, Blob Storage, and Cloud Services require this host header value to match the origin + hostname by default. This overrides the host header defined at Endpoint. + :vartype origin_host_header: str + :ivar priority: Priority of origin in given origin group for load balancing. Higher priorities + will not be used for load balancing if any lower priority origin is healthy.Must be between 1 + and 5. + :vartype priority: int + :ivar weight: Weight of the origin in given origin group for load balancing. Must be between 1 + and 1000. + :vartype weight: int + :ivar enabled: Origin is enabled for load balancing or not. + :vartype enabled: bool + :ivar private_link_alias: The Alias of the Private Link resource. Populating this optional + field indicates that this origin is 'Private'. + :vartype private_link_alias: str + :ivar private_link_resource_id: The Resource Id of the Private Link resource. Populating this + optional field indicates that this backend is 'Private'. + :vartype private_link_resource_id: str + :ivar private_link_location: The location of the Private Link resource. Required only if + 'privateLinkResourceId' is populated. + :vartype private_link_location: str + :ivar private_link_approval_message: A custom message to be included in the approval request to + connect to the Private Link. + :vartype private_link_approval_message: str + """ + + host_name: Optional[str] = rest_field(name="hostName", visibility=["read", "create", "update", "delete", "query"]) + """The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported.This + should be unique across all origins in an endpoint.""" + http_port: Optional[int] = rest_field(name="httpPort", visibility=["read", "create", "update", "delete", "query"]) + """The value of the HTTP port. Must be between 1 and 65535.""" + https_port: Optional[int] = rest_field(name="httpsPort", visibility=["read", "create", "update", "delete", "query"]) + """The value of the HTTPS port. Must be between 1 and 65535.""" + origin_host_header: Optional[str] = rest_field( + name="originHostHeader", visibility=["read", "create", "update", "delete", "query"] + ) + """The host header value sent to the origin with each request. If you leave this blank, the + request hostname determines this value. Azure CDN origins, such as Web Apps, Blob Storage, and + Cloud Services require this host header value to match the origin hostname by default. This + overrides the host header defined at Endpoint.""" + priority: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Priority of origin in given origin group for load balancing. Higher priorities will not be used + for load balancing if any lower priority origin is healthy.Must be between 1 and 5.""" + weight: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Weight of the origin in given origin group for load balancing. Must be between 1 and 1000.""" + enabled: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Origin is enabled for load balancing or not.""" + private_link_alias: Optional[str] = rest_field( + name="privateLinkAlias", visibility=["read", "create", "update", "delete", "query"] + ) + """The Alias of the Private Link resource. Populating this optional field indicates that this + origin is 'Private'.""" + private_link_resource_id: Optional[str] = rest_field( + name="privateLinkResourceId", visibility=["read", "create", "update", "delete", "query"] + ) + """The Resource Id of the Private Link resource. Populating this optional field indicates that + this backend is 'Private'.""" + private_link_location: Optional[str] = rest_field( + name="privateLinkLocation", visibility=["read", "create", "update", "delete", "query"] + ) + """The location of the Private Link resource. Required only if 'privateLinkResourceId' is + populated.""" + private_link_approval_message: Optional[str] = rest_field( + name="privateLinkApprovalMessage", visibility=["read", "create", "update", "delete", "query"] + ) + """A custom message to be included in the approval request to connect to the Private Link.""" + + @overload + def __init__( + self, + *, + host_name: Optional[str] = None, + http_port: Optional[int] = None, + https_port: Optional[int] = None, + origin_host_header: Optional[str] = None, + priority: Optional[int] = None, + weight: Optional[int] = None, + enabled: Optional[bool] = None, + private_link_alias: Optional[str] = None, + private_link_resource_id: Optional[str] = None, + private_link_location: Optional[str] = None, + private_link_approval_message: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class OriginProperties(OriginUpdatePropertiesParameters): + """The JSON object that contains the properties of the origin. + + :ivar http_port: The value of the HTTP port. Must be between 1 and 65535. + :vartype http_port: int + :ivar https_port: The value of the HTTPS port. Must be between 1 and 65535. + :vartype https_port: int + :ivar origin_host_header: The host header value sent to the origin with each request. If you + leave this blank, the request hostname determines this value. Azure CDN origins, such as Web + Apps, Blob Storage, and Cloud Services require this host header value to match the origin + hostname by default. This overrides the host header defined at Endpoint. + :vartype origin_host_header: str + :ivar priority: Priority of origin in given origin group for load balancing. Higher priorities + will not be used for load balancing if any lower priority origin is healthy.Must be between 1 + and 5. + :vartype priority: int + :ivar weight: Weight of the origin in given origin group for load balancing. Must be between 1 + and 1000. + :vartype weight: int + :ivar enabled: Origin is enabled for load balancing or not. + :vartype enabled: bool + :ivar private_link_alias: The Alias of the Private Link resource. Populating this optional + field indicates that this origin is 'Private'. + :vartype private_link_alias: str + :ivar private_link_resource_id: The Resource Id of the Private Link resource. Populating this + optional field indicates that this backend is 'Private'. + :vartype private_link_resource_id: str + :ivar private_link_location: The location of the Private Link resource. Required only if + 'privateLinkResourceId' is populated. + :vartype private_link_location: str + :ivar private_link_approval_message: A custom message to be included in the approval request to + connect to the Private Link. + :vartype private_link_approval_message: str + :ivar resource_state: Resource status of the origin. Known values are: "Creating", "Active", + and "Deleting". + :vartype resource_state: str or ~azure.mgmt.cdn.models.OriginResourceState + :ivar provisioning_state: Provisioning status of the origin. Known values are: "Succeeded", + "Failed", "Updating", "Deleting", and "Creating". + :vartype provisioning_state: str or ~azure.mgmt.cdn.models.OriginProvisioningState + :ivar private_endpoint_status: The approval status for the connection to the Private Link. + Known values are: "Pending", "Approved", "Rejected", "Disconnected", and "Timeout". + :vartype private_endpoint_status: str or ~azure.mgmt.cdn.models.PrivateEndpointStatus + :ivar host_name: The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses + are supported.This should be unique across all origins in an endpoint. Required. + :vartype host_name: str + """ + + resource_state: Optional[Union[str, "_models.OriginResourceState"]] = rest_field( + name="resourceState", visibility=["read"] + ) + """Resource status of the origin. Known values are: \"Creating\", \"Active\", and \"Deleting\".""" + provisioning_state: Optional[Union[str, "_models.OriginProvisioningState"]] = rest_field( + name="provisioningState", visibility=["read"] + ) + """Provisioning status of the origin. Known values are: \"Succeeded\", \"Failed\", \"Updating\", + \"Deleting\", and \"Creating\".""" + private_endpoint_status: Optional[Union[str, "_models.PrivateEndpointStatus"]] = rest_field( + name="privateEndpointStatus", visibility=["read"] + ) + """The approval status for the connection to the Private Link. Known values are: \"Pending\", + \"Approved\", \"Rejected\", \"Disconnected\", and \"Timeout\".""" + host_name: str = rest_field(name="hostName", visibility=["read", "create", "update", "delete", "query"]) + """The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported.This + should be unique across all origins in an endpoint. Required.""" + + @overload + def __init__( + self, + *, + host_name: str, + http_port: Optional[int] = None, + https_port: Optional[int] = None, + origin_host_header: Optional[str] = None, + priority: Optional[int] = None, + weight: Optional[int] = None, + enabled: Optional[bool] = None, + private_link_alias: Optional[str] = None, + private_link_resource_id: Optional[str] = None, + private_link_location: Optional[str] = None, + private_link_approval_message: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class OriginUpdateParameters(_Model): + """Origin properties needed for origin update. + + :ivar properties: The JSON object that contains the properties of the origin. + :vartype properties: ~azure.mgmt.cdn.models.OriginUpdatePropertiesParameters + """ + + properties: Optional["_models.OriginUpdatePropertiesParameters"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The JSON object that contains the properties of the origin.""" + + __flattened_items = [ + "host_name", + "http_port", + "https_port", + "origin_host_header", + "priority", + "weight", + "enabled", + "private_link_alias", + "private_link_resource_id", + "private_link_location", + "private_link_approval_message", + ] + + @overload + def __init__( + self, + *, + properties: Optional["_models.OriginUpdatePropertiesParameters"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class PolicySettings(_Model): + """Defines contents of a web application firewall global configuration. + + :ivar enabled_state: describes if the policy is in enabled state or disabled state. Known + values are: "Disabled" and "Enabled". + :vartype enabled_state: str or ~azure.mgmt.cdn.models.PolicyEnabledState + :ivar mode: Describes if it is in detection mode or prevention mode at policy level. Known + values are: "Prevention" and "Detection". + :vartype mode: str or ~azure.mgmt.cdn.models.PolicyMode + :ivar default_redirect_url: If action type is redirect, this field represents the default + redirect URL for the client. + :vartype default_redirect_url: str + :ivar default_custom_block_response_status_code: If the action type is block, this field + defines the default customer overridable http response status code. Known values are: 200, 403, + 405, 406, and 429. + :vartype default_custom_block_response_status_code: int or + ~azure.mgmt.cdn.models.PolicySettingsDefaultCustomBlockResponseStatusCode + :ivar default_custom_block_response_body: If the action type is block, customer can override + the response body. The body must be specified in base64 encoding. + :vartype default_custom_block_response_body: str + """ + + enabled_state: Optional[Union[str, "_models.PolicyEnabledState"]] = rest_field( + name="enabledState", visibility=["read", "create", "update", "delete", "query"] + ) + """describes if the policy is in enabled state or disabled state. Known values are: \"Disabled\" + and \"Enabled\".""" + mode: Optional[Union[str, "_models.PolicyMode"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Describes if it is in detection mode or prevention mode at policy level. Known values are: + \"Prevention\" and \"Detection\".""" + default_redirect_url: Optional[str] = rest_field( + name="defaultRedirectUrl", visibility=["read", "create", "update", "delete", "query"] + ) + """If action type is redirect, this field represents the default redirect URL for the client.""" + default_custom_block_response_status_code: Optional[ + Union[int, "_models.PolicySettingsDefaultCustomBlockResponseStatusCode"] + ] = rest_field( + name="defaultCustomBlockResponseStatusCode", visibility=["read", "create", "update", "delete", "query"] + ) + """If the action type is block, this field defines the default customer overridable http response + status code. Known values are: 200, 403, 405, 406, and 429.""" + default_custom_block_response_body: Optional[str] = rest_field( + name="defaultCustomBlockResponseBody", visibility=["read", "create", "update", "delete", "query"] + ) + """If the action type is block, customer can override the response body. The body must be + specified in base64 encoding.""" + + @overload + def __init__( + self, + *, + enabled_state: Optional[Union[str, "_models.PolicyEnabledState"]] = None, + mode: Optional[Union[str, "_models.PolicyMode"]] = None, + default_redirect_url: Optional[str] = None, + default_custom_block_response_status_code: Optional[ + Union[int, "_models.PolicySettingsDefaultCustomBlockResponseStatusCode"] + ] = None, + default_custom_block_response_body: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class PostArgsMatchConditionParameters( + DeliveryRuleConditionParameters, discriminator="DeliveryRulePostArgsConditionParameters" +): + """Defines the parameters for PostArgs match conditions. + + :ivar selector: Name of PostArg to be matched. + :vartype selector: str + :ivar operator: Describes operator to be matched. Required. Known values are: "Any", "Equal", + "Contains", "BeginsWith", "EndsWith", "LessThan", "LessThanOrEqual", "GreaterThan", + "GreaterThanOrEqual", and "RegEx". + :vartype operator: str or ~azure.mgmt.cdn.models.PostArgsOperator + :ivar negate_condition: Describes if this is negate condition or not. + :vartype negate_condition: bool + :ivar match_values: The match value for the condition of the delivery rule. + :vartype match_values: list[str] + :ivar transforms: List of transforms. + :vartype transforms: list[str or ~azure.mgmt.cdn.models.Transform] + :ivar type_name: Required. DELIVERY_RULE_POST_ARGS_CONDITION_PARAMETERS. + :vartype type_name: str or ~azure.mgmt.cdn.models.DELIVERY_RULE_POST_ARGS_CONDITION_PARAMETERS + """ + + selector: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Name of PostArg to be matched.""" + operator: Union[str, "_models.PostArgsOperator"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Describes operator to be matched. Required. Known values are: \"Any\", \"Equal\", \"Contains\", + \"BeginsWith\", \"EndsWith\", \"LessThan\", \"LessThanOrEqual\", \"GreaterThan\", + \"GreaterThanOrEqual\", and \"RegEx\".""" + negate_condition: Optional[bool] = rest_field( + name="negateCondition", visibility=["read", "create", "update", "delete", "query"] + ) + """Describes if this is negate condition or not.""" + match_values: Optional[list[str]] = rest_field( + name="matchValues", visibility=["read", "create", "update", "delete", "query"] + ) + """The match value for the condition of the delivery rule.""" + transforms: Optional[list[Union[str, "_models.Transform"]]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """List of transforms.""" + type_name: Literal[DeliveryRuleConditionParametersType.DELIVERY_RULE_POST_ARGS_CONDITION_PARAMETERS] = rest_discriminator(name="typeName", visibility=["read", "create", "update", "delete", "query"]) # type: ignore + """Required. DELIVERY_RULE_POST_ARGS_CONDITION_PARAMETERS.""" + + @overload + def __init__( + self, + *, + operator: Union[str, "_models.PostArgsOperator"], + selector: Optional[str] = None, + negate_condition: Optional[bool] = None, + match_values: Optional[list[str]] = None, + transforms: Optional[list[Union[str, "_models.Transform"]]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + self.type_name = DeliveryRuleConditionParametersType.DELIVERY_RULE_POST_ARGS_CONDITION_PARAMETERS # type: ignore + + +class Profile(TrackedResource): + """A profile is a logical grouping of endpoints that share the same settings. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.cdn.models.SystemData + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar location: The geo-location where the resource lives. Required. + :vartype location: str + :ivar properties: The JSON object that contains the properties required to create a profile. + :vartype properties: ~azure.mgmt.cdn.models.ProfileProperties + :ivar sku: The pricing tier (defines Azure Front Door Standard or Premium or a CDN provider, + feature list and rate) of the profile. Required. + :vartype sku: ~azure.mgmt.cdn.models.Sku + :ivar kind: Kind of the profile. Used by portal to differentiate traditional CDN profile and + new AFD profile. + :vartype kind: str + :ivar identity: The managed service identities assigned to this resource. + :vartype identity: ~azure.mgmt.cdn.models.ManagedServiceIdentity + """ + + properties: Optional["_models.ProfileProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The JSON object that contains the properties required to create a profile.""" + sku: "_models.Sku" = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The pricing tier (defines Azure Front Door Standard or Premium or a CDN provider, feature list + and rate) of the profile. Required.""" + kind: Optional[str] = rest_field(visibility=["read"]) + """Kind of the profile. Used by portal to differentiate traditional CDN profile and new AFD + profile.""" + identity: Optional["_models.ManagedServiceIdentity"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The managed service identities assigned to this resource.""" + + __flattened_items = [ + "resource_state", + "provisioning_state", + "extended_properties", + "front_door_id", + "origin_response_timeout_seconds", + "log_scrubbing", + ] + + @overload + def __init__( + self, + *, + location: str, + sku: "_models.Sku", + tags: Optional[dict[str, str]] = None, + properties: Optional["_models.ProfileProperties"] = None, + identity: Optional["_models.ManagedServiceIdentity"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class ProfileChangeSkuWafMapping(_Model): + """Parameters required for profile upgrade. + + :ivar security_policy_name: The security policy name. Required. + :vartype security_policy_name: str + :ivar change_to_waf_policy: The new waf resource for the security policy to use. Required. + :vartype change_to_waf_policy: ~azure.mgmt.cdn.models.ResourceReference + """ + + security_policy_name: str = rest_field( + name="securityPolicyName", visibility=["read", "create", "update", "delete", "query"] + ) + """The security policy name. Required.""" + change_to_waf_policy: "_models.ResourceReference" = rest_field( + name="changeToWafPolicy", visibility=["read", "create", "update", "delete", "query"] + ) + """The new waf resource for the security policy to use. Required.""" + + @overload + def __init__( + self, + *, + security_policy_name: str, + change_to_waf_policy: "_models.ResourceReference", + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ProfileLogScrubbing(_Model): + """Defines rules that scrub sensitive fields in the Azure Front Door profile logs. + + :ivar state: State of the log scrubbing config. Default value is Enabled. Known values are: + "Enabled" and "Disabled". + :vartype state: str or ~azure.mgmt.cdn.models.ProfileScrubbingState + :ivar scrubbing_rules: List of log scrubbing rules applied to the Azure Front Door profile + logs. + :vartype scrubbing_rules: list[~azure.mgmt.cdn.models.ProfileScrubbingRules] + """ + + state: Optional[Union[str, "_models.ProfileScrubbingState"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """State of the log scrubbing config. Default value is Enabled. Known values are: \"Enabled\" and + \"Disabled\".""" + scrubbing_rules: Optional[list["_models.ProfileScrubbingRules"]] = rest_field( + name="scrubbingRules", visibility=["read", "create", "update", "delete", "query"] + ) + """List of log scrubbing rules applied to the Azure Front Door profile logs.""" + + @overload + def __init__( + self, + *, + state: Optional[Union[str, "_models.ProfileScrubbingState"]] = None, + scrubbing_rules: Optional[list["_models.ProfileScrubbingRules"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ProfileProperties(_Model): + """The JSON object that contains the properties required to create a profile. + + :ivar resource_state: Resource status of the profile. Known values are: "Creating", "Active", + "Deleting", "Disabled", "Migrating", "Migrated", "PendingMigrationCommit", + "CommittingMigration", and "AbortingMigration". + :vartype resource_state: str or ~azure.mgmt.cdn.models.ProfileResourceState + :ivar provisioning_state: Provisioning status of the profile. Known values are: "Succeeded", + "Failed", "Updating", "Deleting", and "Creating". + :vartype provisioning_state: str or ~azure.mgmt.cdn.models.ProfileProvisioningState + :ivar extended_properties: Key-Value pair representing additional properties for profiles. + :vartype extended_properties: dict[str, str] + :ivar front_door_id: The Id of the frontdoor. + :vartype front_door_id: str + :ivar origin_response_timeout_seconds: Send and receive timeout on forwarding request to the + origin. When timeout is reached, the request fails and returns. + :vartype origin_response_timeout_seconds: int + :ivar log_scrubbing: Defines rules that scrub sensitive fields in the Azure Front Door profile + logs. + :vartype log_scrubbing: ~azure.mgmt.cdn.models.ProfileLogScrubbing + """ + + resource_state: Optional[Union[str, "_models.ProfileResourceState"]] = rest_field( + name="resourceState", visibility=["read"] + ) + """Resource status of the profile. Known values are: \"Creating\", \"Active\", \"Deleting\", + \"Disabled\", \"Migrating\", \"Migrated\", \"PendingMigrationCommit\", \"CommittingMigration\", + and \"AbortingMigration\".""" + provisioning_state: Optional[Union[str, "_models.ProfileProvisioningState"]] = rest_field( + name="provisioningState", visibility=["read"] + ) + """Provisioning status of the profile. Known values are: \"Succeeded\", \"Failed\", \"Updating\", + \"Deleting\", and \"Creating\".""" + extended_properties: Optional[dict[str, str]] = rest_field(name="extendedProperties", visibility=["read"]) + """Key-Value pair representing additional properties for profiles.""" + front_door_id: Optional[str] = rest_field(name="frontDoorId", visibility=["read"]) + """The Id of the frontdoor.""" + origin_response_timeout_seconds: Optional[int] = rest_field( + name="originResponseTimeoutSeconds", visibility=["read", "create", "update", "delete", "query"] + ) + """Send and receive timeout on forwarding request to the origin. When timeout is reached, the + request fails and returns.""" + log_scrubbing: Optional["_models.ProfileLogScrubbing"] = rest_field( + name="logScrubbing", visibility=["read", "create", "update", "delete", "query"] + ) + """Defines rules that scrub sensitive fields in the Azure Front Door profile logs.""" + + @overload + def __init__( + self, + *, + origin_response_timeout_seconds: Optional[int] = None, + log_scrubbing: Optional["_models.ProfileLogScrubbing"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ProfilePropertiesUpdateParameters(_Model): + """The JSON object containing profile update parameters. + + :ivar origin_response_timeout_seconds: Send and receive timeout on forwarding request to the + origin. When timeout is reached, the request fails and returns. + :vartype origin_response_timeout_seconds: int + :ivar log_scrubbing: Defines rules to scrub sensitive fields in logs. + :vartype log_scrubbing: ~azure.mgmt.cdn.models.ProfileLogScrubbing + """ + + origin_response_timeout_seconds: Optional[int] = rest_field( + name="originResponseTimeoutSeconds", visibility=["read", "create", "update", "delete", "query"] + ) + """Send and receive timeout on forwarding request to the origin. When timeout is reached, the + request fails and returns.""" + log_scrubbing: Optional["_models.ProfileLogScrubbing"] = rest_field( + name="logScrubbing", visibility=["read", "create", "update", "delete", "query"] + ) + """Defines rules to scrub sensitive fields in logs.""" + + @overload + def __init__( + self, + *, + origin_response_timeout_seconds: Optional[int] = None, + log_scrubbing: Optional["_models.ProfileLogScrubbing"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ProfileScrubbingRules(_Model): + """Defines the contents of the log scrubbing rules. + + :ivar match_variable: The variable to be scrubbed from the logs. Required. Known values are: + "RequestIPAddress", "RequestUri", and "QueryStringArgNames". + :vartype match_variable: str or ~azure.mgmt.cdn.models.ScrubbingRuleEntryMatchVariable + :ivar selector_match_operator: When matchVariable is a collection, operate on the selector to + specify which elements in the collection this rule applies to. Required. "EqualsAny" + :vartype selector_match_operator: str or ~azure.mgmt.cdn.models.ScrubbingRuleEntryMatchOperator + :ivar selector: When matchVariable is a collection, operator used to specify which elements in + the collection this rule applies to. + :vartype selector: str + :ivar state: Defines the state of a log scrubbing rule. Default value is enabled. Known values + are: "Enabled" and "Disabled". + :vartype state: str or ~azure.mgmt.cdn.models.ScrubbingRuleEntryState + """ + + match_variable: Union[str, "_models.ScrubbingRuleEntryMatchVariable"] = rest_field( + name="matchVariable", visibility=["read", "create", "update", "delete", "query"] + ) + """The variable to be scrubbed from the logs. Required. Known values are: \"RequestIPAddress\", + \"RequestUri\", and \"QueryStringArgNames\".""" + selector_match_operator: Union[str, "_models.ScrubbingRuleEntryMatchOperator"] = rest_field( + name="selectorMatchOperator", visibility=["read", "create", "update", "delete", "query"] + ) + """When matchVariable is a collection, operate on the selector to specify which elements in the + collection this rule applies to. Required. \"EqualsAny\"""" + selector: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """When matchVariable is a collection, operator used to specify which elements in the collection + this rule applies to.""" + state: Optional[Union[str, "_models.ScrubbingRuleEntryState"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Defines the state of a log scrubbing rule. Default value is enabled. Known values are: + \"Enabled\" and \"Disabled\".""" + + @overload + def __init__( + self, + *, + match_variable: Union[str, "_models.ScrubbingRuleEntryMatchVariable"], + selector_match_operator: Union[str, "_models.ScrubbingRuleEntryMatchOperator"], + selector: Optional[str] = None, + state: Optional[Union[str, "_models.ScrubbingRuleEntryState"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ProfileUpdateParameters(_Model): + """Properties required to update a profile. + + :ivar tags: Profile tags. + :vartype tags: dict[str, str] + :ivar identity: Managed service identity (system assigned and/or user assigned identities). + :vartype identity: ~azure.mgmt.cdn.models.ManagedServiceIdentity + :ivar properties: The JSON object containing profile update parameters. + :vartype properties: ~azure.mgmt.cdn.models.ProfilePropertiesUpdateParameters + """ + + tags: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Profile tags.""" + identity: Optional["_models.ManagedServiceIdentity"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Managed service identity (system assigned and/or user assigned identities).""" + properties: Optional["_models.ProfilePropertiesUpdateParameters"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The JSON object containing profile update parameters.""" + + __flattened_items = ["origin_response_timeout_seconds", "log_scrubbing"] + + @overload + def __init__( + self, + *, + tags: Optional[dict[str, str]] = None, + identity: Optional["_models.ManagedServiceIdentity"] = None, + properties: Optional["_models.ProfilePropertiesUpdateParameters"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class ProfileUpgradeParameters(_Model): + """Parameters required for profile upgrade. + + :ivar waf_mapping_list: Web Application Firewall (WAF) and security policy mapping for the + profile upgrade. Required. + :vartype waf_mapping_list: list[~azure.mgmt.cdn.models.ProfileChangeSkuWafMapping] + """ + + waf_mapping_list: list["_models.ProfileChangeSkuWafMapping"] = rest_field( + name="wafMappingList", visibility=["read", "create", "update", "delete", "query"] + ) + """Web Application Firewall (WAF) and security policy mapping for the profile upgrade. Required.""" + + @overload + def __init__( + self, + *, + waf_mapping_list: list["_models.ProfileChangeSkuWafMapping"], + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class PurgeParameters(_Model): + """Parameters required for content purge. + + :ivar content_paths: The path to the content to be purged. Can describe a file path or a wild + card directory. Required. + :vartype content_paths: list[str] + """ + + content_paths: list[str] = rest_field( + name="contentPaths", visibility=["read", "create", "update", "delete", "query"] + ) + """The path to the content to be purged. Can describe a file path or a wild card directory. + Required.""" + + @overload + def __init__( + self, + *, + content_paths: list[str], + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class QueryStringMatchConditionParameters( + DeliveryRuleConditionParameters, discriminator="DeliveryRuleQueryStringConditionParameters" +): + """Defines the parameters for QueryString match conditions. + + :ivar operator: Describes operator to be matched. Required. Known values are: "Any", "Equal", + "Contains", "BeginsWith", "EndsWith", "LessThan", "LessThanOrEqual", "GreaterThan", + "GreaterThanOrEqual", and "RegEx". + :vartype operator: str or ~azure.mgmt.cdn.models.QueryStringOperator + :ivar negate_condition: Describes if this is negate condition or not. + :vartype negate_condition: bool + :ivar match_values: The match value for the condition of the delivery rule. + :vartype match_values: list[str] + :ivar transforms: List of transforms. + :vartype transforms: list[str or ~azure.mgmt.cdn.models.Transform] + :ivar type_name: Required. DELIVERY_RULE_QUERY_STRING_CONDITION_PARAMETERS. + :vartype type_name: str or + ~azure.mgmt.cdn.models.DELIVERY_RULE_QUERY_STRING_CONDITION_PARAMETERS + """ + + operator: Union[str, "_models.QueryStringOperator"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Describes operator to be matched. Required. Known values are: \"Any\", \"Equal\", \"Contains\", + \"BeginsWith\", \"EndsWith\", \"LessThan\", \"LessThanOrEqual\", \"GreaterThan\", + \"GreaterThanOrEqual\", and \"RegEx\".""" + negate_condition: Optional[bool] = rest_field( + name="negateCondition", visibility=["read", "create", "update", "delete", "query"] + ) + """Describes if this is negate condition or not.""" + match_values: Optional[list[str]] = rest_field( + name="matchValues", visibility=["read", "create", "update", "delete", "query"] + ) + """The match value for the condition of the delivery rule.""" + transforms: Optional[list[Union[str, "_models.Transform"]]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """List of transforms.""" + type_name: Literal[DeliveryRuleConditionParametersType.DELIVERY_RULE_QUERY_STRING_CONDITION_PARAMETERS] = rest_discriminator(name="typeName", visibility=["read", "create", "update", "delete", "query"]) # type: ignore + """Required. DELIVERY_RULE_QUERY_STRING_CONDITION_PARAMETERS.""" + + @overload + def __init__( + self, + *, + operator: Union[str, "_models.QueryStringOperator"], + negate_condition: Optional[bool] = None, + match_values: Optional[list[str]] = None, + transforms: Optional[list[Union[str, "_models.Transform"]]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + self.type_name = DeliveryRuleConditionParametersType.DELIVERY_RULE_QUERY_STRING_CONDITION_PARAMETERS # type: ignore + + +class RankingsResponse(_Model): + """Rankings Response. + + :ivar date_time_begin: + :vartype date_time_begin: ~datetime.datetime + :ivar date_time_end: + :vartype date_time_end: ~datetime.datetime + :ivar tables: + :vartype tables: list[~azure.mgmt.cdn.models.RankingsResponseTablesItem] + """ + + date_time_begin: Optional[datetime.datetime] = rest_field( + name="dateTimeBegin", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + date_time_end: Optional[datetime.datetime] = rest_field( + name="dateTimeEnd", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + tables: Optional[list["_models.RankingsResponseTablesItem"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + + @overload + def __init__( + self, + *, + date_time_begin: Optional[datetime.datetime] = None, + date_time_end: Optional[datetime.datetime] = None, + tables: Optional[list["_models.RankingsResponseTablesItem"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class RankingsResponseTablesItem(_Model): + """RankingsResponseTablesItem. + + :ivar ranking: + :vartype ranking: str + :ivar data: + :vartype data: list[~azure.mgmt.cdn.models.RankingsResponseTablesPropertiesItemsItem] + """ + + ranking: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + data: Optional[list["_models.RankingsResponseTablesPropertiesItemsItem"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + + @overload + def __init__( + self, + *, + ranking: Optional[str] = None, + data: Optional[list["_models.RankingsResponseTablesPropertiesItemsItem"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class RankingsResponseTablesPropertiesItemsItem(_Model): # pylint: disable=name-too-long + """RankingsResponseTablesPropertiesItemsItem. + + :ivar name: + :vartype name: str + :ivar metrics: + :vartype metrics: list[~azure.mgmt.cdn.models.RankingsResponseTablesPropertiesItemsMetricsItem] + """ + + name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + metrics: Optional[list["_models.RankingsResponseTablesPropertiesItemsMetricsItem"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + + @overload + def __init__( + self, + *, + name: Optional[str] = None, + metrics: Optional[list["_models.RankingsResponseTablesPropertiesItemsMetricsItem"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class RankingsResponseTablesPropertiesItemsMetricsItem(_Model): # pylint: disable=name-too-long + """RankingsResponseTablesPropertiesItemsMetricsItem. + + :ivar metric: + :vartype metric: str + :ivar value: + :vartype value: int + :ivar percentage: + :vartype percentage: float + """ + + metric: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + value: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + percentage: Optional[float] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + + @overload + def __init__( + self, + *, + metric: Optional[str] = None, + value: Optional[int] = None, + percentage: Optional[float] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class RateLimitRule(CustomRule): + """Defines a rate limiting rule that can be included in a waf policy. + + :ivar name: Defines the name of the custom rule. Required. + :vartype name: str + :ivar enabled_state: Describes if the custom rule is in enabled or disabled state. Defaults to + Enabled if not specified. Known values are: "Disabled" and "Enabled". + :vartype enabled_state: str or ~azure.mgmt.cdn.models.CustomRuleEnabledState + :ivar priority: Defines in what order this rule be evaluated in the overall list of custom + rules. Required. + :vartype priority: int + :ivar match_conditions: List of match conditions. Required. + :vartype match_conditions: list[~azure.mgmt.cdn.models.MatchCondition] + :ivar action: Describes what action to be applied when rule matches. Required. Known values + are: "Allow", "Block", "Log", and "Redirect". + :vartype action: str or ~azure.mgmt.cdn.models.ActionType + :ivar rate_limit_threshold: Defines rate limit threshold. Required. + :vartype rate_limit_threshold: int + :ivar rate_limit_duration_in_minutes: Defines rate limit duration. Default is 1 minute. + Required. + :vartype rate_limit_duration_in_minutes: int + """ + + rate_limit_threshold: int = rest_field( + name="rateLimitThreshold", visibility=["read", "create", "update", "delete", "query"] + ) + """Defines rate limit threshold. Required.""" + rate_limit_duration_in_minutes: int = rest_field( + name="rateLimitDurationInMinutes", visibility=["read", "create", "update", "delete", "query"] + ) + """Defines rate limit duration. Default is 1 minute. Required.""" + + @overload + def __init__( + self, + *, + name: str, + priority: int, + match_conditions: list["_models.MatchCondition"], + action: Union[str, "_models.ActionType"], + rate_limit_threshold: int, + rate_limit_duration_in_minutes: int, + enabled_state: Optional[Union[str, "_models.CustomRuleEnabledState"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class RateLimitRuleList(_Model): + """Defines contents of rate limit rules. + + :ivar rules: List of rules. + :vartype rules: list[~azure.mgmt.cdn.models.RateLimitRule] + """ + + rules: Optional[list["_models.RateLimitRule"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """List of rules.""" + + @overload + def __init__( + self, + *, + rules: Optional[list["_models.RateLimitRule"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class RemoteAddressMatchConditionParameters( + DeliveryRuleConditionParameters, discriminator="DeliveryRuleRemoteAddressConditionParameters" +): + """Defines the parameters for RemoteAddress match conditions. + + :ivar operator: Describes operator to be matched. Required. Known values are: "Any", "IPMatch", + and "GeoMatch". + :vartype operator: str or ~azure.mgmt.cdn.models.RemoteAddressOperator + :ivar negate_condition: Describes if this is negate condition or not. + :vartype negate_condition: bool + :ivar match_values: Match values to match against. The operator will apply to each value in + here with OR semantics. If any of them match the variable with the given operator this match + condition is considered a match. + :vartype match_values: list[str] + :ivar transforms: List of transforms. + :vartype transforms: list[str or ~azure.mgmt.cdn.models.Transform] + :ivar type_name: Required. DELIVERY_RULE_REMOTE_ADDRESS_CONDITION_PARAMETERS. + :vartype type_name: str or + ~azure.mgmt.cdn.models.DELIVERY_RULE_REMOTE_ADDRESS_CONDITION_PARAMETERS + """ + + operator: Union[str, "_models.RemoteAddressOperator"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Describes operator to be matched. Required. Known values are: \"Any\", \"IPMatch\", and + \"GeoMatch\".""" + negate_condition: Optional[bool] = rest_field( + name="negateCondition", visibility=["read", "create", "update", "delete", "query"] + ) + """Describes if this is negate condition or not.""" + match_values: Optional[list[str]] = rest_field( + name="matchValues", visibility=["read", "create", "update", "delete", "query"] + ) + """Match values to match against. The operator will apply to each value in here with OR semantics. + If any of them match the variable with the given operator this match condition is considered a + match.""" + transforms: Optional[list[Union[str, "_models.Transform"]]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """List of transforms.""" + type_name: Literal[DeliveryRuleConditionParametersType.DELIVERY_RULE_REMOTE_ADDRESS_CONDITION_PARAMETERS] = rest_discriminator(name="typeName", visibility=["read", "create", "update", "delete", "query"]) # type: ignore + """Required. DELIVERY_RULE_REMOTE_ADDRESS_CONDITION_PARAMETERS.""" + + @overload + def __init__( + self, + *, + operator: Union[str, "_models.RemoteAddressOperator"], + negate_condition: Optional[bool] = None, + match_values: Optional[list[str]] = None, + transforms: Optional[list[Union[str, "_models.Transform"]]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + self.type_name = DeliveryRuleConditionParametersType.DELIVERY_RULE_REMOTE_ADDRESS_CONDITION_PARAMETERS # type: ignore + + +class RequestBodyMatchConditionParameters( + DeliveryRuleConditionParameters, discriminator="DeliveryRuleRequestBodyConditionParameters" +): + """Defines the parameters for RequestBody match conditions. + + :ivar operator: Describes operator to be matched. Required. Known values are: "Any", "Equal", + "Contains", "BeginsWith", "EndsWith", "LessThan", "LessThanOrEqual", "GreaterThan", + "GreaterThanOrEqual", and "RegEx". + :vartype operator: str or ~azure.mgmt.cdn.models.RequestBodyOperator + :ivar negate_condition: Describes if this is negate condition or not. + :vartype negate_condition: bool + :ivar match_values: The match value for the condition of the delivery rule. + :vartype match_values: list[str] + :ivar transforms: List of transforms. + :vartype transforms: list[str or ~azure.mgmt.cdn.models.Transform] + :ivar type_name: Required. DELIVERY_RULE_REQUEST_BODY_CONDITION_PARAMETERS. + :vartype type_name: str or + ~azure.mgmt.cdn.models.DELIVERY_RULE_REQUEST_BODY_CONDITION_PARAMETERS + """ + + operator: Union[str, "_models.RequestBodyOperator"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Describes operator to be matched. Required. Known values are: \"Any\", \"Equal\", \"Contains\", + \"BeginsWith\", \"EndsWith\", \"LessThan\", \"LessThanOrEqual\", \"GreaterThan\", + \"GreaterThanOrEqual\", and \"RegEx\".""" + negate_condition: Optional[bool] = rest_field( + name="negateCondition", visibility=["read", "create", "update", "delete", "query"] + ) + """Describes if this is negate condition or not.""" + match_values: Optional[list[str]] = rest_field( + name="matchValues", visibility=["read", "create", "update", "delete", "query"] + ) + """The match value for the condition of the delivery rule.""" + transforms: Optional[list[Union[str, "_models.Transform"]]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """List of transforms.""" + type_name: Literal[DeliveryRuleConditionParametersType.DELIVERY_RULE_REQUEST_BODY_CONDITION_PARAMETERS] = rest_discriminator(name="typeName", visibility=["read", "create", "update", "delete", "query"]) # type: ignore + """Required. DELIVERY_RULE_REQUEST_BODY_CONDITION_PARAMETERS.""" + + @overload + def __init__( + self, + *, + operator: Union[str, "_models.RequestBodyOperator"], + negate_condition: Optional[bool] = None, + match_values: Optional[list[str]] = None, + transforms: Optional[list[Union[str, "_models.Transform"]]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + self.type_name = DeliveryRuleConditionParametersType.DELIVERY_RULE_REQUEST_BODY_CONDITION_PARAMETERS # type: ignore + + +class RequestHeaderMatchConditionParameters( + DeliveryRuleConditionParameters, discriminator="DeliveryRuleRequestHeaderConditionParameters" +): + """Defines the parameters for RequestHeader match conditions. + + :ivar selector: Name of Header to be matched. + :vartype selector: str + :ivar operator: Describes operator to be matched. Required. Known values are: "Any", "Equal", + "Contains", "BeginsWith", "EndsWith", "LessThan", "LessThanOrEqual", "GreaterThan", + "GreaterThanOrEqual", and "RegEx". + :vartype operator: str or ~azure.mgmt.cdn.models.RequestHeaderOperator + :ivar negate_condition: Describes if this is negate condition or not. + :vartype negate_condition: bool + :ivar match_values: The match value for the condition of the delivery rule. + :vartype match_values: list[str] + :ivar transforms: List of transforms. + :vartype transforms: list[str or ~azure.mgmt.cdn.models.Transform] + :ivar type_name: Required. DELIVERY_RULE_REQUEST_HEADER_CONDITION_PARAMETERS. + :vartype type_name: str or + ~azure.mgmt.cdn.models.DELIVERY_RULE_REQUEST_HEADER_CONDITION_PARAMETERS + """ + + selector: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Name of Header to be matched.""" + operator: Union[str, "_models.RequestHeaderOperator"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Describes operator to be matched. Required. Known values are: \"Any\", \"Equal\", \"Contains\", + \"BeginsWith\", \"EndsWith\", \"LessThan\", \"LessThanOrEqual\", \"GreaterThan\", + \"GreaterThanOrEqual\", and \"RegEx\".""" + negate_condition: Optional[bool] = rest_field( + name="negateCondition", visibility=["read", "create", "update", "delete", "query"] + ) + """Describes if this is negate condition or not.""" + match_values: Optional[list[str]] = rest_field( + name="matchValues", visibility=["read", "create", "update", "delete", "query"] + ) + """The match value for the condition of the delivery rule.""" + transforms: Optional[list[Union[str, "_models.Transform"]]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """List of transforms.""" + type_name: Literal[DeliveryRuleConditionParametersType.DELIVERY_RULE_REQUEST_HEADER_CONDITION_PARAMETERS] = rest_discriminator(name="typeName", visibility=["read", "create", "update", "delete", "query"]) # type: ignore + """Required. DELIVERY_RULE_REQUEST_HEADER_CONDITION_PARAMETERS.""" + + @overload + def __init__( + self, + *, + operator: Union[str, "_models.RequestHeaderOperator"], + selector: Optional[str] = None, + negate_condition: Optional[bool] = None, + match_values: Optional[list[str]] = None, + transforms: Optional[list[Union[str, "_models.Transform"]]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + self.type_name = DeliveryRuleConditionParametersType.DELIVERY_RULE_REQUEST_HEADER_CONDITION_PARAMETERS # type: ignore + + +class RequestMethodMatchConditionParameters( + DeliveryRuleConditionParameters, discriminator="DeliveryRuleRequestMethodConditionParameters" +): + """Defines the parameters for RequestMethod match conditions. + + :ivar operator: Describes operator to be matched. Required. "Equal" + :vartype operator: str or ~azure.mgmt.cdn.models.RequestMethodOperator + :ivar negate_condition: Describes if this is negate condition or not. + :vartype negate_condition: bool + :ivar transforms: List of transforms. + :vartype transforms: list[str or ~azure.mgmt.cdn.models.Transform] + :ivar match_values: The match value for the condition of the delivery rule. + :vartype match_values: list[str or ~azure.mgmt.cdn.models.RequestMethodMatchValue] + :ivar type_name: Required. DELIVERY_RULE_REQUEST_METHOD_CONDITION_PARAMETERS. + :vartype type_name: str or + ~azure.mgmt.cdn.models.DELIVERY_RULE_REQUEST_METHOD_CONDITION_PARAMETERS + """ + + operator: Union[str, "_models.RequestMethodOperator"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Describes operator to be matched. Required. \"Equal\"""" + negate_condition: Optional[bool] = rest_field( + name="negateCondition", visibility=["read", "create", "update", "delete", "query"] + ) + """Describes if this is negate condition or not.""" + transforms: Optional[list[Union[str, "_models.Transform"]]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """List of transforms.""" + match_values: Optional[list[Union[str, "_models.RequestMethodMatchValue"]]] = rest_field( + name="matchValues", visibility=["read", "create", "update", "delete", "query"] + ) + """The match value for the condition of the delivery rule.""" + type_name: Literal[DeliveryRuleConditionParametersType.DELIVERY_RULE_REQUEST_METHOD_CONDITION_PARAMETERS] = rest_discriminator(name="typeName", visibility=["read", "create", "update", "delete", "query"]) # type: ignore + """Required. DELIVERY_RULE_REQUEST_METHOD_CONDITION_PARAMETERS.""" + + @overload + def __init__( + self, + *, + operator: Union[str, "_models.RequestMethodOperator"], + negate_condition: Optional[bool] = None, + transforms: Optional[list[Union[str, "_models.Transform"]]] = None, + match_values: Optional[list[Union[str, "_models.RequestMethodMatchValue"]]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + self.type_name = DeliveryRuleConditionParametersType.DELIVERY_RULE_REQUEST_METHOD_CONDITION_PARAMETERS # type: ignore + + +class RequestSchemeMatchConditionParameters( + DeliveryRuleConditionParameters, discriminator="DeliveryRuleRequestSchemeConditionParameters" +): + """Defines the parameters for RequestScheme match conditions. + + :ivar operator: Describes operator to be matched. Required. "Equal" + :vartype operator: str or ~azure.mgmt.cdn.models.RequestSchemeMatchConditionParametersOperator + :ivar negate_condition: Describes if this is negate condition or not. + :vartype negate_condition: bool + :ivar transforms: List of transforms. + :vartype transforms: list[str or ~azure.mgmt.cdn.models.Transform] + :ivar match_values: The match value for the condition of the delivery rule. + :vartype match_values: list[str or ~azure.mgmt.cdn.models.RequestSchemeMatchValue] + :ivar type_name: Required. DELIVERY_RULE_REQUEST_SCHEME_CONDITION_PARAMETERS. + :vartype type_name: str or + ~azure.mgmt.cdn.models.DELIVERY_RULE_REQUEST_SCHEME_CONDITION_PARAMETERS + """ + + operator: Union[str, "_models.RequestSchemeMatchConditionParametersOperator"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Describes operator to be matched. Required. \"Equal\"""" + negate_condition: Optional[bool] = rest_field( + name="negateCondition", visibility=["read", "create", "update", "delete", "query"] + ) + """Describes if this is negate condition or not.""" + transforms: Optional[list[Union[str, "_models.Transform"]]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """List of transforms.""" + match_values: Optional[list[Union[str, "_models.RequestSchemeMatchValue"]]] = rest_field( + name="matchValues", visibility=["read", "create", "update", "delete", "query"] + ) + """The match value for the condition of the delivery rule.""" + type_name: Literal[DeliveryRuleConditionParametersType.DELIVERY_RULE_REQUEST_SCHEME_CONDITION_PARAMETERS] = rest_discriminator(name="typeName", visibility=["read", "create", "update", "delete", "query"]) # type: ignore + """Required. DELIVERY_RULE_REQUEST_SCHEME_CONDITION_PARAMETERS.""" + + @overload + def __init__( + self, + *, + operator: Union[str, "_models.RequestSchemeMatchConditionParametersOperator"], + negate_condition: Optional[bool] = None, + transforms: Optional[list[Union[str, "_models.Transform"]]] = None, + match_values: Optional[list[Union[str, "_models.RequestSchemeMatchValue"]]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + self.type_name = DeliveryRuleConditionParametersType.DELIVERY_RULE_REQUEST_SCHEME_CONDITION_PARAMETERS # type: ignore + + +class RequestUriMatchConditionParameters( + DeliveryRuleConditionParameters, discriminator="DeliveryRuleRequestUriConditionParameters" +): + """Defines the parameters for RequestUri match conditions. + + :ivar operator: Describes operator to be matched. Required. Known values are: "Any", "Equal", + "Contains", "BeginsWith", "EndsWith", "LessThan", "LessThanOrEqual", "GreaterThan", + "GreaterThanOrEqual", and "RegEx". + :vartype operator: str or ~azure.mgmt.cdn.models.RequestUriOperator + :ivar negate_condition: Describes if this is negate condition or not. + :vartype negate_condition: bool + :ivar match_values: The match value for the condition of the delivery rule. + :vartype match_values: list[str] + :ivar transforms: List of transforms. + :vartype transforms: list[str or ~azure.mgmt.cdn.models.Transform] + :ivar type_name: Required. DELIVERY_RULE_REQUEST_URI_CONDITION_PARAMETERS. + :vartype type_name: str or + ~azure.mgmt.cdn.models.DELIVERY_RULE_REQUEST_URI_CONDITION_PARAMETERS + """ + + operator: Union[str, "_models.RequestUriOperator"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Describes operator to be matched. Required. Known values are: \"Any\", \"Equal\", \"Contains\", + \"BeginsWith\", \"EndsWith\", \"LessThan\", \"LessThanOrEqual\", \"GreaterThan\", + \"GreaterThanOrEqual\", and \"RegEx\".""" + negate_condition: Optional[bool] = rest_field( + name="negateCondition", visibility=["read", "create", "update", "delete", "query"] + ) + """Describes if this is negate condition or not.""" + match_values: Optional[list[str]] = rest_field( + name="matchValues", visibility=["read", "create", "update", "delete", "query"] + ) + """The match value for the condition of the delivery rule.""" + transforms: Optional[list[Union[str, "_models.Transform"]]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """List of transforms.""" + type_name: Literal[DeliveryRuleConditionParametersType.DELIVERY_RULE_REQUEST_URI_CONDITION_PARAMETERS] = rest_discriminator(name="typeName", visibility=["read", "create", "update", "delete", "query"]) # type: ignore + """Required. DELIVERY_RULE_REQUEST_URI_CONDITION_PARAMETERS.""" + + @overload + def __init__( + self, + *, + operator: Union[str, "_models.RequestUriOperator"], + negate_condition: Optional[bool] = None, + match_values: Optional[list[str]] = None, + transforms: Optional[list[Union[str, "_models.Transform"]]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + self.type_name = DeliveryRuleConditionParametersType.DELIVERY_RULE_REQUEST_URI_CONDITION_PARAMETERS # type: ignore + + +class ResourceReference(_Model): + """Reference to another resource. + + :ivar id: Resource ID. + :vartype id: str + """ + + id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Resource ID.""" + + @overload + def __init__( + self, + *, + id: Optional[str] = None, # pylint: disable=redefined-builtin + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ResourcesResponse(_Model): + """Resources Response. + + :ivar endpoints: + :vartype endpoints: list[~azure.mgmt.cdn.models.ResourcesResponseEndpointsItem] + :ivar custom_domains: + :vartype custom_domains: list[~azure.mgmt.cdn.models.ResourcesResponseCustomDomainsItem] + """ + + endpoints: Optional[list["_models.ResourcesResponseEndpointsItem"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + custom_domains: Optional[list["_models.ResourcesResponseCustomDomainsItem"]] = rest_field( + name="customDomains", visibility=["read", "create", "update", "delete", "query"] + ) + + @overload + def __init__( + self, + *, + endpoints: Optional[list["_models.ResourcesResponseEndpointsItem"]] = None, + custom_domains: Optional[list["_models.ResourcesResponseCustomDomainsItem"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ResourcesResponseCustomDomainsItem(_Model): + """ResourcesResponseCustomDomainsItem. + + :ivar id: + :vartype id: str + :ivar name: + :vartype name: str + :ivar endpoint_id: + :vartype endpoint_id: str + :ivar history: + :vartype history: bool + """ + + id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + endpoint_id: Optional[str] = rest_field( + name="endpointId", visibility=["read", "create", "update", "delete", "query"] + ) + history: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + + @overload + def __init__( + self, + *, + id: Optional[str] = None, # pylint: disable=redefined-builtin + name: Optional[str] = None, + endpoint_id: Optional[str] = None, + history: Optional[bool] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ResourcesResponseEndpointsItem(_Model): + """ResourcesResponseEndpointsItem. + + :ivar id: + :vartype id: str + :ivar name: + :vartype name: str + :ivar history: + :vartype history: bool + :ivar custom_domains: + :vartype custom_domains: + list[~azure.mgmt.cdn.models.ResourcesResponseEndpointsPropertiesItemsItem] + """ + + id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + history: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + custom_domains: Optional[list["_models.ResourcesResponseEndpointsPropertiesItemsItem"]] = rest_field( + name="customDomains", visibility=["read", "create", "update", "delete", "query"] + ) + + @overload + def __init__( + self, + *, + id: Optional[str] = None, # pylint: disable=redefined-builtin + name: Optional[str] = None, + history: Optional[bool] = None, + custom_domains: Optional[list["_models.ResourcesResponseEndpointsPropertiesItemsItem"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ResourcesResponseEndpointsPropertiesItemsItem(_Model): # pylint: disable=name-too-long + """ResourcesResponseEndpointsPropertiesItemsItem. + + :ivar id: + :vartype id: str + :ivar name: + :vartype name: str + :ivar endpoint_id: + :vartype endpoint_id: str + :ivar history: + :vartype history: bool + """ + + id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + endpoint_id: Optional[str] = rest_field( + name="endpointId", visibility=["read", "create", "update", "delete", "query"] + ) + history: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + + @overload + def __init__( + self, + *, + id: Optional[str] = None, # pylint: disable=redefined-builtin + name: Optional[str] = None, + endpoint_id: Optional[str] = None, + history: Optional[bool] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ResourceUsage(_Model): + """Output of check resource usage API. + + :ivar resource_type: Resource type for which the usage is provided. + :vartype resource_type: str + :ivar unit: Unit of the usage. e.g. count. "count" + :vartype unit: str or ~azure.mgmt.cdn.models.ResourceUsageUnit + :ivar current_value: Actual value of usage on the specified resource type. + :vartype current_value: int + :ivar limit: Quota of the specified resource type. + :vartype limit: int + """ + + resource_type: Optional[str] = rest_field(name="resourceType", visibility=["read"]) + """Resource type for which the usage is provided.""" + unit: Optional[Union[str, "_models.ResourceUsageUnit"]] = rest_field(visibility=["read"]) + """Unit of the usage. e.g. count. \"count\"""" + current_value: Optional[int] = rest_field(name="currentValue", visibility=["read"]) + """Actual value of usage on the specified resource type.""" + limit: Optional[int] = rest_field(visibility=["read"]) + """Quota of the specified resource type.""" + + +class ResponseBasedOriginErrorDetectionParameters(_Model): # pylint: disable=name-too-long + """The JSON object that contains the properties to determine origin health using real + requests/responses. + + :ivar response_based_detected_error_types: Type of response errors for real user requests for + which origin will be deemed unhealthy. Known values are: "None", "TcpErrorsOnly", and + "TcpAndHttpErrors". + :vartype response_based_detected_error_types: str or + ~azure.mgmt.cdn.models.ResponseBasedDetectedErrorTypes + :ivar response_based_failover_threshold_percentage: The percentage of failed requests in the + sample where failover should trigger. + :vartype response_based_failover_threshold_percentage: int + :ivar http_error_ranges: The list of Http status code ranges that are considered as server + errors for origin and it is marked as unhealthy. + :vartype http_error_ranges: list[~azure.mgmt.cdn.models.HttpErrorRangeParameters] + """ + + response_based_detected_error_types: Optional[Union[str, "_models.ResponseBasedDetectedErrorTypes"]] = rest_field( + name="responseBasedDetectedErrorTypes", visibility=["read", "create", "update", "delete", "query"] + ) + """Type of response errors for real user requests for which origin will be deemed unhealthy. Known + values are: \"None\", \"TcpErrorsOnly\", and \"TcpAndHttpErrors\".""" + response_based_failover_threshold_percentage: Optional[int] = rest_field( + name="responseBasedFailoverThresholdPercentage", visibility=["read", "create", "update", "delete", "query"] + ) + """The percentage of failed requests in the sample where failover should trigger.""" + http_error_ranges: Optional[list["_models.HttpErrorRangeParameters"]] = rest_field( + name="httpErrorRanges", visibility=["read", "create", "update", "delete", "query"] + ) + """The list of Http status code ranges that are considered as server errors for origin and it is + marked as unhealthy.""" + + @overload + def __init__( + self, + *, + response_based_detected_error_types: Optional[Union[str, "_models.ResponseBasedDetectedErrorTypes"]] = None, + response_based_failover_threshold_percentage: Optional[int] = None, + http_error_ranges: Optional[list["_models.HttpErrorRangeParameters"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class Route(ProxyResource): + """Friendly Routes name mapping to the any Routes or secret related information. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.cdn.models.SystemData + :ivar properties: The JSON object that contains the properties of the Routes to create. + :vartype properties: ~azure.mgmt.cdn.models.RouteProperties + """ + + properties: Optional["_models.RouteProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The JSON object that contains the properties of the Routes to create.""" + + __flattened_items = [ + "endpoint_name", + "custom_domains", + "origin_group", + "origin_path", + "rule_sets", + "supported_protocols", + "patterns_to_match", + "cache_configuration", + "forwarding_protocol", + "link_to_default_domain", + "https_redirect", + "enabled_state", + "provisioning_state", + "deployment_status", + ] + + @overload + def __init__( + self, + *, + properties: Optional["_models.RouteProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class RouteConfigurationOverrideActionParameters( + DeliveryRuleActionParameters, discriminator="DeliveryRuleRouteConfigurationOverrideActionParameters" +): # pylint: disable=name-too-long + """Defines the parameters for the route configuration override action. + + :ivar origin_group_override: A reference to the origin group override configuration. Leave + empty to use the default origin group on route. + :vartype origin_group_override: ~azure.mgmt.cdn.models.OriginGroupOverride + :ivar cache_configuration: The caching configuration associated with this rule. To disable + caching, do not provide a cacheConfiguration object. + :vartype cache_configuration: ~azure.mgmt.cdn.models.CacheConfiguration + :ivar type_name: Required. DELIVERY_RULE_ROUTE_CONFIGURATION_OVERRIDE_ACTION_PARAMETERS. + :vartype type_name: str or + ~azure.mgmt.cdn.models.DELIVERY_RULE_ROUTE_CONFIGURATION_OVERRIDE_ACTION_PARAMETERS + """ + + origin_group_override: Optional["_models.OriginGroupOverride"] = rest_field( + name="originGroupOverride", visibility=["read", "create", "update", "delete", "query"] + ) + """A reference to the origin group override configuration. Leave empty to use the default origin + group on route.""" + cache_configuration: Optional["_models.CacheConfiguration"] = rest_field( + name="cacheConfiguration", visibility=["read", "create", "update", "delete", "query"] + ) + """The caching configuration associated with this rule. To disable caching, do not provide a + cacheConfiguration object.""" + type_name: Literal[DeliveryRuleActionParametersType.DELIVERY_RULE_ROUTE_CONFIGURATION_OVERRIDE_ACTION_PARAMETERS] = rest_discriminator(name="typeName", visibility=["read", "create", "update", "delete", "query"]) # type: ignore + """Required. DELIVERY_RULE_ROUTE_CONFIGURATION_OVERRIDE_ACTION_PARAMETERS.""" + + @overload + def __init__( + self, + *, + origin_group_override: Optional["_models.OriginGroupOverride"] = None, + cache_configuration: Optional["_models.CacheConfiguration"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + self.type_name = DeliveryRuleActionParametersType.DELIVERY_RULE_ROUTE_CONFIGURATION_OVERRIDE_ACTION_PARAMETERS # type: ignore + + +class RouteProperties(_Model): + """The JSON object that contains the properties of the Routes to create. + + :ivar endpoint_name: The name of the endpoint which holds the route. + :vartype endpoint_name: str + :ivar custom_domains: Domains referenced by this endpoint. + :vartype custom_domains: list[~azure.mgmt.cdn.models.ActivatedResourceReference] + :ivar origin_group: A reference to the origin group. + :vartype origin_group: ~azure.mgmt.cdn.models.ResourceReference + :ivar origin_path: A directory path on the origin that AzureFrontDoor can use to retrieve + content from, e.g. contoso.cloudapp.net/originpath. + :vartype origin_path: str + :ivar rule_sets: rule sets referenced by this endpoint. + :vartype rule_sets: list[~azure.mgmt.cdn.models.ResourceReference] + :ivar supported_protocols: List of supported protocols for this route. + :vartype supported_protocols: list[str or ~azure.mgmt.cdn.models.AFDEndpointProtocols] + :ivar patterns_to_match: The route patterns of the rule. + :vartype patterns_to_match: list[str] + :ivar cache_configuration: The caching configuration for this route. To disable caching, do not + provide a cacheConfiguration object. + :vartype cache_configuration: ~azure.mgmt.cdn.models.AfdRouteCacheConfiguration + :ivar forwarding_protocol: Protocol this rule will use when forwarding traffic to backends. + Known values are: "HttpOnly", "HttpsOnly", and "MatchRequest". + :vartype forwarding_protocol: str or ~azure.mgmt.cdn.models.ForwardingProtocol + :ivar link_to_default_domain: whether this route will be linked to the default endpoint domain. + Known values are: "Enabled" and "Disabled". + :vartype link_to_default_domain: str or ~azure.mgmt.cdn.models.LinkToDefaultDomain + :ivar https_redirect: Whether to automatically redirect HTTP traffic to HTTPS traffic. Note + that this is a easy way to set up this rule and it will be the first rule that gets executed. + Known values are: "Enabled" and "Disabled". + :vartype https_redirect: str or ~azure.mgmt.cdn.models.HttpsRedirect + :ivar enabled_state: Whether to enable use of this rule. Permitted values are 'Enabled' or + 'Disabled'. Known values are: "Enabled" and "Disabled". + :vartype enabled_state: str or ~azure.mgmt.cdn.models.EnabledState + :ivar provisioning_state: Provisioning status. Known values are: "Succeeded", "Failed", + "Updating", "Deleting", and "Creating". + :vartype provisioning_state: str or ~azure.mgmt.cdn.models.AfdProvisioningState + :ivar deployment_status: Known values are: "NotStarted", "InProgress", "Succeeded", and + "Failed". + :vartype deployment_status: str or ~azure.mgmt.cdn.models.DeploymentStatus + """ + + endpoint_name: Optional[str] = rest_field(name="endpointName", visibility=["read"]) + """The name of the endpoint which holds the route.""" + custom_domains: Optional[list["_models.ActivatedResourceReference"]] = rest_field( + name="customDomains", visibility=["read", "create", "update", "delete", "query"] + ) + """Domains referenced by this endpoint.""" + origin_group: Optional["_models.ResourceReference"] = rest_field( + name="originGroup", visibility=["read", "create", "update", "delete", "query"] + ) + """A reference to the origin group.""" + origin_path: Optional[str] = rest_field( + name="originPath", visibility=["read", "create", "update", "delete", "query"] + ) + """A directory path on the origin that AzureFrontDoor can use to retrieve content from, e.g. + contoso.cloudapp.net/originpath.""" + rule_sets: Optional[list["_models.ResourceReference"]] = rest_field( + name="ruleSets", visibility=["read", "create", "update", "delete", "query"] + ) + """rule sets referenced by this endpoint.""" + supported_protocols: Optional[list[Union[str, "_models.AFDEndpointProtocols"]]] = rest_field( + name="supportedProtocols", visibility=["read", "create", "update", "delete", "query"] + ) + """List of supported protocols for this route.""" + patterns_to_match: Optional[list[str]] = rest_field( + name="patternsToMatch", visibility=["read", "create", "update", "delete", "query"] + ) + """The route patterns of the rule.""" + cache_configuration: Optional["_models.AfdRouteCacheConfiguration"] = rest_field( + name="cacheConfiguration", visibility=["read", "create", "update", "delete", "query"] + ) + """The caching configuration for this route. To disable caching, do not provide a + cacheConfiguration object.""" + forwarding_protocol: Optional[Union[str, "_models.ForwardingProtocol"]] = rest_field( + name="forwardingProtocol", visibility=["read", "create", "update", "delete", "query"] + ) + """Protocol this rule will use when forwarding traffic to backends. Known values are: + \"HttpOnly\", \"HttpsOnly\", and \"MatchRequest\".""" + link_to_default_domain: Optional[Union[str, "_models.LinkToDefaultDomain"]] = rest_field( + name="linkToDefaultDomain", visibility=["read", "create", "update", "delete", "query"] + ) + """whether this route will be linked to the default endpoint domain. Known values are: \"Enabled\" + and \"Disabled\".""" + https_redirect: Optional[Union[str, "_models.HttpsRedirect"]] = rest_field( + name="httpsRedirect", visibility=["read", "create", "update", "delete", "query"] + ) + """Whether to automatically redirect HTTP traffic to HTTPS traffic. Note that this is a easy way + to set up this rule and it will be the first rule that gets executed. Known values are: + \"Enabled\" and \"Disabled\".""" + enabled_state: Optional[Union[str, "_models.EnabledState"]] = rest_field( + name="enabledState", visibility=["read", "create", "update", "delete", "query"] + ) + """Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled'. Known values + are: \"Enabled\" and \"Disabled\".""" + provisioning_state: Optional[Union[str, "_models.AfdProvisioningState"]] = rest_field( + name="provisioningState", visibility=["read"] + ) + """Provisioning status. Known values are: \"Succeeded\", \"Failed\", \"Updating\", \"Deleting\", + and \"Creating\".""" + deployment_status: Optional[Union[str, "_models.DeploymentStatus"]] = rest_field( + name="deploymentStatus", visibility=["read"] + ) + """Known values are: \"NotStarted\", \"InProgress\", \"Succeeded\", and \"Failed\".""" + + @overload + def __init__( + self, + *, + custom_domains: Optional[list["_models.ActivatedResourceReference"]] = None, + origin_group: Optional["_models.ResourceReference"] = None, + origin_path: Optional[str] = None, + rule_sets: Optional[list["_models.ResourceReference"]] = None, + supported_protocols: Optional[list[Union[str, "_models.AFDEndpointProtocols"]]] = None, + patterns_to_match: Optional[list[str]] = None, + cache_configuration: Optional["_models.AfdRouteCacheConfiguration"] = None, + forwarding_protocol: Optional[Union[str, "_models.ForwardingProtocol"]] = None, + link_to_default_domain: Optional[Union[str, "_models.LinkToDefaultDomain"]] = None, + https_redirect: Optional[Union[str, "_models.HttpsRedirect"]] = None, + enabled_state: Optional[Union[str, "_models.EnabledState"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class RouteUpdateParameters(_Model): + """The domain JSON object required for domain creation or update. + + :ivar properties: The JSON object that contains the properties of the domain to create. + :vartype properties: ~azure.mgmt.cdn.models.RouteUpdatePropertiesParameters + """ + + properties: Optional["_models.RouteUpdatePropertiesParameters"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The JSON object that contains the properties of the domain to create.""" + + __flattened_items = [ + "endpoint_name", + "custom_domains", + "origin_group", + "origin_path", + "rule_sets", + "supported_protocols", + "patterns_to_match", + "cache_configuration", + "forwarding_protocol", + "link_to_default_domain", + "https_redirect", + "enabled_state", + ] + + @overload + def __init__( + self, + *, + properties: Optional["_models.RouteUpdatePropertiesParameters"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class RouteUpdatePropertiesParameters(_Model): + """The JSON object that contains the properties of the domain to create. + + :ivar endpoint_name: The name of the endpoint which holds the route. + :vartype endpoint_name: str + :ivar custom_domains: Domains referenced by this endpoint. + :vartype custom_domains: list[~azure.mgmt.cdn.models.ActivatedResourceReference] + :ivar origin_group: A reference to the origin group. + :vartype origin_group: ~azure.mgmt.cdn.models.ResourceReference + :ivar origin_path: A directory path on the origin that AzureFrontDoor can use to retrieve + content from, e.g. contoso.cloudapp.net/originpath. + :vartype origin_path: str + :ivar rule_sets: rule sets referenced by this endpoint. + :vartype rule_sets: list[~azure.mgmt.cdn.models.ResourceReference] + :ivar supported_protocols: List of supported protocols for this route. + :vartype supported_protocols: list[str or ~azure.mgmt.cdn.models.AFDEndpointProtocols] + :ivar patterns_to_match: The route patterns of the rule. + :vartype patterns_to_match: list[str] + :ivar cache_configuration: The caching configuration for this route. To disable caching, do not + provide a cacheConfiguration object. + :vartype cache_configuration: ~azure.mgmt.cdn.models.AfdRouteCacheConfiguration + :ivar forwarding_protocol: Protocol this rule will use when forwarding traffic to backends. + Known values are: "HttpOnly", "HttpsOnly", and "MatchRequest". + :vartype forwarding_protocol: str or ~azure.mgmt.cdn.models.ForwardingProtocol + :ivar link_to_default_domain: whether this route will be linked to the default endpoint domain. + Known values are: "Enabled" and "Disabled". + :vartype link_to_default_domain: str or ~azure.mgmt.cdn.models.LinkToDefaultDomain + :ivar https_redirect: Whether to automatically redirect HTTP traffic to HTTPS traffic. Note + that this is a easy way to set up this rule and it will be the first rule that gets executed. + Known values are: "Enabled" and "Disabled". + :vartype https_redirect: str or ~azure.mgmt.cdn.models.HttpsRedirect + :ivar enabled_state: Whether to enable use of this rule. Permitted values are 'Enabled' or + 'Disabled'. Known values are: "Enabled" and "Disabled". + :vartype enabled_state: str or ~azure.mgmt.cdn.models.EnabledState + """ + + endpoint_name: Optional[str] = rest_field(name="endpointName", visibility=["read"]) + """The name of the endpoint which holds the route.""" + custom_domains: Optional[list["_models.ActivatedResourceReference"]] = rest_field( + name="customDomains", visibility=["read", "create", "update", "delete", "query"] + ) + """Domains referenced by this endpoint.""" + origin_group: Optional["_models.ResourceReference"] = rest_field( + name="originGroup", visibility=["read", "create", "update", "delete", "query"] + ) + """A reference to the origin group.""" + origin_path: Optional[str] = rest_field( + name="originPath", visibility=["read", "create", "update", "delete", "query"] + ) + """A directory path on the origin that AzureFrontDoor can use to retrieve content from, e.g. + contoso.cloudapp.net/originpath.""" + rule_sets: Optional[list["_models.ResourceReference"]] = rest_field( + name="ruleSets", visibility=["read", "create", "update", "delete", "query"] + ) + """rule sets referenced by this endpoint.""" + supported_protocols: Optional[list[Union[str, "_models.AFDEndpointProtocols"]]] = rest_field( + name="supportedProtocols", visibility=["read", "create", "update", "delete", "query"] + ) + """List of supported protocols for this route.""" + patterns_to_match: Optional[list[str]] = rest_field( + name="patternsToMatch", visibility=["read", "create", "update", "delete", "query"] + ) + """The route patterns of the rule.""" + cache_configuration: Optional["_models.AfdRouteCacheConfiguration"] = rest_field( + name="cacheConfiguration", visibility=["read", "create", "update", "delete", "query"] + ) + """The caching configuration for this route. To disable caching, do not provide a + cacheConfiguration object.""" + forwarding_protocol: Optional[Union[str, "_models.ForwardingProtocol"]] = rest_field( + name="forwardingProtocol", visibility=["read", "create", "update", "delete", "query"] + ) + """Protocol this rule will use when forwarding traffic to backends. Known values are: + \"HttpOnly\", \"HttpsOnly\", and \"MatchRequest\".""" + link_to_default_domain: Optional[Union[str, "_models.LinkToDefaultDomain"]] = rest_field( + name="linkToDefaultDomain", visibility=["read", "create", "update", "delete", "query"] + ) + """whether this route will be linked to the default endpoint domain. Known values are: \"Enabled\" + and \"Disabled\".""" + https_redirect: Optional[Union[str, "_models.HttpsRedirect"]] = rest_field( + name="httpsRedirect", visibility=["read", "create", "update", "delete", "query"] + ) + """Whether to automatically redirect HTTP traffic to HTTPS traffic. Note that this is a easy way + to set up this rule and it will be the first rule that gets executed. Known values are: + \"Enabled\" and \"Disabled\".""" + enabled_state: Optional[Union[str, "_models.EnabledState"]] = rest_field( + name="enabledState", visibility=["read", "create", "update", "delete", "query"] + ) + """Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled'. Known values + are: \"Enabled\" and \"Disabled\".""" + + @overload + def __init__( + self, + *, + custom_domains: Optional[list["_models.ActivatedResourceReference"]] = None, + origin_group: Optional["_models.ResourceReference"] = None, + origin_path: Optional[str] = None, + rule_sets: Optional[list["_models.ResourceReference"]] = None, + supported_protocols: Optional[list[Union[str, "_models.AFDEndpointProtocols"]]] = None, + patterns_to_match: Optional[list[str]] = None, + cache_configuration: Optional["_models.AfdRouteCacheConfiguration"] = None, + forwarding_protocol: Optional[Union[str, "_models.ForwardingProtocol"]] = None, + link_to_default_domain: Optional[Union[str, "_models.LinkToDefaultDomain"]] = None, + https_redirect: Optional[Union[str, "_models.HttpsRedirect"]] = None, + enabled_state: Optional[Union[str, "_models.EnabledState"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class Rule(ProxyResource): + """Friendly Rules name mapping to the any Rules or secret related information. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.cdn.models.SystemData + :ivar properties: The JSON object that contains the properties of the Rules to create. + :vartype properties: ~azure.mgmt.cdn.models.RuleProperties + """ + + properties: Optional["_models.RuleProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The JSON object that contains the properties of the Rules to create.""" + + __flattened_items = [ + "rule_set_name", + "order", + "conditions", + "actions", + "match_processing_behavior", + "provisioning_state", + "deployment_status", + ] + + @overload + def __init__( + self, + *, + properties: Optional["_models.RuleProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class RuleProperties(_Model): + """The JSON object that contains the properties of the Rules to create. + + :ivar rule_set_name: The name of the rule set containing the rule. + :vartype rule_set_name: str + :ivar order: The order in which the rules are applied for the endpoint. Possible values + {0,1,2,3,………}. A rule with a lesser order will be applied before a rule with a greater order. + Rule with order 0 is a special rule. It does not require any condition and actions listed in it + will always be applied. + :vartype order: int + :ivar conditions: A list of conditions that must be matched for the actions to be executed. + :vartype conditions: list[~azure.mgmt.cdn.models.DeliveryRuleCondition] + :ivar actions: A list of actions that are executed when all the conditions of a rule are + satisfied. + :vartype actions: list[~azure.mgmt.cdn.models.DeliveryRuleAction] + :ivar match_processing_behavior: If this rule is a match should the rules engine continue + running the remaining rules or stop. If not present, defaults to Continue. Known values are: + "Continue" and "Stop". + :vartype match_processing_behavior: str or ~azure.mgmt.cdn.models.MatchProcessingBehavior + :ivar provisioning_state: Provisioning status. Known values are: "Succeeded", "Failed", + "Updating", "Deleting", and "Creating". + :vartype provisioning_state: str or ~azure.mgmt.cdn.models.AfdProvisioningState + :ivar deployment_status: Known values are: "NotStarted", "InProgress", "Succeeded", and + "Failed". + :vartype deployment_status: str or ~azure.mgmt.cdn.models.DeploymentStatus + """ + + rule_set_name: Optional[str] = rest_field(name="ruleSetName", visibility=["read"]) + """The name of the rule set containing the rule.""" + order: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The order in which the rules are applied for the endpoint. Possible values {0,1,2,3,………}. A + rule with a lesser order will be applied before a rule with a greater order. Rule with order 0 + is a special rule. It does not require any condition and actions listed in it will always be + applied.""" + conditions: Optional[list["_models.DeliveryRuleCondition"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """A list of conditions that must be matched for the actions to be executed.""" + actions: Optional[list["_models.DeliveryRuleAction"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """A list of actions that are executed when all the conditions of a rule are satisfied.""" + match_processing_behavior: Optional[Union[str, "_models.MatchProcessingBehavior"]] = rest_field( + name="matchProcessingBehavior", visibility=["read", "create", "update", "delete", "query"] + ) + """If this rule is a match should the rules engine continue running the remaining rules or stop. + If not present, defaults to Continue. Known values are: \"Continue\" and \"Stop\".""" + provisioning_state: Optional[Union[str, "_models.AfdProvisioningState"]] = rest_field( + name="provisioningState", visibility=["read"] + ) + """Provisioning status. Known values are: \"Succeeded\", \"Failed\", \"Updating\", \"Deleting\", + and \"Creating\".""" + deployment_status: Optional[Union[str, "_models.DeploymentStatus"]] = rest_field( + name="deploymentStatus", visibility=["read"] + ) + """Known values are: \"NotStarted\", \"InProgress\", \"Succeeded\", and \"Failed\".""" + + @overload + def __init__( + self, + *, + order: Optional[int] = None, + conditions: Optional[list["_models.DeliveryRuleCondition"]] = None, + actions: Optional[list["_models.DeliveryRuleAction"]] = None, + match_processing_behavior: Optional[Union[str, "_models.MatchProcessingBehavior"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class RuleSet(ProxyResource): + """Friendly RuleSet name mapping to the any RuleSet or secret related information. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.cdn.models.SystemData + :ivar properties: The JSON object that contains the properties of the Rule Set to create. + :vartype properties: ~azure.mgmt.cdn.models.RuleSetProperties + """ + + properties: Optional["_models.RuleSetProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The JSON object that contains the properties of the Rule Set to create.""" + + __flattened_items = ["provisioning_state", "deployment_status", "profile_name"] + + @overload + def __init__( + self, + *, + properties: Optional["_models.RuleSetProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class RuleSetProperties(AFDStateProperties): + """The JSON object that contains the properties of the Rule Set to create. + + :ivar provisioning_state: Provisioning status. Known values are: "Succeeded", "Failed", + "Updating", "Deleting", and "Creating". + :vartype provisioning_state: str or ~azure.mgmt.cdn.models.AfdProvisioningState + :ivar deployment_status: Known values are: "NotStarted", "InProgress", "Succeeded", and + "Failed". + :vartype deployment_status: str or ~azure.mgmt.cdn.models.DeploymentStatus + :ivar profile_name: The name of the profile which holds the rule set. + :vartype profile_name: str + """ + + profile_name: Optional[str] = rest_field(name="profileName", visibility=["read"]) + """The name of the profile which holds the rule set.""" + + +class RuleUpdateParameters(_Model): + """The domain JSON object required for domain creation or update. + + :ivar properties: The JSON object that contains the properties of the rule to update. + :vartype properties: ~azure.mgmt.cdn.models.RuleUpdatePropertiesParameters + """ + + properties: Optional["_models.RuleUpdatePropertiesParameters"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The JSON object that contains the properties of the rule to update.""" + + __flattened_items = ["rule_set_name", "order", "conditions", "actions", "match_processing_behavior"] + + @overload + def __init__( + self, + *, + properties: Optional["_models.RuleUpdatePropertiesParameters"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class RuleUpdatePropertiesParameters(_Model): + """The JSON object that contains the properties of the rule to update. + + :ivar rule_set_name: The name of the rule set containing the rule. + :vartype rule_set_name: str + :ivar order: The order in which the rules are applied for the endpoint. Possible values + {0,1,2,3,………}. A rule with a lesser order will be applied before a rule with a greater order. + Rule with order 0 is a special rule. It does not require any condition and actions listed in it + will always be applied. + :vartype order: int + :ivar conditions: A list of conditions that must be matched for the actions to be executed. + :vartype conditions: list[~azure.mgmt.cdn.models.DeliveryRuleCondition] + :ivar actions: A list of actions that are executed when all the conditions of a rule are + satisfied. + :vartype actions: list[~azure.mgmt.cdn.models.DeliveryRuleAction] + :ivar match_processing_behavior: If this rule is a match should the rules engine continue + running the remaining rules or stop. If not present, defaults to Continue. Known values are: + "Continue" and "Stop". + :vartype match_processing_behavior: str or ~azure.mgmt.cdn.models.MatchProcessingBehavior + """ + + rule_set_name: Optional[str] = rest_field(name="ruleSetName", visibility=["read"]) + """The name of the rule set containing the rule.""" + order: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The order in which the rules are applied for the endpoint. Possible values {0,1,2,3,………}. A + rule with a lesser order will be applied before a rule with a greater order. Rule with order 0 + is a special rule. It does not require any condition and actions listed in it will always be + applied.""" + conditions: Optional[list["_models.DeliveryRuleCondition"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """A list of conditions that must be matched for the actions to be executed.""" + actions: Optional[list["_models.DeliveryRuleAction"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """A list of actions that are executed when all the conditions of a rule are satisfied.""" + match_processing_behavior: Optional[Union[str, "_models.MatchProcessingBehavior"]] = rest_field( + name="matchProcessingBehavior", visibility=["read", "create", "update", "delete", "query"] + ) + """If this rule is a match should the rules engine continue running the remaining rules or stop. + If not present, defaults to Continue. Known values are: \"Continue\" and \"Stop\".""" + + @overload + def __init__( + self, + *, + order: Optional[int] = None, + conditions: Optional[list["_models.DeliveryRuleCondition"]] = None, + actions: Optional[list["_models.DeliveryRuleAction"]] = None, + match_processing_behavior: Optional[Union[str, "_models.MatchProcessingBehavior"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class Secret(ProxyResource): + """Friendly Secret name mapping to the any Secret or secret related information. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.cdn.models.SystemData + :ivar properties: The JSON object that contains the properties of the Secret to create. + :vartype properties: ~azure.mgmt.cdn.models.SecretProperties + """ + + properties: Optional["_models.SecretProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The JSON object that contains the properties of the Secret to create.""" + + __flattened_items = ["provisioning_state", "deployment_status", "profile_name", "parameters"] + + @overload + def __init__( + self, + *, + properties: Optional["_models.SecretProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class SecretProperties(AFDStateProperties): + """The JSON object that contains the properties of the Secret to create. + + :ivar provisioning_state: Provisioning status. Known values are: "Succeeded", "Failed", + "Updating", "Deleting", and "Creating". + :vartype provisioning_state: str or ~azure.mgmt.cdn.models.AfdProvisioningState + :ivar deployment_status: Known values are: "NotStarted", "InProgress", "Succeeded", and + "Failed". + :vartype deployment_status: str or ~azure.mgmt.cdn.models.DeploymentStatus + :ivar profile_name: The name of the profile which holds the secret. + :vartype profile_name: str + :ivar parameters: object which contains secret parameters. + :vartype parameters: ~azure.mgmt.cdn.models.SecretParameters + """ + + profile_name: Optional[str] = rest_field(name="profileName", visibility=["read"]) + """The name of the profile which holds the secret.""" + parameters: Optional["_models.SecretParameters"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """object which contains secret parameters.""" + + @overload + def __init__( + self, + *, + parameters: Optional["_models.SecretParameters"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class SecurityPolicy(ProxyResource): + """SecurityPolicy association for AzureFrontDoor profile. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.cdn.models.SystemData + :ivar properties: The json object that contains properties required to create a security + policy. + :vartype properties: ~azure.mgmt.cdn.models.SecurityPolicyProperties + """ + + properties: Optional["_models.SecurityPolicyProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The json object that contains properties required to create a security policy.""" + + __flattened_items = ["provisioning_state", "deployment_status", "profile_name", "parameters"] + + @overload + def __init__( + self, + *, + properties: Optional["_models.SecurityPolicyProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class SecurityPolicyProperties(AFDStateProperties): + """The json object that contains properties required to create a security policy. + + :ivar provisioning_state: Provisioning status. Known values are: "Succeeded", "Failed", + "Updating", "Deleting", and "Creating". + :vartype provisioning_state: str or ~azure.mgmt.cdn.models.AfdProvisioningState + :ivar deployment_status: Known values are: "NotStarted", "InProgress", "Succeeded", and + "Failed". + :vartype deployment_status: str or ~azure.mgmt.cdn.models.DeploymentStatus + :ivar profile_name: The name of the profile which holds the security policy. + :vartype profile_name: str + :ivar parameters: object which contains security policy parameters. + :vartype parameters: ~azure.mgmt.cdn.models.SecurityPolicyPropertiesParameters + """ + + profile_name: Optional[str] = rest_field(name="profileName", visibility=["read"]) + """The name of the profile which holds the security policy.""" + parameters: Optional["_models.SecurityPolicyPropertiesParameters"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """object which contains security policy parameters.""" + + @overload + def __init__( + self, + *, + parameters: Optional["_models.SecurityPolicyPropertiesParameters"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class SecurityPolicyPropertiesParameters(_Model): + """The json object containing security policy parameters. + + You probably want to use the sub-classes and not this class directly. Known sub-classes are: + SecurityPolicyWebApplicationFirewallParameters + + :ivar type: The type of the Security policy to create. Required. "WebApplicationFirewall" + :vartype type: str or ~azure.mgmt.cdn.models.SecurityPolicyType + """ + + __mapping__: dict[str, _Model] = {} + type: str = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"]) + """The type of the Security policy to create. Required. \"WebApplicationFirewall\"""" + + @overload + def __init__( + self, + *, + type: str, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class SecurityPolicyUpdateParameters(_Model): + """The JSON object containing security policy update parameters. + + :ivar properties: The json object that contains properties required to update a security + policy. + :vartype properties: ~azure.mgmt.cdn.models.SecurityPolicyUpdateProperties + """ + + properties: Optional["_models.SecurityPolicyUpdateProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The json object that contains properties required to update a security policy.""" + + __flattened_items = ["parameters"] + + @overload + def __init__( + self, + *, + properties: Optional["_models.SecurityPolicyUpdateProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class SecurityPolicyUpdateProperties(_Model): + """The json object that contains properties required to update a security policy. + + :ivar parameters: object which contains security policy parameters. + :vartype parameters: ~azure.mgmt.cdn.models.SecurityPolicyPropertiesParameters + """ + + parameters: Optional["_models.SecurityPolicyPropertiesParameters"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """object which contains security policy parameters.""" + + @overload + def __init__( + self, + *, + parameters: Optional["_models.SecurityPolicyPropertiesParameters"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class SecurityPolicyWebApplicationFirewallAssociation(_Model): # pylint: disable=name-too-long + """settings for security policy patterns to match. + + :ivar domains: List of domains. + :vartype domains: list[~azure.mgmt.cdn.models.ActivatedResourceReference] + :ivar patterns_to_match: List of paths. + :vartype patterns_to_match: list[str] + """ + + domains: Optional[list["_models.ActivatedResourceReference"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """List of domains.""" + patterns_to_match: Optional[list[str]] = rest_field( + name="patternsToMatch", visibility=["read", "create", "update", "delete", "query"] + ) + """List of paths.""" + + @overload + def __init__( + self, + *, + domains: Optional[list["_models.ActivatedResourceReference"]] = None, + patterns_to_match: Optional[list[str]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class SecurityPolicyWebApplicationFirewallParameters( + SecurityPolicyPropertiesParameters, discriminator="WebApplicationFirewall" +): # pylint: disable=name-too-long + """The json object containing security policy waf parameters. + + :ivar waf_policy: Resource ID. + :vartype waf_policy: ~azure.mgmt.cdn.models.ResourceReference + :ivar associations: Waf associations. + :vartype associations: + list[~azure.mgmt.cdn.models.SecurityPolicyWebApplicationFirewallAssociation] + :ivar type: The type of the Security policy to create. Required. WEB_APPLICATION_FIREWALL. + :vartype type: str or ~azure.mgmt.cdn.models.WEB_APPLICATION_FIREWALL + """ + + waf_policy: Optional["_models.ResourceReference"] = rest_field( + name="wafPolicy", visibility=["read", "create", "update", "delete", "query"] + ) + """Resource ID.""" + associations: Optional[list["_models.SecurityPolicyWebApplicationFirewallAssociation"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Waf associations.""" + type: Literal[SecurityPolicyType.WEB_APPLICATION_FIREWALL] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"]) # type: ignore + """The type of the Security policy to create. Required. WEB_APPLICATION_FIREWALL.""" + + @overload + def __init__( + self, + *, + waf_policy: Optional["_models.ResourceReference"] = None, + associations: Optional[list["_models.SecurityPolicyWebApplicationFirewallAssociation"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + self.type = SecurityPolicyType.WEB_APPLICATION_FIREWALL # type: ignore + + +class ServerPortMatchConditionParameters( + DeliveryRuleConditionParameters, discriminator="DeliveryRuleServerPortConditionParameters" +): + """Defines the parameters for ServerPort match conditions. + + :ivar operator: Describes operator to be matched. Required. Known values are: "Any", "Equal", + "Contains", "BeginsWith", "EndsWith", "LessThan", "LessThanOrEqual", "GreaterThan", + "GreaterThanOrEqual", and "RegEx". + :vartype operator: str or ~azure.mgmt.cdn.models.ServerPortOperator + :ivar negate_condition: Describes if this is negate condition or not. + :vartype negate_condition: bool + :ivar match_values: The match value for the condition of the delivery rule. + :vartype match_values: list[str] + :ivar transforms: List of transforms. + :vartype transforms: list[str or ~azure.mgmt.cdn.models.Transform] + :ivar type_name: Required. DELIVERY_RULE_SERVER_PORT_CONDITION_PARAMETERS. + :vartype type_name: str or + ~azure.mgmt.cdn.models.DELIVERY_RULE_SERVER_PORT_CONDITION_PARAMETERS + """ + + operator: Union[str, "_models.ServerPortOperator"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Describes operator to be matched. Required. Known values are: \"Any\", \"Equal\", \"Contains\", + \"BeginsWith\", \"EndsWith\", \"LessThan\", \"LessThanOrEqual\", \"GreaterThan\", + \"GreaterThanOrEqual\", and \"RegEx\".""" + negate_condition: Optional[bool] = rest_field( + name="negateCondition", visibility=["read", "create", "update", "delete", "query"] + ) + """Describes if this is negate condition or not.""" + match_values: Optional[list[str]] = rest_field( + name="matchValues", visibility=["read", "create", "update", "delete", "query"] + ) + """The match value for the condition of the delivery rule.""" + transforms: Optional[list[Union[str, "_models.Transform"]]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """List of transforms.""" + type_name: Literal[DeliveryRuleConditionParametersType.DELIVERY_RULE_SERVER_PORT_CONDITION_PARAMETERS] = rest_discriminator(name="typeName", visibility=["read", "create", "update", "delete", "query"]) # type: ignore + """Required. DELIVERY_RULE_SERVER_PORT_CONDITION_PARAMETERS.""" + + @overload + def __init__( + self, + *, + operator: Union[str, "_models.ServerPortOperator"], + negate_condition: Optional[bool] = None, + match_values: Optional[list[str]] = None, + transforms: Optional[list[Union[str, "_models.Transform"]]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + self.type_name = DeliveryRuleConditionParametersType.DELIVERY_RULE_SERVER_PORT_CONDITION_PARAMETERS # type: ignore + + +class ServiceSpecification(_Model): + """One property of operation, include log specifications. + + :ivar log_specifications: Log specifications of operation. + :vartype log_specifications: list[~azure.mgmt.cdn.models.LogSpecification] + :ivar metric_specifications: Metric specifications of operation. + :vartype metric_specifications: list[~azure.mgmt.cdn.models.MetricSpecification] + """ + + log_specifications: Optional[list["_models.LogSpecification"]] = rest_field( + name="logSpecifications", visibility=["read", "create", "update", "delete", "query"] + ) + """Log specifications of operation.""" + metric_specifications: Optional[list["_models.MetricSpecification"]] = rest_field( + name="metricSpecifications", visibility=["read", "create", "update", "delete", "query"] + ) + """Metric specifications of operation.""" + + @overload + def __init__( + self, + *, + log_specifications: Optional[list["_models.LogSpecification"]] = None, + metric_specifications: Optional[list["_models.MetricSpecification"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class SharedPrivateLinkResourceProperties(_Model): + """Describes the properties of an existing Shared Private Link Resource to use when connecting to + a private origin. + + :ivar private_link: The resource id of the resource the shared private link resource is for. + :vartype private_link: ~azure.mgmt.cdn.models.ResourceReference + :ivar private_link_location: The location of the shared private link resource. + :vartype private_link_location: str + :ivar group_id: The group id from the provider of resource the shared private link resource is + for. + :vartype group_id: str + :ivar request_message: The request message for requesting approval of the shared private link + resource. + :vartype request_message: str + :ivar status: Status of the shared private link resource. Can be Pending, Approved, Rejected, + Disconnected, or Timeout. Known values are: "Pending", "Approved", "Rejected", "Disconnected", + and "Timeout". + :vartype status: str or ~azure.mgmt.cdn.models.SharedPrivateLinkResourceStatus + """ + + private_link: Optional["_models.ResourceReference"] = rest_field( + name="privateLink", visibility=["read", "create", "update", "delete", "query"] + ) + """The resource id of the resource the shared private link resource is for.""" + private_link_location: Optional[str] = rest_field( + name="privateLinkLocation", visibility=["read", "create", "update", "delete", "query"] + ) + """The location of the shared private link resource.""" + group_id: Optional[str] = rest_field(name="groupId", visibility=["read", "create", "update", "delete", "query"]) + """The group id from the provider of resource the shared private link resource is for.""" + request_message: Optional[str] = rest_field( + name="requestMessage", visibility=["read", "create", "update", "delete", "query"] + ) + """The request message for requesting approval of the shared private link resource.""" + status: Optional[Union[str, "_models.SharedPrivateLinkResourceStatus"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Status of the shared private link resource. Can be Pending, Approved, Rejected, Disconnected, + or Timeout. Known values are: \"Pending\", \"Approved\", \"Rejected\", \"Disconnected\", and + \"Timeout\".""" + + @overload + def __init__( + self, + *, + private_link: Optional["_models.ResourceReference"] = None, + private_link_location: Optional[str] = None, + group_id: Optional[str] = None, + request_message: Optional[str] = None, + status: Optional[Union[str, "_models.SharedPrivateLinkResourceStatus"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class Sku(_Model): + """Standard_Verizon = The SKU name for a Standard Verizon CDN profile. Premium_Verizon = The SKU + name for a Premium Verizon CDN profile. Custom_Verizon = The SKU name for a Custom Verizon CDN + profile. Standard_Akamai = The SKU name for an Akamai CDN profile. Standard_ChinaCdn = The SKU + name for a China CDN profile for VOD, Web and download scenarios using GB based billing model. + Standard_Microsoft = The SKU name for a Standard Microsoft CDN profile. Standard_AzureFrontDoor + = The SKU name for an Azure Front Door Standard profile. Premium_AzureFrontDoor = The SKU name + for an Azure Front Door Premium profile. Standard_955BandWidth_ChinaCdn = The SKU name for a + China CDN profile for VOD, Web and download scenarios using 95-5 peak bandwidth billing model. + Standard_AvgBandWidth_ChinaCdn = The SKU name for a China CDN profile for VOD, Web and download + scenarios using monthly average peak bandwidth billing model. StandardPlus_ChinaCdn = The SKU + name for a China CDN profile for live-streaming using GB based billing model. + StandardPlus_955BandWidth_ChinaCdn = The SKU name for a China CDN live-streaming profile using + 95-5 peak bandwidth billing model. StandardPlus_AvgBandWidth_ChinaCdn = The SKU name for a + China CDN live-streaming profile using monthly average peak bandwidth billing model. + + :ivar name: Name of the pricing tier. Known values are: "Standard_Verizon", "Premium_Verizon", + "Custom_Verizon", "Standard_Akamai", "Standard_ChinaCdn", "Standard_Microsoft", + "Standard_AzureFrontDoor", "Premium_AzureFrontDoor", "Standard_955BandWidth_ChinaCdn", + "Standard_AvgBandWidth_ChinaCdn", "StandardPlus_ChinaCdn", + "StandardPlus_955BandWidth_ChinaCdn", and "StandardPlus_AvgBandWidth_ChinaCdn". + :vartype name: str or ~azure.mgmt.cdn.models.SkuName + """ + + name: Optional[Union[str, "_models.SkuName"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Name of the pricing tier. Known values are: \"Standard_Verizon\", \"Premium_Verizon\", + \"Custom_Verizon\", \"Standard_Akamai\", \"Standard_ChinaCdn\", \"Standard_Microsoft\", + \"Standard_AzureFrontDoor\", \"Premium_AzureFrontDoor\", \"Standard_955BandWidth_ChinaCdn\", + \"Standard_AvgBandWidth_ChinaCdn\", \"StandardPlus_ChinaCdn\", + \"StandardPlus_955BandWidth_ChinaCdn\", and \"StandardPlus_AvgBandWidth_ChinaCdn\".""" + + @overload + def __init__( + self, + *, + name: Optional[Union[str, "_models.SkuName"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class SocketAddrMatchConditionParameters( + DeliveryRuleConditionParameters, discriminator="DeliveryRuleSocketAddrConditionParameters" +): + """Defines the parameters for SocketAddress match conditions. + + :ivar operator: Describes operator to be matched. Required. Known values are: "Any" and + "IPMatch". + :vartype operator: str or ~azure.mgmt.cdn.models.SocketAddrOperator + :ivar negate_condition: Describes if this is negate condition or not. + :vartype negate_condition: bool + :ivar match_values: The match value for the condition of the delivery rule. + :vartype match_values: list[str] + :ivar transforms: List of transforms. + :vartype transforms: list[str or ~azure.mgmt.cdn.models.Transform] + :ivar type_name: Required. DELIVERY_RULE_SOCKET_ADDR_CONDITION_PARAMETERS. + :vartype type_name: str or + ~azure.mgmt.cdn.models.DELIVERY_RULE_SOCKET_ADDR_CONDITION_PARAMETERS + """ + + operator: Union[str, "_models.SocketAddrOperator"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Describes operator to be matched. Required. Known values are: \"Any\" and \"IPMatch\".""" + negate_condition: Optional[bool] = rest_field( + name="negateCondition", visibility=["read", "create", "update", "delete", "query"] + ) + """Describes if this is negate condition or not.""" + match_values: Optional[list[str]] = rest_field( + name="matchValues", visibility=["read", "create", "update", "delete", "query"] + ) + """The match value for the condition of the delivery rule.""" + transforms: Optional[list[Union[str, "_models.Transform"]]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """List of transforms.""" + type_name: Literal[DeliveryRuleConditionParametersType.DELIVERY_RULE_SOCKET_ADDR_CONDITION_PARAMETERS] = rest_discriminator(name="typeName", visibility=["read", "create", "update", "delete", "query"]) # type: ignore + """Required. DELIVERY_RULE_SOCKET_ADDR_CONDITION_PARAMETERS.""" + + @overload + def __init__( + self, + *, + operator: Union[str, "_models.SocketAddrOperator"], + negate_condition: Optional[bool] = None, + match_values: Optional[list[str]] = None, + transforms: Optional[list[Union[str, "_models.Transform"]]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + self.type_name = DeliveryRuleConditionParametersType.DELIVERY_RULE_SOCKET_ADDR_CONDITION_PARAMETERS # type: ignore + + +class SslProtocolMatchConditionParameters( + DeliveryRuleConditionParameters, discriminator="DeliveryRuleSslProtocolConditionParameters" +): + """Defines the parameters for SslProtocol match conditions. + + :ivar operator: Describes operator to be matched. Required. "Equal" + :vartype operator: str or ~azure.mgmt.cdn.models.SslProtocolOperator + :ivar negate_condition: Describes if this is negate condition or not. + :vartype negate_condition: bool + :ivar match_values: The match value for the condition of the delivery rule. + :vartype match_values: list[str or ~azure.mgmt.cdn.models.SslProtocol] + :ivar transforms: List of transforms. + :vartype transforms: list[str or ~azure.mgmt.cdn.models.Transform] + :ivar type_name: Required. DELIVERY_RULE_SSL_PROTOCOL_CONDITION_PARAMETERS. + :vartype type_name: str or + ~azure.mgmt.cdn.models.DELIVERY_RULE_SSL_PROTOCOL_CONDITION_PARAMETERS + """ + + operator: Union[str, "_models.SslProtocolOperator"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Describes operator to be matched. Required. \"Equal\"""" + negate_condition: Optional[bool] = rest_field( + name="negateCondition", visibility=["read", "create", "update", "delete", "query"] + ) + """Describes if this is negate condition or not.""" + match_values: Optional[list[Union[str, "_models.SslProtocol"]]] = rest_field( + name="matchValues", visibility=["read", "create", "update", "delete", "query"] + ) + """The match value for the condition of the delivery rule.""" + transforms: Optional[list[Union[str, "_models.Transform"]]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """List of transforms.""" + type_name: Literal[DeliveryRuleConditionParametersType.DELIVERY_RULE_SSL_PROTOCOL_CONDITION_PARAMETERS] = rest_discriminator(name="typeName", visibility=["read", "create", "update", "delete", "query"]) # type: ignore + """Required. DELIVERY_RULE_SSL_PROTOCOL_CONDITION_PARAMETERS.""" + + @overload + def __init__( + self, + *, + operator: Union[str, "_models.SslProtocolOperator"], + negate_condition: Optional[bool] = None, + match_values: Optional[list[Union[str, "_models.SslProtocol"]]] = None, + transforms: Optional[list[Union[str, "_models.Transform"]]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + self.type_name = DeliveryRuleConditionParametersType.DELIVERY_RULE_SSL_PROTOCOL_CONDITION_PARAMETERS # type: ignore + + +class SsoUri(_Model): + """The URI required to login to the supplemental portal from the Azure portal. + + :ivar sso_uri_value: The URI used to login to the supplemental portal. + :vartype sso_uri_value: str + """ + + sso_uri_value: Optional[str] = rest_field(name="ssoUriValue", visibility=["read"]) + """The URI used to login to the supplemental portal.""" + + +class SupportedOptimizationTypesListResult(_Model): + """The result of the GetSupportedOptimizationTypes API. + + :ivar supported_optimization_types: Supported optimization types for a profile. + :vartype supported_optimization_types: list[str or ~azure.mgmt.cdn.models.OptimizationType] + """ + + supported_optimization_types: Optional[list[Union[str, "_models.OptimizationType"]]] = rest_field( + name="supportedOptimizationTypes", visibility=["read"] + ) + """Supported optimization types for a profile.""" + + +class SystemData(_Model): + """Metadata pertaining to creation and last modification of the resource. + + :ivar created_by: The identity that created the resource. + :vartype created_by: str + :ivar created_by_type: The type of identity that created the resource. Known values are: + "User", "Application", "ManagedIdentity", and "Key". + :vartype created_by_type: str or ~azure.mgmt.cdn.models.CreatedByType + :ivar created_at: The timestamp of resource creation (UTC). + :vartype created_at: ~datetime.datetime + :ivar last_modified_by: The identity that last modified the resource. + :vartype last_modified_by: str + :ivar last_modified_by_type: The type of identity that last modified the resource. Known values + are: "User", "Application", "ManagedIdentity", and "Key". + :vartype last_modified_by_type: str or ~azure.mgmt.cdn.models.CreatedByType + :ivar last_modified_at: The timestamp of resource last modification (UTC). + :vartype last_modified_at: ~datetime.datetime + """ + + created_by: Optional[str] = rest_field(name="createdBy", visibility=["read", "create", "update", "delete", "query"]) + """The identity that created the resource.""" + created_by_type: Optional[Union[str, "_models.CreatedByType"]] = rest_field( + name="createdByType", visibility=["read", "create", "update", "delete", "query"] + ) + """The type of identity that created the resource. Known values are: \"User\", \"Application\", + \"ManagedIdentity\", and \"Key\".""" + created_at: Optional[datetime.datetime] = rest_field( + name="createdAt", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """The timestamp of resource creation (UTC).""" + last_modified_by: Optional[str] = rest_field( + name="lastModifiedBy", visibility=["read", "create", "update", "delete", "query"] + ) + """The identity that last modified the resource.""" + last_modified_by_type: Optional[Union[str, "_models.CreatedByType"]] = rest_field( + name="lastModifiedByType", visibility=["read", "create", "update", "delete", "query"] + ) + """The type of identity that last modified the resource. Known values are: \"User\", + \"Application\", \"ManagedIdentity\", and \"Key\".""" + last_modified_at: Optional[datetime.datetime] = rest_field( + name="lastModifiedAt", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """The timestamp of resource last modification (UTC).""" + + @overload + def __init__( + self, + *, + created_by: Optional[str] = None, + created_by_type: Optional[Union[str, "_models.CreatedByType"]] = None, + created_at: Optional[datetime.datetime] = None, + last_modified_by: Optional[str] = None, + last_modified_by_type: Optional[Union[str, "_models.CreatedByType"]] = None, + last_modified_at: Optional[datetime.datetime] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class UrlFileExtensionMatchConditionParameters( + DeliveryRuleConditionParameters, discriminator="DeliveryRuleUrlFileExtensionMatchConditionParameters" +): + """Defines the parameters for UrlFileExtension match conditions. + + :ivar operator: Describes operator to be matched. Required. Known values are: "Any", "Equal", + "Contains", "BeginsWith", "EndsWith", "LessThan", "LessThanOrEqual", "GreaterThan", + "GreaterThanOrEqual", and "RegEx". + :vartype operator: str or ~azure.mgmt.cdn.models.UrlFileExtensionOperator + :ivar negate_condition: Describes if this is negate condition or not. + :vartype negate_condition: bool + :ivar match_values: The match value for the condition of the delivery rule. + :vartype match_values: list[str] + :ivar transforms: List of transforms. + :vartype transforms: list[str or ~azure.mgmt.cdn.models.Transform] + :ivar type_name: Required. DELIVERY_RULE_URL_FILE_EXTENSION_MATCH_CONDITION_PARAMETERS. + :vartype type_name: str or + ~azure.mgmt.cdn.models.DELIVERY_RULE_URL_FILE_EXTENSION_MATCH_CONDITION_PARAMETERS + """ + + operator: Union[str, "_models.UrlFileExtensionOperator"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Describes operator to be matched. Required. Known values are: \"Any\", \"Equal\", \"Contains\", + \"BeginsWith\", \"EndsWith\", \"LessThan\", \"LessThanOrEqual\", \"GreaterThan\", + \"GreaterThanOrEqual\", and \"RegEx\".""" + negate_condition: Optional[bool] = rest_field( + name="negateCondition", visibility=["read", "create", "update", "delete", "query"] + ) + """Describes if this is negate condition or not.""" + match_values: Optional[list[str]] = rest_field( + name="matchValues", visibility=["read", "create", "update", "delete", "query"] + ) + """The match value for the condition of the delivery rule.""" + transforms: Optional[list[Union[str, "_models.Transform"]]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """List of transforms.""" + type_name: Literal[DeliveryRuleConditionParametersType.DELIVERY_RULE_URL_FILE_EXTENSION_MATCH_CONDITION_PARAMETERS] = rest_discriminator(name="typeName", visibility=["read", "create", "update", "delete", "query"]) # type: ignore + """Required. DELIVERY_RULE_URL_FILE_EXTENSION_MATCH_CONDITION_PARAMETERS.""" + + @overload + def __init__( + self, + *, + operator: Union[str, "_models.UrlFileExtensionOperator"], + negate_condition: Optional[bool] = None, + match_values: Optional[list[str]] = None, + transforms: Optional[list[Union[str, "_models.Transform"]]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + self.type_name = DeliveryRuleConditionParametersType.DELIVERY_RULE_URL_FILE_EXTENSION_MATCH_CONDITION_PARAMETERS # type: ignore + + +class UrlFileNameMatchConditionParameters( + DeliveryRuleConditionParameters, discriminator="DeliveryRuleUrlFilenameConditionParameters" +): + """Defines the parameters for UrlFilename match conditions. + + :ivar operator: Describes operator to be matched. Required. Known values are: "Any", "Equal", + "Contains", "BeginsWith", "EndsWith", "LessThan", "LessThanOrEqual", "GreaterThan", + "GreaterThanOrEqual", and "RegEx". + :vartype operator: str or ~azure.mgmt.cdn.models.UrlFileNameOperator + :ivar negate_condition: Describes if this is negate condition or not. + :vartype negate_condition: bool + :ivar match_values: The match value for the condition of the delivery rule. + :vartype match_values: list[str] + :ivar transforms: List of transforms. + :vartype transforms: list[str or ~azure.mgmt.cdn.models.Transform] + :ivar type_name: Required. DELIVERY_RULE_URL_FILENAME_CONDITION_PARAMETERS. + :vartype type_name: str or + ~azure.mgmt.cdn.models.DELIVERY_RULE_URL_FILENAME_CONDITION_PARAMETERS + """ + + operator: Union[str, "_models.UrlFileNameOperator"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Describes operator to be matched. Required. Known values are: \"Any\", \"Equal\", \"Contains\", + \"BeginsWith\", \"EndsWith\", \"LessThan\", \"LessThanOrEqual\", \"GreaterThan\", + \"GreaterThanOrEqual\", and \"RegEx\".""" + negate_condition: Optional[bool] = rest_field( + name="negateCondition", visibility=["read", "create", "update", "delete", "query"] + ) + """Describes if this is negate condition or not.""" + match_values: Optional[list[str]] = rest_field( + name="matchValues", visibility=["read", "create", "update", "delete", "query"] + ) + """The match value for the condition of the delivery rule.""" + transforms: Optional[list[Union[str, "_models.Transform"]]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """List of transforms.""" + type_name: Literal[DeliveryRuleConditionParametersType.DELIVERY_RULE_URL_FILENAME_CONDITION_PARAMETERS] = rest_discriminator(name="typeName", visibility=["read", "create", "update", "delete", "query"]) # type: ignore + """Required. DELIVERY_RULE_URL_FILENAME_CONDITION_PARAMETERS.""" + + @overload + def __init__( + self, + *, + operator: Union[str, "_models.UrlFileNameOperator"], + negate_condition: Optional[bool] = None, + match_values: Optional[list[str]] = None, + transforms: Optional[list[Union[str, "_models.Transform"]]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + self.type_name = DeliveryRuleConditionParametersType.DELIVERY_RULE_URL_FILENAME_CONDITION_PARAMETERS # type: ignore + + +class UrlPathMatchConditionParameters( + DeliveryRuleConditionParameters, discriminator="DeliveryRuleUrlPathMatchConditionParameters" +): + """Defines the parameters for UrlPath match conditions. + + :ivar operator: Describes operator to be matched. Required. Known values are: "Any", "Equal", + "Contains", "BeginsWith", "EndsWith", "LessThan", "LessThanOrEqual", "GreaterThan", + "GreaterThanOrEqual", "Wildcard", and "RegEx". + :vartype operator: str or ~azure.mgmt.cdn.models.UrlPathOperator + :ivar negate_condition: Describes if this is negate condition or not. + :vartype negate_condition: bool + :ivar match_values: The match value for the condition of the delivery rule. + :vartype match_values: list[str] + :ivar transforms: List of transforms. + :vartype transforms: list[str or ~azure.mgmt.cdn.models.Transform] + :ivar type_name: Required. DELIVERY_RULE_URL_PATH_MATCH_CONDITION_PARAMETERS. + :vartype type_name: str or + ~azure.mgmt.cdn.models.DELIVERY_RULE_URL_PATH_MATCH_CONDITION_PARAMETERS + """ + + operator: Union[str, "_models.UrlPathOperator"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Describes operator to be matched. Required. Known values are: \"Any\", \"Equal\", \"Contains\", + \"BeginsWith\", \"EndsWith\", \"LessThan\", \"LessThanOrEqual\", \"GreaterThan\", + \"GreaterThanOrEqual\", \"Wildcard\", and \"RegEx\".""" + negate_condition: Optional[bool] = rest_field( + name="negateCondition", visibility=["read", "create", "update", "delete", "query"] + ) + """Describes if this is negate condition or not.""" + match_values: Optional[list[str]] = rest_field( + name="matchValues", visibility=["read", "create", "update", "delete", "query"] + ) + """The match value for the condition of the delivery rule.""" + transforms: Optional[list[Union[str, "_models.Transform"]]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """List of transforms.""" + type_name: Literal[DeliveryRuleConditionParametersType.DELIVERY_RULE_URL_PATH_MATCH_CONDITION_PARAMETERS] = rest_discriminator(name="typeName", visibility=["read", "create", "update", "delete", "query"]) # type: ignore + """Required. DELIVERY_RULE_URL_PATH_MATCH_CONDITION_PARAMETERS.""" + + @overload + def __init__( + self, + *, + operator: Union[str, "_models.UrlPathOperator"], + negate_condition: Optional[bool] = None, + match_values: Optional[list[str]] = None, + transforms: Optional[list[Union[str, "_models.Transform"]]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + self.type_name = DeliveryRuleConditionParametersType.DELIVERY_RULE_URL_PATH_MATCH_CONDITION_PARAMETERS # type: ignore + + +class UrlRedirectAction(DeliveryRuleAction, discriminator="UrlRedirect"): + """Defines the url redirect action for the delivery rule. + + :ivar parameters: Defines the parameters for the action. Required. + :vartype parameters: ~azure.mgmt.cdn.models.UrlRedirectActionParameters + :ivar name: The name of the action for the delivery rule. Required. URL_REDIRECT. + :vartype name: str or ~azure.mgmt.cdn.models.URL_REDIRECT + """ + + parameters: "_models.UrlRedirectActionParameters" = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Defines the parameters for the action. Required.""" + name: Literal[DeliveryRuleActionName.URL_REDIRECT] = rest_discriminator(name="name", visibility=["read", "create", "update", "delete", "query"]) # type: ignore + """The name of the action for the delivery rule. Required. URL_REDIRECT.""" + + @overload + def __init__( + self, + *, + parameters: "_models.UrlRedirectActionParameters", + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + self.name = DeliveryRuleActionName.URL_REDIRECT # type: ignore + + +class UrlRedirectActionParameters( + DeliveryRuleActionParameters, discriminator="DeliveryRuleUrlRedirectActionParameters" +): + """Defines the parameters for the url redirect action. + + :ivar redirect_type: The redirect type the rule will use when redirecting traffic. Required. + Known values are: "Moved", "Found", "TemporaryRedirect", and "PermanentRedirect". + :vartype redirect_type: str or ~azure.mgmt.cdn.models.RedirectType + :ivar destination_protocol: Protocol to use for the redirect. The default value is + MatchRequest. Known values are: "MatchRequest", "Http", and "Https". + :vartype destination_protocol: str or ~azure.mgmt.cdn.models.DestinationProtocol + :ivar custom_path: The full path to redirect. Path cannot be empty and must start with /. Leave + empty to use the incoming path as destination path. + :vartype custom_path: str + :ivar custom_hostname: Host to redirect. Leave empty to use the incoming host as the + destination host. + :vartype custom_hostname: str + :ivar custom_query_string: The set of query strings to be placed in the redirect URL. Setting + this value would replace any existing query string; leave empty to preserve the incoming query + string. Query string must be in = format. ? and & will be added automatically so do + not include them. + :vartype custom_query_string: str + :ivar custom_fragment: Fragment to add to the redirect URL. Fragment is the part of the URL + that comes after #. Do not include the #. + :vartype custom_fragment: str + :ivar type_name: Required. DELIVERY_RULE_URL_REDIRECT_ACTION_PARAMETERS. + :vartype type_name: str or ~azure.mgmt.cdn.models.DELIVERY_RULE_URL_REDIRECT_ACTION_PARAMETERS + """ + + redirect_type: Union[str, "_models.RedirectType"] = rest_field( + name="redirectType", visibility=["read", "create", "update", "delete", "query"] + ) + """The redirect type the rule will use when redirecting traffic. Required. Known values are: + \"Moved\", \"Found\", \"TemporaryRedirect\", and \"PermanentRedirect\".""" + destination_protocol: Optional[Union[str, "_models.DestinationProtocol"]] = rest_field( + name="destinationProtocol", visibility=["read", "create", "update", "delete", "query"] + ) + """Protocol to use for the redirect. The default value is MatchRequest. Known values are: + \"MatchRequest\", \"Http\", and \"Https\".""" + custom_path: Optional[str] = rest_field( + name="customPath", visibility=["read", "create", "update", "delete", "query"] + ) + """The full path to redirect. Path cannot be empty and must start with /. Leave empty to use the + incoming path as destination path.""" + custom_hostname: Optional[str] = rest_field( + name="customHostname", visibility=["read", "create", "update", "delete", "query"] + ) + """Host to redirect. Leave empty to use the incoming host as the destination host.""" + custom_query_string: Optional[str] = rest_field( + name="customQueryString", visibility=["read", "create", "update", "delete", "query"] + ) + """The set of query strings to be placed in the redirect URL. Setting this value would replace any + existing query string; leave empty to preserve the incoming query string. Query string must be + in = format. ? and & will be added automatically so do not include them.""" + custom_fragment: Optional[str] = rest_field( + name="customFragment", visibility=["read", "create", "update", "delete", "query"] + ) + """Fragment to add to the redirect URL. Fragment is the part of the URL that comes after #. Do not + include the #.""" + type_name: Literal[DeliveryRuleActionParametersType.DELIVERY_RULE_URL_REDIRECT_ACTION_PARAMETERS] = rest_discriminator(name="typeName", visibility=["read", "create", "update", "delete", "query"]) # type: ignore + """Required. DELIVERY_RULE_URL_REDIRECT_ACTION_PARAMETERS.""" + + @overload + def __init__( + self, + *, + redirect_type: Union[str, "_models.RedirectType"], + destination_protocol: Optional[Union[str, "_models.DestinationProtocol"]] = None, + custom_path: Optional[str] = None, + custom_hostname: Optional[str] = None, + custom_query_string: Optional[str] = None, + custom_fragment: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + self.type_name = DeliveryRuleActionParametersType.DELIVERY_RULE_URL_REDIRECT_ACTION_PARAMETERS # type: ignore + + +class UrlRewriteAction(DeliveryRuleAction, discriminator="UrlRewrite"): + """Defines the url rewrite action for the delivery rule. + + :ivar parameters: Defines the parameters for the action. Required. + :vartype parameters: ~azure.mgmt.cdn.models.UrlRewriteActionParameters + :ivar name: The name of the action for the delivery rule. Required. URL_REWRITE. + :vartype name: str or ~azure.mgmt.cdn.models.URL_REWRITE + """ + + parameters: "_models.UrlRewriteActionParameters" = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Defines the parameters for the action. Required.""" + name: Literal[DeliveryRuleActionName.URL_REWRITE] = rest_discriminator(name="name", visibility=["read", "create", "update", "delete", "query"]) # type: ignore + """The name of the action for the delivery rule. Required. URL_REWRITE.""" + + @overload + def __init__( + self, + *, + parameters: "_models.UrlRewriteActionParameters", + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + self.name = DeliveryRuleActionName.URL_REWRITE # type: ignore + + +class UrlRewriteActionParameters(DeliveryRuleActionParameters, discriminator="DeliveryRuleUrlRewriteActionParameters"): + """Defines the parameters for the url rewrite action. + + :ivar source_pattern: define a request URI pattern that identifies the type of requests that + may be rewritten. If value is blank, all strings are matched. Required. + :vartype source_pattern: str + :ivar destination: Define the relative URL to which the above requests will be rewritten by. + Required. + :vartype destination: str + :ivar preserve_unmatched_path: Whether to preserve unmatched path. Default value is true. + :vartype preserve_unmatched_path: bool + :ivar type_name: Required. DELIVERY_RULE_URL_REWRITE_ACTION_PARAMETERS. + :vartype type_name: str or ~azure.mgmt.cdn.models.DELIVERY_RULE_URL_REWRITE_ACTION_PARAMETERS + """ + + source_pattern: str = rest_field(name="sourcePattern", visibility=["read", "create", "update", "delete", "query"]) + """define a request URI pattern that identifies the type of requests that may be rewritten. If + value is blank, all strings are matched. Required.""" + destination: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Define the relative URL to which the above requests will be rewritten by. Required.""" + preserve_unmatched_path: Optional[bool] = rest_field( + name="preserveUnmatchedPath", visibility=["read", "create", "update", "delete", "query"] + ) + """Whether to preserve unmatched path. Default value is true.""" + type_name: Literal[DeliveryRuleActionParametersType.DELIVERY_RULE_URL_REWRITE_ACTION_PARAMETERS] = rest_discriminator(name="typeName", visibility=["read", "create", "update", "delete", "query"]) # type: ignore + """Required. DELIVERY_RULE_URL_REWRITE_ACTION_PARAMETERS.""" + + @overload + def __init__( + self, + *, + source_pattern: str, + destination: str, + preserve_unmatched_path: Optional[bool] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + self.type_name = DeliveryRuleActionParametersType.DELIVERY_RULE_URL_REWRITE_ACTION_PARAMETERS # type: ignore + + +class UrlSigningAction(DeliveryRuleAction, discriminator="UrlSigning"): + """Defines the url signing action for the delivery rule. + + :ivar parameters: Defines the parameters for the action. Required. + :vartype parameters: ~azure.mgmt.cdn.models.UrlSigningActionParameters + :ivar name: The name of the action for the delivery rule. Required. URL_SIGNING. + :vartype name: str or ~azure.mgmt.cdn.models.URL_SIGNING + """ + + parameters: "_models.UrlSigningActionParameters" = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Defines the parameters for the action. Required.""" + name: Literal[DeliveryRuleActionName.URL_SIGNING] = rest_discriminator(name="name", visibility=["read", "create", "update", "delete", "query"]) # type: ignore + """The name of the action for the delivery rule. Required. URL_SIGNING.""" + + @overload + def __init__( + self, + *, + parameters: "_models.UrlSigningActionParameters", + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + self.name = DeliveryRuleActionName.URL_SIGNING # type: ignore + + +class UrlSigningActionParameters(DeliveryRuleActionParameters, discriminator="DeliveryRuleUrlSigningActionParameters"): + """Defines the parameters for the Url Signing action. + + :ivar algorithm: Algorithm to use for URL signing. "SHA256" + :vartype algorithm: str or ~azure.mgmt.cdn.models.Algorithm + :ivar parameter_name_override: Defines which query string parameters in the url to be + considered for expires, key id etc. + :vartype parameter_name_override: list[~azure.mgmt.cdn.models.UrlSigningParamIdentifier] + :ivar type_name: Required. DELIVERY_RULE_URL_SIGNING_ACTION_PARAMETERS. + :vartype type_name: str or ~azure.mgmt.cdn.models.DELIVERY_RULE_URL_SIGNING_ACTION_PARAMETERS + """ + + algorithm: Optional[Union[str, "_models.Algorithm"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Algorithm to use for URL signing. \"SHA256\"""" + parameter_name_override: Optional[list["_models.UrlSigningParamIdentifier"]] = rest_field( + name="parameterNameOverride", visibility=["read", "create", "update", "delete", "query"] + ) + """Defines which query string parameters in the url to be considered for expires, key id etc.""" + type_name: Literal[DeliveryRuleActionParametersType.DELIVERY_RULE_URL_SIGNING_ACTION_PARAMETERS] = rest_discriminator(name="typeName", visibility=["read", "create", "update", "delete", "query"]) # type: ignore + """Required. DELIVERY_RULE_URL_SIGNING_ACTION_PARAMETERS.""" + + @overload + def __init__( + self, + *, + algorithm: Optional[Union[str, "_models.Algorithm"]] = None, + parameter_name_override: Optional[list["_models.UrlSigningParamIdentifier"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + self.type_name = DeliveryRuleActionParametersType.DELIVERY_RULE_URL_SIGNING_ACTION_PARAMETERS # type: ignore + + +class UrlSigningKey(_Model): + """Url signing key. + + :ivar key_id: Defines the customer defined key Id. This id will exist in the incoming request + to indicate the key used to form the hash. Required. + :vartype key_id: str + :ivar key_source_parameters: Defines the parameters for using customer key vault for Url + Signing Key. Required. + :vartype key_source_parameters: ~azure.mgmt.cdn.models.KeyVaultSigningKeyParameters + """ + + key_id: str = rest_field(name="keyId", visibility=["read", "create", "update", "delete", "query"]) + """Defines the customer defined key Id. This id will exist in the incoming request to indicate the + key used to form the hash. Required.""" + key_source_parameters: "_models.KeyVaultSigningKeyParameters" = rest_field( + name="keySourceParameters", visibility=["read", "create", "update", "delete", "query"] + ) + """Defines the parameters for using customer key vault for Url Signing Key. Required.""" + + @overload + def __init__( + self, + *, + key_id: str, + key_source_parameters: "_models.KeyVaultSigningKeyParameters", + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class UrlSigningKeyParameters(SecretParameters, discriminator="UrlSigningKey"): + """Url signing key parameters. + + :ivar key_id: Defines the customer defined key Id. This id will exist in the incoming request + to indicate the key used to form the hash. Required. + :vartype key_id: str + :ivar secret_source: Resource reference to the Azure Key Vault secret. Expected to be in format + of + /subscriptions/{​​​​​​​​​subscriptionId}​​​​​​​​​/resourceGroups/{​​​​​​​​​resourceGroupName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/providers/Microsoft.KeyVault/vaults/{vaultName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/secrets/{secretName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​. + Required. + :vartype secret_source: ~azure.mgmt.cdn.models.ResourceReference + :ivar secret_version: Version of the secret to be used. Required. + :vartype secret_version: str + :ivar type: The type of the secret resource. Required. URL_SIGNING_KEY. + :vartype type: str or ~azure.mgmt.cdn.models.URL_SIGNING_KEY + """ + + key_id: str = rest_field(name="keyId", visibility=["read", "create", "update", "delete", "query"]) + """Defines the customer defined key Id. This id will exist in the incoming request to indicate the + key used to form the hash. Required.""" + secret_source: "_models.ResourceReference" = rest_field( + name="secretSource", visibility=["read", "create", "update", "delete", "query"] + ) + """Resource reference to the Azure Key Vault secret. Expected to be in format of + /subscriptions/{​​​​​​​​​subscriptionId}​​​​​​​​​/resourceGroups/{​​​​​​​​​resourceGroupName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/providers/Microsoft.KeyVault/vaults/{vaultName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/secrets/{secretName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​. + Required.""" + secret_version: str = rest_field(name="secretVersion", visibility=["read", "create", "update", "delete", "query"]) + """Version of the secret to be used. Required.""" + type: Literal[SecretType.URL_SIGNING_KEY] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"]) # type: ignore + """The type of the secret resource. Required. URL_SIGNING_KEY.""" + + @overload + def __init__( + self, + *, + key_id: str, + secret_source: "_models.ResourceReference", + secret_version: str, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + self.type = SecretType.URL_SIGNING_KEY # type: ignore + + +class UrlSigningParamIdentifier(_Model): + """Defines how to identify a parameter for a specific purpose e.g. expires. + + :ivar param_indicator: Indicates the purpose of the parameter. Required. Known values are: + "Expires", "KeyId", and "Signature". + :vartype param_indicator: str or ~azure.mgmt.cdn.models.ParamIndicator + :ivar param_name: Parameter name. Required. + :vartype param_name: str + """ + + param_indicator: Union[str, "_models.ParamIndicator"] = rest_field( + name="paramIndicator", visibility=["read", "create", "update", "delete", "query"] + ) + """Indicates the purpose of the parameter. Required. Known values are: \"Expires\", \"KeyId\", and + \"Signature\".""" + param_name: str = rest_field(name="paramName", visibility=["read", "create", "update", "delete", "query"]) + """Parameter name. Required.""" + + @overload + def __init__( + self, + *, + param_indicator: Union[str, "_models.ParamIndicator"], + param_name: str, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class Usage(_Model): + """Describes resource usage. + + :ivar id: Resource identifier. + :vartype id: str + :ivar unit: An enum describing the unit of measurement. Required. "Count" + :vartype unit: str or ~azure.mgmt.cdn.models.UsageUnit + :ivar current_value: The current value of the usage. Required. + :vartype current_value: int + :ivar limit: The limit of usage. Required. + :vartype limit: int + :ivar name: The name of the type of usage. Required. + :vartype name: ~azure.mgmt.cdn.models.UsageName + """ + + id: Optional[str] = rest_field(visibility=["read"]) + """Resource identifier.""" + unit: Union[str, "_models.UsageUnit"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """An enum describing the unit of measurement. Required. \"Count\"""" + current_value: int = rest_field(name="currentValue", visibility=["read", "create", "update", "delete", "query"]) + """The current value of the usage. Required.""" + limit: int = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The limit of usage. Required.""" + name: "_models.UsageName" = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The name of the type of usage. Required.""" + + @overload + def __init__( + self, + *, + unit: Union[str, "_models.UsageUnit"], + current_value: int, + limit: int, + name: "_models.UsageName", + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class UsageName(_Model): + """The usage names. + + :ivar value: A string describing the resource name. + :vartype value: str + :ivar localized_value: A localized string describing the resource name. + :vartype localized_value: str + """ + + value: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """A string describing the resource name.""" + localized_value: Optional[str] = rest_field( + name="localizedValue", visibility=["read", "create", "update", "delete", "query"] + ) + """A localized string describing the resource name.""" + + @overload + def __init__( + self, + *, + value: Optional[str] = None, + localized_value: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class UserAssignedIdentity(_Model): + """User assigned identity properties. + + :ivar principal_id: The principal ID of the assigned identity. + :vartype principal_id: str + :ivar client_id: The client ID of the assigned identity. + :vartype client_id: str + """ + + principal_id: Optional[str] = rest_field(name="principalId", visibility=["read"]) + """The principal ID of the assigned identity.""" + client_id: Optional[str] = rest_field(name="clientId", visibility=["read"]) + """The client ID of the assigned identity.""" + + +class UserManagedHttpsParameters(CustomDomainHttpsParameters, discriminator="AzureKeyVault"): + """Defines the certificate source parameters using user's keyvault certificate for enabling SSL. + + :ivar protocol_type: Defines the TLS extension protocol that is used for secure delivery. + Required. Known values are: "ServerNameIndication" and "IPBased". + :vartype protocol_type: str or ~azure.mgmt.cdn.models.ProtocolType + :ivar minimum_tls_version: TLS protocol version that will be used for Https. Known values are: + "None", "TLS10", and "TLS12". + :vartype minimum_tls_version: str or ~azure.mgmt.cdn.models.MinimumTlsVersion + :ivar certificate_source_parameters: Defines the certificate source parameters using user's + keyvault certificate for enabling SSL. Required. + :vartype certificate_source_parameters: + ~azure.mgmt.cdn.models.KeyVaultCertificateSourceParameters + :ivar certificate_source: Defines the source of the SSL certificate. Required. AZURE_KEY_VAULT. + :vartype certificate_source: str or ~azure.mgmt.cdn.models.AZURE_KEY_VAULT + """ + + certificate_source_parameters: "_models.KeyVaultCertificateSourceParameters" = rest_field( + name="certificateSourceParameters", visibility=["read", "create", "update", "delete", "query"] + ) + """Defines the certificate source parameters using user's keyvault certificate for enabling SSL. + Required.""" + certificate_source: Literal[CertificateSource.AZURE_KEY_VAULT] = rest_discriminator(name="certificateSource", visibility=["read", "create", "update", "delete", "query"]) # type: ignore + """Defines the source of the SSL certificate. Required. AZURE_KEY_VAULT.""" + + @overload + def __init__( + self, + *, + protocol_type: Union[str, "_models.ProtocolType"], + certificate_source_parameters: "_models.KeyVaultCertificateSourceParameters", + minimum_tls_version: Optional[Union[str, "_models.MinimumTlsVersion"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + self.certificate_source = CertificateSource.AZURE_KEY_VAULT # type: ignore + + +class ValidateCustomDomainInput(_Model): + """Input of the custom domain to be validated for DNS mapping. + + :ivar host_name: The host name of the custom domain. Must be a domain name. Required. + :vartype host_name: str + """ + + host_name: str = rest_field(name="hostName", visibility=["read", "create", "update", "delete", "query"]) + """The host name of the custom domain. Must be a domain name. Required.""" + + @overload + def __init__( + self, + *, + host_name: str, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ValidateCustomDomainOutput(_Model): + """Output of custom domain validation. + + :ivar custom_domain_validated: Indicates whether the custom domain is valid or not. + :vartype custom_domain_validated: bool + :ivar reason: The reason why the custom domain is not valid. + :vartype reason: str + :ivar message: Error message describing why the custom domain is not valid. + :vartype message: str + """ + + custom_domain_validated: Optional[bool] = rest_field(name="customDomainValidated", visibility=["read"]) + """Indicates whether the custom domain is valid or not.""" + reason: Optional[str] = rest_field(visibility=["read"]) + """The reason why the custom domain is not valid.""" + message: Optional[str] = rest_field(visibility=["read"]) + """Error message describing why the custom domain is not valid.""" + + +class ValidateProbeInput(_Model): + """Input of the validate probe API. + + :ivar probe_url: The probe URL to validate. Required. + :vartype probe_url: str + """ + + probe_url: str = rest_field(name="probeURL", visibility=["read", "create", "update", "delete", "query"]) + """The probe URL to validate. Required.""" + + @overload + def __init__( + self, + *, + probe_url: str, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ValidateProbeOutput(_Model): + """Output of the validate probe API. + + :ivar is_valid: Indicates whether the probe URL is accepted or not. + :vartype is_valid: bool + :ivar error_code: Specifies the error code when the probe url is not accepted. + :vartype error_code: str + :ivar message: The detailed error message describing why the probe URL is not accepted. + :vartype message: str + """ + + is_valid: Optional[bool] = rest_field(name="isValid", visibility=["read"]) + """Indicates whether the probe URL is accepted or not.""" + error_code: Optional[str] = rest_field(name="errorCode", visibility=["read"]) + """Specifies the error code when the probe url is not accepted.""" + message: Optional[str] = rest_field(visibility=["read"]) + """The detailed error message describing why the probe URL is not accepted.""" + + +class ValidateSecretInput(_Model): + """Input of the secret to be validated. + + :ivar secret_type: The secret type. Required. Known values are: "UrlSigningKey", + "CustomerCertificate", "ManagedCertificate", and "AzureFirstPartyManagedCertificate". + :vartype secret_type: str or ~azure.mgmt.cdn.models.SecretType + :ivar secret_source: Resource reference to the Azure Key Vault secret. Expected to be in format + of + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/secrets/{secretName}. + Required. + :vartype secret_source: ~azure.mgmt.cdn.models.ResourceReference + :ivar secret_version: Secret version, if customer is using a specific version. + :vartype secret_version: str + """ + + secret_type: Union[str, "_models.SecretType"] = rest_field( + name="secretType", visibility=["read", "create", "update", "delete", "query"] + ) + """The secret type. Required. Known values are: \"UrlSigningKey\", \"CustomerCertificate\", + \"ManagedCertificate\", and \"AzureFirstPartyManagedCertificate\".""" + secret_source: "_models.ResourceReference" = rest_field( + name="secretSource", visibility=["read", "create", "update", "delete", "query"] + ) + """Resource reference to the Azure Key Vault secret. Expected to be in format of + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/secrets/{secretName}. + Required.""" + secret_version: Optional[str] = rest_field( + name="secretVersion", visibility=["read", "create", "update", "delete", "query"] + ) + """Secret version, if customer is using a specific version.""" + + @overload + def __init__( + self, + *, + secret_type: Union[str, "_models.SecretType"], + secret_source: "_models.ResourceReference", + secret_version: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ValidateSecretOutput(_Model): + """Output of the validated secret. + + :ivar status: The validation status. Known values are: "Valid", "Invalid", "AccessDenied", and + "CertificateExpired". + :vartype status: str or ~azure.mgmt.cdn.models.Status + :ivar message: Detailed error message. + :vartype message: str + """ + + status: Optional[Union[str, "_models.Status"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The validation status. Known values are: \"Valid\", \"Invalid\", \"AccessDenied\", and + \"CertificateExpired\".""" + message: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Detailed error message.""" + + @overload + def __init__( + self, + *, + status: Optional[Union[str, "_models.Status"]] = None, + message: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class WafMetricsResponse(_Model): + """Waf Metrics Response. + + :ivar date_time_begin: + :vartype date_time_begin: ~datetime.datetime + :ivar date_time_end: + :vartype date_time_end: ~datetime.datetime + :ivar granularity: Known values are: "PT5M", "PT1H", and "P1D". + :vartype granularity: str or ~azure.mgmt.cdn.models.WafMetricsGranularity + :ivar series: + :vartype series: list[~azure.mgmt.cdn.models.WafMetricsResponseSeriesItem] + """ + + date_time_begin: Optional[datetime.datetime] = rest_field( + name="dateTimeBegin", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + date_time_end: Optional[datetime.datetime] = rest_field( + name="dateTimeEnd", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + granularity: Optional[Union[str, "_models.WafMetricsGranularity"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Known values are: \"PT5M\", \"PT1H\", and \"P1D\".""" + series: Optional[list["_models.WafMetricsResponseSeriesItem"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + + @overload + def __init__( + self, + *, + date_time_begin: Optional[datetime.datetime] = None, + date_time_end: Optional[datetime.datetime] = None, + granularity: Optional[Union[str, "_models.WafMetricsGranularity"]] = None, + series: Optional[list["_models.WafMetricsResponseSeriesItem"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class WafMetricsResponseSeriesItem(_Model): + """WafMetricsResponseSeriesItem. + + :ivar metric: + :vartype metric: str + :ivar unit: "count" + :vartype unit: str or ~azure.mgmt.cdn.models.WafMetricsSeriesUnit + :ivar groups: + :vartype groups: list[~azure.mgmt.cdn.models.WafMetricsResponseSeriesPropertiesItemsItem] + :ivar data: + :vartype data: + list[~azure.mgmt.cdn.models.Components18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsPropertiesDataItems] + """ + + metric: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + unit: Optional[Union[str, "_models.WafMetricsSeriesUnit"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """\"count\"""" + groups: Optional[list["_models.WafMetricsResponseSeriesPropertiesItemsItem"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + data: Optional[ + list["_models.Components18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsPropertiesDataItems"] + ] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + + @overload + def __init__( + self, + *, + metric: Optional[str] = None, + unit: Optional[Union[str, "_models.WafMetricsSeriesUnit"]] = None, + groups: Optional[list["_models.WafMetricsResponseSeriesPropertiesItemsItem"]] = None, + data: Optional[ + list["_models.Components18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsPropertiesDataItems"] + ] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class WafMetricsResponseSeriesPropertiesItemsItem(_Model): # pylint: disable=name-too-long + """WafMetricsResponseSeriesPropertiesItemsItem. + + :ivar name: + :vartype name: str + :ivar value: + :vartype value: str + """ + + name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + value: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + + @overload + def __init__( + self, + *, + name: Optional[str] = None, + value: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class WafRankingsResponse(_Model): + """Waf Rankings Response. + + :ivar date_time_begin: + :vartype date_time_begin: ~datetime.datetime + :ivar date_time_end: + :vartype date_time_end: ~datetime.datetime + :ivar groups: + :vartype groups: list[str] + :ivar data: + :vartype data: list[~azure.mgmt.cdn.models.WafRankingsResponseDataItem] + """ + + date_time_begin: Optional[datetime.datetime] = rest_field( + name="dateTimeBegin", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + date_time_end: Optional[datetime.datetime] = rest_field( + name="dateTimeEnd", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + groups: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + data: Optional[list["_models.WafRankingsResponseDataItem"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + + @overload + def __init__( + self, + *, + date_time_begin: Optional[datetime.datetime] = None, + date_time_end: Optional[datetime.datetime] = None, + groups: Optional[list[str]] = None, + data: Optional[list["_models.WafRankingsResponseDataItem"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class WafRankingsResponseDataItem(_Model): + """WafRankingsResponseDataItem. + + :ivar group_values: + :vartype group_values: list[str] + :ivar metrics: + :vartype metrics: + list[~azure.mgmt.cdn.models.ComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItems] + """ + + group_values: Optional[list[str]] = rest_field( + name="groupValues", visibility=["read", "create", "update", "delete", "query"] + ) + metrics: Optional[ + list["_models.ComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItems"] + ] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + + @overload + def __init__( + self, + *, + group_values: Optional[list[str]] = None, + metrics: Optional[ + list["_models.ComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItems"] + ] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/_models_py3.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/_models_py3.py deleted file mode 100644 index 8d35ab0376bd..000000000000 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/_models_py3.py +++ /dev/null @@ -1,14138 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression,too-many-lines -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from collections.abc import MutableMapping -import datetime -from typing import Any, Optional, TYPE_CHECKING, Union - -from .._utils import serialization as _serialization - -if TYPE_CHECKING: - from .. import models as _models -JSON = MutableMapping[str, Any] - - -class ActivatedResourceReference(_serialization.Model): - """Reference to another resource along with its state. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar is_active: Whether the resource is active or inactive. - :vartype is_active: bool - """ - - _validation = { - "is_active": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "is_active": {"key": "isActive", "type": "bool"}, - } - - def __init__(self, *, id: Optional[str] = None, **kwargs: Any) -> None: # pylint: disable=redefined-builtin - """ - :keyword id: Resource ID. - :paramtype id: str - """ - super().__init__(**kwargs) - self.id = id - self.is_active: Optional[bool] = None - - -class Resource(_serialization.Model): - """Common fields that are returned in the response for all Azure Resource Manager resources. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. E.g. - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy - information. - :vartype system_data: ~azure.mgmt.cdn.models.SystemData - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "system_data": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "system_data": {"key": "systemData", "type": "SystemData"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.id: Optional[str] = None - self.name: Optional[str] = None - self.type: Optional[str] = None - self.system_data: Optional["_models.SystemData"] = None - - -class ProxyResource(Resource): - """The resource model definition for a Azure Resource Manager proxy resource. It will not have - tags and a location. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. E.g. - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy - information. - :vartype system_data: ~azure.mgmt.cdn.models.SystemData - """ - - -class AFDDomain(ProxyResource): - """Friendly domain name mapping to the endpoint hostname that the customer provides for branding - purposes, e.g. www.contoso.com. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. E.g. - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy - information. - :vartype system_data: ~azure.mgmt.cdn.models.SystemData - :ivar profile_name: The name of the profile which holds the domain. - :vartype profile_name: str - :ivar tls_settings: The configuration specifying how to enable HTTPS for the domain - using - AzureFrontDoor managed certificate or user's own certificate. If not specified, enabling ssl - uses AzureFrontDoor managed certificate by default. - :vartype tls_settings: ~azure.mgmt.cdn.models.AFDDomainHttpsParameters - :ivar azure_dns_zone: Resource reference to the Azure DNS zone. - :vartype azure_dns_zone: ~azure.mgmt.cdn.models.ResourceReference - :ivar pre_validated_custom_domain_resource_id: Resource reference to the Azure resource where - custom domain ownership was prevalidated. - :vartype pre_validated_custom_domain_resource_id: ~azure.mgmt.cdn.models.ResourceReference - :ivar provisioning_state: Provisioning status. Known values are: "Succeeded", "Failed", - "Updating", "Deleting", and "Creating". - :vartype provisioning_state: str or ~azure.mgmt.cdn.models.AfdProvisioningState - :ivar deployment_status: Known values are: "NotStarted", "InProgress", "Succeeded", and - "Failed". - :vartype deployment_status: str or ~azure.mgmt.cdn.models.DeploymentStatus - :ivar domain_validation_state: Provisioning substate shows the progress of custom HTTPS - enabling/disabling process step by step. DCV stands for DomainControlValidation. Known values - are: "Unknown", "Submitting", "Pending", "Rejected", "TimedOut", "PendingRevalidation", - "Approved", "RefreshingValidationToken", and "InternalError". - :vartype domain_validation_state: str or ~azure.mgmt.cdn.models.DomainValidationState - :ivar host_name: The host name of the domain. Must be a domain name. - :vartype host_name: str - :ivar extended_properties: Key-Value pair representing migration properties for domains. - :vartype extended_properties: dict[str, str] - :ivar validation_properties: Values the customer needs to validate domain ownership. - :vartype validation_properties: ~azure.mgmt.cdn.models.DomainValidationProperties - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "system_data": {"readonly": True}, - "profile_name": {"readonly": True}, - "provisioning_state": {"readonly": True}, - "deployment_status": {"readonly": True}, - "domain_validation_state": {"readonly": True}, - "validation_properties": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "system_data": {"key": "systemData", "type": "SystemData"}, - "profile_name": {"key": "properties.profileName", "type": "str"}, - "tls_settings": {"key": "properties.tlsSettings", "type": "AFDDomainHttpsParameters"}, - "azure_dns_zone": {"key": "properties.azureDnsZone", "type": "ResourceReference"}, - "pre_validated_custom_domain_resource_id": { - "key": "properties.preValidatedCustomDomainResourceId", - "type": "ResourceReference", - }, - "provisioning_state": {"key": "properties.provisioningState", "type": "str"}, - "deployment_status": {"key": "properties.deploymentStatus", "type": "str"}, - "domain_validation_state": {"key": "properties.domainValidationState", "type": "str"}, - "host_name": {"key": "properties.hostName", "type": "str"}, - "extended_properties": {"key": "properties.extendedProperties", "type": "{str}"}, - "validation_properties": {"key": "properties.validationProperties", "type": "DomainValidationProperties"}, - } - - def __init__( - self, - *, - tls_settings: Optional["_models.AFDDomainHttpsParameters"] = None, - azure_dns_zone: Optional["_models.ResourceReference"] = None, - pre_validated_custom_domain_resource_id: Optional["_models.ResourceReference"] = None, - host_name: Optional[str] = None, - extended_properties: Optional[dict[str, str]] = None, - **kwargs: Any - ) -> None: - """ - :keyword tls_settings: The configuration specifying how to enable HTTPS for the domain - using - AzureFrontDoor managed certificate or user's own certificate. If not specified, enabling ssl - uses AzureFrontDoor managed certificate by default. - :paramtype tls_settings: ~azure.mgmt.cdn.models.AFDDomainHttpsParameters - :keyword azure_dns_zone: Resource reference to the Azure DNS zone. - :paramtype azure_dns_zone: ~azure.mgmt.cdn.models.ResourceReference - :keyword pre_validated_custom_domain_resource_id: Resource reference to the Azure resource - where custom domain ownership was prevalidated. - :paramtype pre_validated_custom_domain_resource_id: ~azure.mgmt.cdn.models.ResourceReference - :keyword host_name: The host name of the domain. Must be a domain name. - :paramtype host_name: str - :keyword extended_properties: Key-Value pair representing migration properties for domains. - :paramtype extended_properties: dict[str, str] - """ - super().__init__(**kwargs) - self.profile_name: Optional[str] = None - self.tls_settings = tls_settings - self.azure_dns_zone = azure_dns_zone - self.pre_validated_custom_domain_resource_id = pre_validated_custom_domain_resource_id - self.provisioning_state: Optional[Union[str, "_models.AfdProvisioningState"]] = None - self.deployment_status: Optional[Union[str, "_models.DeploymentStatus"]] = None - self.domain_validation_state: Optional[Union[str, "_models.DomainValidationState"]] = None - self.host_name = host_name - self.extended_properties = extended_properties - self.validation_properties: Optional["_models.DomainValidationProperties"] = None - - -class AFDDomainHttpsCustomizedCipherSuiteSet(_serialization.Model): - """Customized cipher suite set object that will be used for Https when cipherSuiteSetType is - Customized. - - :ivar cipher_suite_set_for_tls12: Cipher suites for TLS 1.2. Required at least one in - minimumTlsVersion TLS 1.2. - :vartype cipher_suite_set_for_tls12: list[str or - ~azure.mgmt.cdn.models.AfdCustomizedCipherSuiteForTls12] - :ivar cipher_suite_set_for_tls13: Cipher suites for TLS 1.3. Required at least one in - minimumTlsVersion TLS 1.2, TLS 1.3. - :vartype cipher_suite_set_for_tls13: list[str or - ~azure.mgmt.cdn.models.AfdCustomizedCipherSuiteForTls13] - """ - - _attribute_map = { - "cipher_suite_set_for_tls12": {"key": "cipherSuiteSetForTls12", "type": "[str]"}, - "cipher_suite_set_for_tls13": {"key": "cipherSuiteSetForTls13", "type": "[str]"}, - } - - def __init__( - self, - *, - cipher_suite_set_for_tls12: Optional[list[Union[str, "_models.AfdCustomizedCipherSuiteForTls12"]]] = None, - cipher_suite_set_for_tls13: Optional[list[Union[str, "_models.AfdCustomizedCipherSuiteForTls13"]]] = None, - **kwargs: Any - ) -> None: - """ - :keyword cipher_suite_set_for_tls12: Cipher suites for TLS 1.2. Required at least one in - minimumTlsVersion TLS 1.2. - :paramtype cipher_suite_set_for_tls12: list[str or - ~azure.mgmt.cdn.models.AfdCustomizedCipherSuiteForTls12] - :keyword cipher_suite_set_for_tls13: Cipher suites for TLS 1.3. Required at least one in - minimumTlsVersion TLS 1.2, TLS 1.3. - :paramtype cipher_suite_set_for_tls13: list[str or - ~azure.mgmt.cdn.models.AfdCustomizedCipherSuiteForTls13] - """ - super().__init__(**kwargs) - self.cipher_suite_set_for_tls12 = cipher_suite_set_for_tls12 - self.cipher_suite_set_for_tls13 = cipher_suite_set_for_tls13 - - -class AFDDomainHttpsParameters(_serialization.Model): - """The JSON object that contains the properties to secure a domain. - - All required parameters must be populated in order to send to server. - - :ivar certificate_type: Defines the source of the SSL certificate. Required. Known values are: - "CustomerCertificate", "ManagedCertificate", and "AzureFirstPartyManagedCertificate". - :vartype certificate_type: str or ~azure.mgmt.cdn.models.AfdCertificateType - :ivar cipher_suite_set_type: cipher suite set type that will be used for Https. Known values - are: "Customized", "TLS10_2019", "TLS12_2022", and "TLS12_2023". - :vartype cipher_suite_set_type: str or ~azure.mgmt.cdn.models.AfdCipherSuiteSetType - :ivar minimum_tls_version: TLS protocol version that will be used for Https when - cipherSuiteSetType is Customized. Known values are: "TLS10", "TLS12", and "TLS13". - :vartype minimum_tls_version: str or ~azure.mgmt.cdn.models.AfdMinimumTlsVersion - :ivar customized_cipher_suite_set: Customized cipher suites object that will be used for Https - when cipherSuiteSetType is Customized. - :vartype customized_cipher_suite_set: - ~azure.mgmt.cdn.models.AFDDomainHttpsCustomizedCipherSuiteSet - :ivar secret: Resource reference to the secret. ie. subs/rg/profile/secret. - :vartype secret: ~azure.mgmt.cdn.models.ResourceReference - """ - - _validation = { - "certificate_type": {"required": True}, - } - - _attribute_map = { - "certificate_type": {"key": "certificateType", "type": "str"}, - "cipher_suite_set_type": {"key": "cipherSuiteSetType", "type": "str"}, - "minimum_tls_version": {"key": "minimumTlsVersion", "type": "str"}, - "customized_cipher_suite_set": { - "key": "customizedCipherSuiteSet", - "type": "AFDDomainHttpsCustomizedCipherSuiteSet", - }, - "secret": {"key": "secret", "type": "ResourceReference"}, - } - - def __init__( - self, - *, - certificate_type: Union[str, "_models.AfdCertificateType"], - cipher_suite_set_type: Optional[Union[str, "_models.AfdCipherSuiteSetType"]] = None, - minimum_tls_version: Optional[Union[str, "_models.AfdMinimumTlsVersion"]] = None, - customized_cipher_suite_set: Optional["_models.AFDDomainHttpsCustomizedCipherSuiteSet"] = None, - secret: Optional["_models.ResourceReference"] = None, - **kwargs: Any - ) -> None: - """ - :keyword certificate_type: Defines the source of the SSL certificate. Required. Known values - are: "CustomerCertificate", "ManagedCertificate", and "AzureFirstPartyManagedCertificate". - :paramtype certificate_type: str or ~azure.mgmt.cdn.models.AfdCertificateType - :keyword cipher_suite_set_type: cipher suite set type that will be used for Https. Known values - are: "Customized", "TLS10_2019", "TLS12_2022", and "TLS12_2023". - :paramtype cipher_suite_set_type: str or ~azure.mgmt.cdn.models.AfdCipherSuiteSetType - :keyword minimum_tls_version: TLS protocol version that will be used for Https when - cipherSuiteSetType is Customized. Known values are: "TLS10", "TLS12", and "TLS13". - :paramtype minimum_tls_version: str or ~azure.mgmt.cdn.models.AfdMinimumTlsVersion - :keyword customized_cipher_suite_set: Customized cipher suites object that will be used for - Https when cipherSuiteSetType is Customized. - :paramtype customized_cipher_suite_set: - ~azure.mgmt.cdn.models.AFDDomainHttpsCustomizedCipherSuiteSet - :keyword secret: Resource reference to the secret. ie. subs/rg/profile/secret. - :paramtype secret: ~azure.mgmt.cdn.models.ResourceReference - """ - super().__init__(**kwargs) - self.certificate_type = certificate_type - self.cipher_suite_set_type = cipher_suite_set_type - self.minimum_tls_version = minimum_tls_version - self.customized_cipher_suite_set = customized_cipher_suite_set - self.secret = secret - - -class AFDDomainListResult(_serialization.Model): - """Result of the request to list domains. It contains a list of domain objects and a URL link to - get the next set of results. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: List of AzureFrontDoor domains within a profile. - :vartype value: list[~azure.mgmt.cdn.models.AFDDomain] - :ivar next_link: URL to get the next set of domain objects if there are any. - :vartype next_link: str - """ - - _validation = { - "value": {"readonly": True}, - } - - _attribute_map = { - "value": {"key": "value", "type": "[AFDDomain]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__(self, *, next_link: Optional[str] = None, **kwargs: Any) -> None: - """ - :keyword next_link: URL to get the next set of domain objects if there are any. - :paramtype next_link: str - """ - super().__init__(**kwargs) - self.value: Optional[list["_models.AFDDomain"]] = None - self.next_link = next_link - - -class AFDStateProperties(_serialization.Model): - """The tracking states for afd resources. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar provisioning_state: Provisioning status. Known values are: "Succeeded", "Failed", - "Updating", "Deleting", and "Creating". - :vartype provisioning_state: str or ~azure.mgmt.cdn.models.AfdProvisioningState - :ivar deployment_status: Known values are: "NotStarted", "InProgress", "Succeeded", and - "Failed". - :vartype deployment_status: str or ~azure.mgmt.cdn.models.DeploymentStatus - """ - - _validation = { - "provisioning_state": {"readonly": True}, - "deployment_status": {"readonly": True}, - } - - _attribute_map = { - "provisioning_state": {"key": "provisioningState", "type": "str"}, - "deployment_status": {"key": "deploymentStatus", "type": "str"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.provisioning_state: Optional[Union[str, "_models.AfdProvisioningState"]] = None - self.deployment_status: Optional[Union[str, "_models.DeploymentStatus"]] = None - - -class AFDDomainUpdatePropertiesParameters(_serialization.Model): - """The JSON object that contains the properties of the domain to create. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar profile_name: The name of the profile which holds the domain. - :vartype profile_name: str - :ivar tls_settings: The configuration specifying how to enable HTTPS for the domain - using - AzureFrontDoor managed certificate or user's own certificate. If not specified, enabling ssl - uses AzureFrontDoor managed certificate by default. - :vartype tls_settings: ~azure.mgmt.cdn.models.AFDDomainHttpsParameters - :ivar azure_dns_zone: Resource reference to the Azure DNS zone. - :vartype azure_dns_zone: ~azure.mgmt.cdn.models.ResourceReference - :ivar pre_validated_custom_domain_resource_id: Resource reference to the Azure resource where - custom domain ownership was prevalidated. - :vartype pre_validated_custom_domain_resource_id: ~azure.mgmt.cdn.models.ResourceReference - """ - - _validation = { - "profile_name": {"readonly": True}, - } - - _attribute_map = { - "profile_name": {"key": "profileName", "type": "str"}, - "tls_settings": {"key": "tlsSettings", "type": "AFDDomainHttpsParameters"}, - "azure_dns_zone": {"key": "azureDnsZone", "type": "ResourceReference"}, - "pre_validated_custom_domain_resource_id": { - "key": "preValidatedCustomDomainResourceId", - "type": "ResourceReference", - }, - } - - def __init__( - self, - *, - tls_settings: Optional["_models.AFDDomainHttpsParameters"] = None, - azure_dns_zone: Optional["_models.ResourceReference"] = None, - pre_validated_custom_domain_resource_id: Optional["_models.ResourceReference"] = None, - **kwargs: Any - ) -> None: - """ - :keyword tls_settings: The configuration specifying how to enable HTTPS for the domain - using - AzureFrontDoor managed certificate or user's own certificate. If not specified, enabling ssl - uses AzureFrontDoor managed certificate by default. - :paramtype tls_settings: ~azure.mgmt.cdn.models.AFDDomainHttpsParameters - :keyword azure_dns_zone: Resource reference to the Azure DNS zone. - :paramtype azure_dns_zone: ~azure.mgmt.cdn.models.ResourceReference - :keyword pre_validated_custom_domain_resource_id: Resource reference to the Azure resource - where custom domain ownership was prevalidated. - :paramtype pre_validated_custom_domain_resource_id: ~azure.mgmt.cdn.models.ResourceReference - """ - super().__init__(**kwargs) - self.profile_name: Optional[str] = None - self.tls_settings = tls_settings - self.azure_dns_zone = azure_dns_zone - self.pre_validated_custom_domain_resource_id = pre_validated_custom_domain_resource_id - - -class AFDDomainProperties(AFDDomainUpdatePropertiesParameters, AFDStateProperties): - """The JSON object that contains the properties of the domain to create. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to server. - - :ivar provisioning_state: Provisioning status. Known values are: "Succeeded", "Failed", - "Updating", "Deleting", and "Creating". - :vartype provisioning_state: str or ~azure.mgmt.cdn.models.AfdProvisioningState - :ivar deployment_status: Known values are: "NotStarted", "InProgress", "Succeeded", and - "Failed". - :vartype deployment_status: str or ~azure.mgmt.cdn.models.DeploymentStatus - :ivar profile_name: The name of the profile which holds the domain. - :vartype profile_name: str - :ivar tls_settings: The configuration specifying how to enable HTTPS for the domain - using - AzureFrontDoor managed certificate or user's own certificate. If not specified, enabling ssl - uses AzureFrontDoor managed certificate by default. - :vartype tls_settings: ~azure.mgmt.cdn.models.AFDDomainHttpsParameters - :ivar azure_dns_zone: Resource reference to the Azure DNS zone. - :vartype azure_dns_zone: ~azure.mgmt.cdn.models.ResourceReference - :ivar pre_validated_custom_domain_resource_id: Resource reference to the Azure resource where - custom domain ownership was prevalidated. - :vartype pre_validated_custom_domain_resource_id: ~azure.mgmt.cdn.models.ResourceReference - :ivar domain_validation_state: Provisioning substate shows the progress of custom HTTPS - enabling/disabling process step by step. DCV stands for DomainControlValidation. Known values - are: "Unknown", "Submitting", "Pending", "Rejected", "TimedOut", "PendingRevalidation", - "Approved", "RefreshingValidationToken", and "InternalError". - :vartype domain_validation_state: str or ~azure.mgmt.cdn.models.DomainValidationState - :ivar host_name: The host name of the domain. Must be a domain name. Required. - :vartype host_name: str - :ivar extended_properties: Key-Value pair representing migration properties for domains. - :vartype extended_properties: dict[str, str] - :ivar validation_properties: Values the customer needs to validate domain ownership. - :vartype validation_properties: ~azure.mgmt.cdn.models.DomainValidationProperties - """ - - _validation = { - "provisioning_state": {"readonly": True}, - "deployment_status": {"readonly": True}, - "profile_name": {"readonly": True}, - "domain_validation_state": {"readonly": True}, - "host_name": {"required": True}, - "validation_properties": {"readonly": True}, - } - - _attribute_map = { - "provisioning_state": {"key": "provisioningState", "type": "str"}, - "deployment_status": {"key": "deploymentStatus", "type": "str"}, - "profile_name": {"key": "profileName", "type": "str"}, - "tls_settings": {"key": "tlsSettings", "type": "AFDDomainHttpsParameters"}, - "azure_dns_zone": {"key": "azureDnsZone", "type": "ResourceReference"}, - "pre_validated_custom_domain_resource_id": { - "key": "preValidatedCustomDomainResourceId", - "type": "ResourceReference", - }, - "domain_validation_state": {"key": "domainValidationState", "type": "str"}, - "host_name": {"key": "hostName", "type": "str"}, - "extended_properties": {"key": "extendedProperties", "type": "{str}"}, - "validation_properties": {"key": "validationProperties", "type": "DomainValidationProperties"}, - } - - def __init__( - self, - *, - host_name: str, - tls_settings: Optional["_models.AFDDomainHttpsParameters"] = None, - azure_dns_zone: Optional["_models.ResourceReference"] = None, - pre_validated_custom_domain_resource_id: Optional["_models.ResourceReference"] = None, - extended_properties: Optional[dict[str, str]] = None, - **kwargs: Any - ) -> None: - """ - :keyword tls_settings: The configuration specifying how to enable HTTPS for the domain - using - AzureFrontDoor managed certificate or user's own certificate. If not specified, enabling ssl - uses AzureFrontDoor managed certificate by default. - :paramtype tls_settings: ~azure.mgmt.cdn.models.AFDDomainHttpsParameters - :keyword azure_dns_zone: Resource reference to the Azure DNS zone. - :paramtype azure_dns_zone: ~azure.mgmt.cdn.models.ResourceReference - :keyword pre_validated_custom_domain_resource_id: Resource reference to the Azure resource - where custom domain ownership was prevalidated. - :paramtype pre_validated_custom_domain_resource_id: ~azure.mgmt.cdn.models.ResourceReference - :keyword host_name: The host name of the domain. Must be a domain name. Required. - :paramtype host_name: str - :keyword extended_properties: Key-Value pair representing migration properties for domains. - :paramtype extended_properties: dict[str, str] - """ - super().__init__( - tls_settings=tls_settings, - azure_dns_zone=azure_dns_zone, - pre_validated_custom_domain_resource_id=pre_validated_custom_domain_resource_id, - **kwargs - ) - self.provisioning_state: Optional[Union[str, "_models.AfdProvisioningState"]] = None - self.deployment_status: Optional[Union[str, "_models.DeploymentStatus"]] = None - self.domain_validation_state: Optional[Union[str, "_models.DomainValidationState"]] = None - self.host_name = host_name - self.extended_properties = extended_properties - self.validation_properties: Optional["_models.DomainValidationProperties"] = None - self.profile_name: Optional[str] = None - self.tls_settings = tls_settings - self.azure_dns_zone = azure_dns_zone - self.pre_validated_custom_domain_resource_id = pre_validated_custom_domain_resource_id - - -class AFDDomainUpdateParameters(_serialization.Model): - """The domain JSON object required for domain creation or update. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar profile_name: The name of the profile which holds the domain. - :vartype profile_name: str - :ivar tls_settings: The configuration specifying how to enable HTTPS for the domain - using - AzureFrontDoor managed certificate or user's own certificate. If not specified, enabling ssl - uses AzureFrontDoor managed certificate by default. - :vartype tls_settings: ~azure.mgmt.cdn.models.AFDDomainHttpsParameters - :ivar azure_dns_zone: Resource reference to the Azure DNS zone. - :vartype azure_dns_zone: ~azure.mgmt.cdn.models.ResourceReference - :ivar pre_validated_custom_domain_resource_id: Resource reference to the Azure resource where - custom domain ownership was prevalidated. - :vartype pre_validated_custom_domain_resource_id: ~azure.mgmt.cdn.models.ResourceReference - """ - - _validation = { - "profile_name": {"readonly": True}, - } - - _attribute_map = { - "profile_name": {"key": "properties.profileName", "type": "str"}, - "tls_settings": {"key": "properties.tlsSettings", "type": "AFDDomainHttpsParameters"}, - "azure_dns_zone": {"key": "properties.azureDnsZone", "type": "ResourceReference"}, - "pre_validated_custom_domain_resource_id": { - "key": "properties.preValidatedCustomDomainResourceId", - "type": "ResourceReference", - }, - } - - def __init__( - self, - *, - tls_settings: Optional["_models.AFDDomainHttpsParameters"] = None, - azure_dns_zone: Optional["_models.ResourceReference"] = None, - pre_validated_custom_domain_resource_id: Optional["_models.ResourceReference"] = None, - **kwargs: Any - ) -> None: - """ - :keyword tls_settings: The configuration specifying how to enable HTTPS for the domain - using - AzureFrontDoor managed certificate or user's own certificate. If not specified, enabling ssl - uses AzureFrontDoor managed certificate by default. - :paramtype tls_settings: ~azure.mgmt.cdn.models.AFDDomainHttpsParameters - :keyword azure_dns_zone: Resource reference to the Azure DNS zone. - :paramtype azure_dns_zone: ~azure.mgmt.cdn.models.ResourceReference - :keyword pre_validated_custom_domain_resource_id: Resource reference to the Azure resource - where custom domain ownership was prevalidated. - :paramtype pre_validated_custom_domain_resource_id: ~azure.mgmt.cdn.models.ResourceReference - """ - super().__init__(**kwargs) - self.profile_name: Optional[str] = None - self.tls_settings = tls_settings - self.azure_dns_zone = azure_dns_zone - self.pre_validated_custom_domain_resource_id = pre_validated_custom_domain_resource_id - - -class TrackedResource(Resource): - """The resource model definition for an Azure Resource Manager tracked top level resource which - has 'tags' and a 'location'. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to server. - - :ivar id: Fully qualified resource ID for the resource. E.g. - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy - information. - :vartype system_data: ~azure.mgmt.cdn.models.SystemData - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - :ivar location: The geo-location where the resource lives. Required. - :vartype location: str - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "system_data": {"readonly": True}, - "location": {"required": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "system_data": {"key": "systemData", "type": "SystemData"}, - "tags": {"key": "tags", "type": "{str}"}, - "location": {"key": "location", "type": "str"}, - } - - def __init__(self, *, location: str, tags: Optional[dict[str, str]] = None, **kwargs: Any) -> None: - """ - :keyword tags: Resource tags. - :paramtype tags: dict[str, str] - :keyword location: The geo-location where the resource lives. Required. - :paramtype location: str - """ - super().__init__(**kwargs) - self.tags = tags - self.location = location - - -class AFDEndpoint(TrackedResource): - """Azure Front Door endpoint is the entity within a Azure Front Door profile containing - configuration information such as origin, protocol, content caching and delivery behavior. The - AzureFrontDoor endpoint uses the URL format :code:``.azureedge.net. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to server. - - :ivar id: Fully qualified resource ID for the resource. E.g. - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy - information. - :vartype system_data: ~azure.mgmt.cdn.models.SystemData - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - :ivar location: The geo-location where the resource lives. Required. - :vartype location: str - :ivar profile_name: The name of the profile which holds the endpoint. - :vartype profile_name: str - :ivar enabled_state: Whether to enable use of this rule. Permitted values are 'Enabled' or - 'Disabled'. Known values are: "Enabled" and "Disabled". - :vartype enabled_state: str or ~azure.mgmt.cdn.models.EnabledState - :ivar provisioning_state: Provisioning status. Known values are: "Succeeded", "Failed", - "Updating", "Deleting", and "Creating". - :vartype provisioning_state: str or ~azure.mgmt.cdn.models.AfdProvisioningState - :ivar deployment_status: Known values are: "NotStarted", "InProgress", "Succeeded", and - "Failed". - :vartype deployment_status: str or ~azure.mgmt.cdn.models.DeploymentStatus - :ivar host_name: The host name of the endpoint structured as {endpointName}.{DNSZone}, e.g. - contoso.azureedge.net. - :vartype host_name: str - :ivar auto_generated_domain_name_label_scope: Indicates the endpoint name reuse scope. The - default value is TenantReuse. Known values are: "TenantReuse", "SubscriptionReuse", - "ResourceGroupReuse", and "NoReuse". - :vartype auto_generated_domain_name_label_scope: str or - ~azure.mgmt.cdn.models.AutoGeneratedDomainNameLabelScope - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "system_data": {"readonly": True}, - "location": {"required": True}, - "profile_name": {"readonly": True}, - "provisioning_state": {"readonly": True}, - "deployment_status": {"readonly": True}, - "host_name": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "system_data": {"key": "systemData", "type": "SystemData"}, - "tags": {"key": "tags", "type": "{str}"}, - "location": {"key": "location", "type": "str"}, - "profile_name": {"key": "properties.profileName", "type": "str"}, - "enabled_state": {"key": "properties.enabledState", "type": "str"}, - "provisioning_state": {"key": "properties.provisioningState", "type": "str"}, - "deployment_status": {"key": "properties.deploymentStatus", "type": "str"}, - "host_name": {"key": "properties.hostName", "type": "str"}, - "auto_generated_domain_name_label_scope": { - "key": "properties.autoGeneratedDomainNameLabelScope", - "type": "str", - }, - } - - def __init__( - self, - *, - location: str, - tags: Optional[dict[str, str]] = None, - enabled_state: Optional[Union[str, "_models.EnabledState"]] = None, - auto_generated_domain_name_label_scope: Optional[ - Union[str, "_models.AutoGeneratedDomainNameLabelScope"] - ] = None, - **kwargs: Any - ) -> None: - """ - :keyword tags: Resource tags. - :paramtype tags: dict[str, str] - :keyword location: The geo-location where the resource lives. Required. - :paramtype location: str - :keyword enabled_state: Whether to enable use of this rule. Permitted values are 'Enabled' or - 'Disabled'. Known values are: "Enabled" and "Disabled". - :paramtype enabled_state: str or ~azure.mgmt.cdn.models.EnabledState - :keyword auto_generated_domain_name_label_scope: Indicates the endpoint name reuse scope. The - default value is TenantReuse. Known values are: "TenantReuse", "SubscriptionReuse", - "ResourceGroupReuse", and "NoReuse". - :paramtype auto_generated_domain_name_label_scope: str or - ~azure.mgmt.cdn.models.AutoGeneratedDomainNameLabelScope - """ - super().__init__(tags=tags, location=location, **kwargs) - self.profile_name: Optional[str] = None - self.enabled_state = enabled_state - self.provisioning_state: Optional[Union[str, "_models.AfdProvisioningState"]] = None - self.deployment_status: Optional[Union[str, "_models.DeploymentStatus"]] = None - self.host_name: Optional[str] = None - self.auto_generated_domain_name_label_scope = auto_generated_domain_name_label_scope - - -class AFDEndpointListResult(_serialization.Model): - """Result of the request to list endpoints. It contains a list of endpoint objects and a URL link - to get the next set of results. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: List of AzureFrontDoor endpoints within a profile. - :vartype value: list[~azure.mgmt.cdn.models.AFDEndpoint] - :ivar next_link: URL to get the next set of endpoint objects if there is any. - :vartype next_link: str - """ - - _validation = { - "value": {"readonly": True}, - } - - _attribute_map = { - "value": {"key": "value", "type": "[AFDEndpoint]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__(self, *, next_link: Optional[str] = None, **kwargs: Any) -> None: - """ - :keyword next_link: URL to get the next set of endpoint objects if there is any. - :paramtype next_link: str - """ - super().__init__(**kwargs) - self.value: Optional[list["_models.AFDEndpoint"]] = None - self.next_link = next_link - - -class AFDEndpointPropertiesUpdateParameters(_serialization.Model): - """The JSON object containing endpoint update parameters. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar profile_name: The name of the profile which holds the endpoint. - :vartype profile_name: str - :ivar enabled_state: Whether to enable use of this rule. Permitted values are 'Enabled' or - 'Disabled'. Known values are: "Enabled" and "Disabled". - :vartype enabled_state: str or ~azure.mgmt.cdn.models.EnabledState - """ - - _validation = { - "profile_name": {"readonly": True}, - } - - _attribute_map = { - "profile_name": {"key": "profileName", "type": "str"}, - "enabled_state": {"key": "enabledState", "type": "str"}, - } - - def __init__(self, *, enabled_state: Optional[Union[str, "_models.EnabledState"]] = None, **kwargs: Any) -> None: - """ - :keyword enabled_state: Whether to enable use of this rule. Permitted values are 'Enabled' or - 'Disabled'. Known values are: "Enabled" and "Disabled". - :paramtype enabled_state: str or ~azure.mgmt.cdn.models.EnabledState - """ - super().__init__(**kwargs) - self.profile_name: Optional[str] = None - self.enabled_state = enabled_state - - -class AFDEndpointProperties(AFDEndpointPropertiesUpdateParameters, AFDStateProperties): - """The JSON object that contains the properties required to create an endpoint. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar provisioning_state: Provisioning status. Known values are: "Succeeded", "Failed", - "Updating", "Deleting", and "Creating". - :vartype provisioning_state: str or ~azure.mgmt.cdn.models.AfdProvisioningState - :ivar deployment_status: Known values are: "NotStarted", "InProgress", "Succeeded", and - "Failed". - :vartype deployment_status: str or ~azure.mgmt.cdn.models.DeploymentStatus - :ivar profile_name: The name of the profile which holds the endpoint. - :vartype profile_name: str - :ivar enabled_state: Whether to enable use of this rule. Permitted values are 'Enabled' or - 'Disabled'. Known values are: "Enabled" and "Disabled". - :vartype enabled_state: str or ~azure.mgmt.cdn.models.EnabledState - :ivar host_name: The host name of the endpoint structured as {endpointName}.{DNSZone}, e.g. - contoso.azureedge.net. - :vartype host_name: str - :ivar auto_generated_domain_name_label_scope: Indicates the endpoint name reuse scope. The - default value is TenantReuse. Known values are: "TenantReuse", "SubscriptionReuse", - "ResourceGroupReuse", and "NoReuse". - :vartype auto_generated_domain_name_label_scope: str or - ~azure.mgmt.cdn.models.AutoGeneratedDomainNameLabelScope - """ - - _validation = { - "provisioning_state": {"readonly": True}, - "deployment_status": {"readonly": True}, - "profile_name": {"readonly": True}, - "host_name": {"readonly": True}, - } - - _attribute_map = { - "provisioning_state": {"key": "provisioningState", "type": "str"}, - "deployment_status": {"key": "deploymentStatus", "type": "str"}, - "profile_name": {"key": "profileName", "type": "str"}, - "enabled_state": {"key": "enabledState", "type": "str"}, - "host_name": {"key": "hostName", "type": "str"}, - "auto_generated_domain_name_label_scope": {"key": "autoGeneratedDomainNameLabelScope", "type": "str"}, - } - - def __init__( - self, - *, - enabled_state: Optional[Union[str, "_models.EnabledState"]] = None, - auto_generated_domain_name_label_scope: Optional[ - Union[str, "_models.AutoGeneratedDomainNameLabelScope"] - ] = None, - **kwargs: Any - ) -> None: - """ - :keyword enabled_state: Whether to enable use of this rule. Permitted values are 'Enabled' or - 'Disabled'. Known values are: "Enabled" and "Disabled". - :paramtype enabled_state: str or ~azure.mgmt.cdn.models.EnabledState - :keyword auto_generated_domain_name_label_scope: Indicates the endpoint name reuse scope. The - default value is TenantReuse. Known values are: "TenantReuse", "SubscriptionReuse", - "ResourceGroupReuse", and "NoReuse". - :paramtype auto_generated_domain_name_label_scope: str or - ~azure.mgmt.cdn.models.AutoGeneratedDomainNameLabelScope - """ - super().__init__(enabled_state=enabled_state, **kwargs) - self.provisioning_state: Optional[Union[str, "_models.AfdProvisioningState"]] = None - self.deployment_status: Optional[Union[str, "_models.DeploymentStatus"]] = None - self.host_name: Optional[str] = None - self.auto_generated_domain_name_label_scope = auto_generated_domain_name_label_scope - self.profile_name: Optional[str] = None - self.enabled_state = enabled_state - - -class AFDEndpointUpdateParameters(_serialization.Model): - """Properties required to create or update an endpoint. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar tags: Endpoint tags. - :vartype tags: dict[str, str] - :ivar profile_name: The name of the profile which holds the endpoint. - :vartype profile_name: str - :ivar enabled_state: Whether to enable use of this rule. Permitted values are 'Enabled' or - 'Disabled'. Known values are: "Enabled" and "Disabled". - :vartype enabled_state: str or ~azure.mgmt.cdn.models.EnabledState - """ - - _validation = { - "profile_name": {"readonly": True}, - } - - _attribute_map = { - "tags": {"key": "tags", "type": "{str}"}, - "profile_name": {"key": "properties.profileName", "type": "str"}, - "enabled_state": {"key": "properties.enabledState", "type": "str"}, - } - - def __init__( - self, - *, - tags: Optional[dict[str, str]] = None, - enabled_state: Optional[Union[str, "_models.EnabledState"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword tags: Endpoint tags. - :paramtype tags: dict[str, str] - :keyword enabled_state: Whether to enable use of this rule. Permitted values are 'Enabled' or - 'Disabled'. Known values are: "Enabled" and "Disabled". - :paramtype enabled_state: str or ~azure.mgmt.cdn.models.EnabledState - """ - super().__init__(**kwargs) - self.tags = tags - self.profile_name: Optional[str] = None - self.enabled_state = enabled_state - - -class AFDOrigin(ProxyResource): - """Azure Front Door origin is the source of the content being delivered via Azure Front Door. When - the edge nodes represented by an endpoint do not have the requested content cached, they - attempt to fetch it from one or more of the configured origins. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. E.g. - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy - information. - :vartype system_data: ~azure.mgmt.cdn.models.SystemData - :ivar origin_group_name: The name of the origin group which contains this origin. - :vartype origin_group_name: str - :ivar azure_origin: Resource reference to the Azure origin resource. - :vartype azure_origin: ~azure.mgmt.cdn.models.ResourceReference - :ivar host_name: The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses - are supported.This should be unique across all origins in an endpoint. - :vartype host_name: str - :ivar http_port: The value of the HTTP port. Must be between 1 and 65535. - :vartype http_port: int - :ivar https_port: The value of the HTTPS port. Must be between 1 and 65535. - :vartype https_port: int - :ivar origin_host_header: The host header value sent to the origin with each request. If you - leave this blank, the request hostname determines this value. Azure Front Door origins, such as - Web Apps, Blob Storage, and Cloud Services require this host header value to match the origin - hostname by default. This overrides the host header defined at Endpoint. - :vartype origin_host_header: str - :ivar priority: Priority of origin in given origin group for load balancing. Higher priorities - will not be used for load balancing if any lower priority origin is healthy.Must be between 1 - and 5. - :vartype priority: int - :ivar weight: Weight of the origin in given origin group for load balancing. Must be between 1 - and 1000. - :vartype weight: int - :ivar shared_private_link_resource: The properties of the private link resource for private - origin. - :vartype shared_private_link_resource: - ~azure.mgmt.cdn.models.SharedPrivateLinkResourceProperties - :ivar enabled_state: Whether to enable health probes to be made against backends defined under - backendPools. Health probes can only be disabled if there is a single enabled backend in single - enabled backend pool. Known values are: "Enabled" and "Disabled". - :vartype enabled_state: str or ~azure.mgmt.cdn.models.EnabledState - :ivar enforce_certificate_name_check: Whether to enable certificate name check at origin level. - :vartype enforce_certificate_name_check: bool - :ivar provisioning_state: Provisioning status. Known values are: "Succeeded", "Failed", - "Updating", "Deleting", and "Creating". - :vartype provisioning_state: str or ~azure.mgmt.cdn.models.AfdProvisioningState - :ivar deployment_status: Known values are: "NotStarted", "InProgress", "Succeeded", and - "Failed". - :vartype deployment_status: str or ~azure.mgmt.cdn.models.DeploymentStatus - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "system_data": {"readonly": True}, - "origin_group_name": {"readonly": True}, - "http_port": {"maximum": 65535, "minimum": 1}, - "https_port": {"maximum": 65535, "minimum": 1}, - "priority": {"maximum": 5, "minimum": 1}, - "weight": {"maximum": 1000, "minimum": 1}, - "provisioning_state": {"readonly": True}, - "deployment_status": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "system_data": {"key": "systemData", "type": "SystemData"}, - "origin_group_name": {"key": "properties.originGroupName", "type": "str"}, - "azure_origin": {"key": "properties.azureOrigin", "type": "ResourceReference"}, - "host_name": {"key": "properties.hostName", "type": "str"}, - "http_port": {"key": "properties.httpPort", "type": "int"}, - "https_port": {"key": "properties.httpsPort", "type": "int"}, - "origin_host_header": {"key": "properties.originHostHeader", "type": "str"}, - "priority": {"key": "properties.priority", "type": "int"}, - "weight": {"key": "properties.weight", "type": "int"}, - "shared_private_link_resource": { - "key": "properties.sharedPrivateLinkResource", - "type": "SharedPrivateLinkResourceProperties", - }, - "enabled_state": {"key": "properties.enabledState", "type": "str"}, - "enforce_certificate_name_check": {"key": "properties.enforceCertificateNameCheck", "type": "bool"}, - "provisioning_state": {"key": "properties.provisioningState", "type": "str"}, - "deployment_status": {"key": "properties.deploymentStatus", "type": "str"}, - } - - def __init__( - self, - *, - azure_origin: Optional["_models.ResourceReference"] = None, - host_name: Optional[str] = None, - http_port: int = 80, - https_port: int = 443, - origin_host_header: Optional[str] = None, - priority: Optional[int] = None, - weight: Optional[int] = None, - shared_private_link_resource: Optional["_models.SharedPrivateLinkResourceProperties"] = None, - enabled_state: Optional[Union[str, "_models.EnabledState"]] = None, - enforce_certificate_name_check: bool = True, - **kwargs: Any - ) -> None: - """ - :keyword azure_origin: Resource reference to the Azure origin resource. - :paramtype azure_origin: ~azure.mgmt.cdn.models.ResourceReference - :keyword host_name: The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses - are supported.This should be unique across all origins in an endpoint. - :paramtype host_name: str - :keyword http_port: The value of the HTTP port. Must be between 1 and 65535. - :paramtype http_port: int - :keyword https_port: The value of the HTTPS port. Must be between 1 and 65535. - :paramtype https_port: int - :keyword origin_host_header: The host header value sent to the origin with each request. If you - leave this blank, the request hostname determines this value. Azure Front Door origins, such as - Web Apps, Blob Storage, and Cloud Services require this host header value to match the origin - hostname by default. This overrides the host header defined at Endpoint. - :paramtype origin_host_header: str - :keyword priority: Priority of origin in given origin group for load balancing. Higher - priorities will not be used for load balancing if any lower priority origin is healthy.Must be - between 1 and 5. - :paramtype priority: int - :keyword weight: Weight of the origin in given origin group for load balancing. Must be between - 1 and 1000. - :paramtype weight: int - :keyword shared_private_link_resource: The properties of the private link resource for private - origin. - :paramtype shared_private_link_resource: - ~azure.mgmt.cdn.models.SharedPrivateLinkResourceProperties - :keyword enabled_state: Whether to enable health probes to be made against backends defined - under backendPools. Health probes can only be disabled if there is a single enabled backend in - single enabled backend pool. Known values are: "Enabled" and "Disabled". - :paramtype enabled_state: str or ~azure.mgmt.cdn.models.EnabledState - :keyword enforce_certificate_name_check: Whether to enable certificate name check at origin - level. - :paramtype enforce_certificate_name_check: bool - """ - super().__init__(**kwargs) - self.origin_group_name: Optional[str] = None - self.azure_origin = azure_origin - self.host_name = host_name - self.http_port = http_port - self.https_port = https_port - self.origin_host_header = origin_host_header - self.priority = priority - self.weight = weight - self.shared_private_link_resource = shared_private_link_resource - self.enabled_state = enabled_state - self.enforce_certificate_name_check = enforce_certificate_name_check - self.provisioning_state: Optional[Union[str, "_models.AfdProvisioningState"]] = None - self.deployment_status: Optional[Union[str, "_models.DeploymentStatus"]] = None - - -class AFDOriginGroup(ProxyResource): - """AFDOrigin group comprising of origins is used for load balancing to origins when the content - cannot be served from Azure Front Door. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. E.g. - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy - information. - :vartype system_data: ~azure.mgmt.cdn.models.SystemData - :ivar profile_name: The name of the profile which holds the origin group. - :vartype profile_name: str - :ivar load_balancing_settings: Load balancing settings for a backend pool. - :vartype load_balancing_settings: ~azure.mgmt.cdn.models.LoadBalancingSettingsParameters - :ivar health_probe_settings: Health probe settings to the origin that is used to determine the - health of the origin. - :vartype health_probe_settings: ~azure.mgmt.cdn.models.HealthProbeParameters - :ivar traffic_restoration_time_to_healed_or_new_endpoints_in_minutes: Time in minutes to shift - the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new - endpoint is added. Default is 10 mins. This property is currently not supported. - :vartype traffic_restoration_time_to_healed_or_new_endpoints_in_minutes: int - :ivar session_affinity_state: Whether to allow session affinity on this host. Valid options are - 'Enabled' or 'Disabled'. Known values are: "Enabled" and "Disabled". - :vartype session_affinity_state: str or ~azure.mgmt.cdn.models.EnabledState - :ivar authentication: Authentication settings for origin in origin group. - :vartype authentication: ~azure.mgmt.cdn.models.OriginAuthenticationProperties - :ivar provisioning_state: Provisioning status. Known values are: "Succeeded", "Failed", - "Updating", "Deleting", and "Creating". - :vartype provisioning_state: str or ~azure.mgmt.cdn.models.AfdProvisioningState - :ivar deployment_status: Known values are: "NotStarted", "InProgress", "Succeeded", and - "Failed". - :vartype deployment_status: str or ~azure.mgmt.cdn.models.DeploymentStatus - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "system_data": {"readonly": True}, - "profile_name": {"readonly": True}, - "traffic_restoration_time_to_healed_or_new_endpoints_in_minutes": {"maximum": 50, "minimum": 0}, - "provisioning_state": {"readonly": True}, - "deployment_status": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "system_data": {"key": "systemData", "type": "SystemData"}, - "profile_name": {"key": "properties.profileName", "type": "str"}, - "load_balancing_settings": { - "key": "properties.loadBalancingSettings", - "type": "LoadBalancingSettingsParameters", - }, - "health_probe_settings": {"key": "properties.healthProbeSettings", "type": "HealthProbeParameters"}, - "traffic_restoration_time_to_healed_or_new_endpoints_in_minutes": { - "key": "properties.trafficRestorationTimeToHealedOrNewEndpointsInMinutes", - "type": "int", - }, - "session_affinity_state": {"key": "properties.sessionAffinityState", "type": "str"}, - "authentication": {"key": "properties.authentication", "type": "OriginAuthenticationProperties"}, - "provisioning_state": {"key": "properties.provisioningState", "type": "str"}, - "deployment_status": {"key": "properties.deploymentStatus", "type": "str"}, - } - - def __init__( - self, - *, - load_balancing_settings: Optional["_models.LoadBalancingSettingsParameters"] = None, - health_probe_settings: Optional["_models.HealthProbeParameters"] = None, - traffic_restoration_time_to_healed_or_new_endpoints_in_minutes: Optional[int] = None, - session_affinity_state: Optional[Union[str, "_models.EnabledState"]] = None, - authentication: Optional["_models.OriginAuthenticationProperties"] = None, - **kwargs: Any - ) -> None: - """ - :keyword load_balancing_settings: Load balancing settings for a backend pool. - :paramtype load_balancing_settings: ~azure.mgmt.cdn.models.LoadBalancingSettingsParameters - :keyword health_probe_settings: Health probe settings to the origin that is used to determine - the health of the origin. - :paramtype health_probe_settings: ~azure.mgmt.cdn.models.HealthProbeParameters - :keyword traffic_restoration_time_to_healed_or_new_endpoints_in_minutes: Time in minutes to - shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new - endpoint is added. Default is 10 mins. This property is currently not supported. - :paramtype traffic_restoration_time_to_healed_or_new_endpoints_in_minutes: int - :keyword session_affinity_state: Whether to allow session affinity on this host. Valid options - are 'Enabled' or 'Disabled'. Known values are: "Enabled" and "Disabled". - :paramtype session_affinity_state: str or ~azure.mgmt.cdn.models.EnabledState - :keyword authentication: Authentication settings for origin in origin group. - :paramtype authentication: ~azure.mgmt.cdn.models.OriginAuthenticationProperties - """ - super().__init__(**kwargs) - self.profile_name: Optional[str] = None - self.load_balancing_settings = load_balancing_settings - self.health_probe_settings = health_probe_settings - self.traffic_restoration_time_to_healed_or_new_endpoints_in_minutes = ( - traffic_restoration_time_to_healed_or_new_endpoints_in_minutes - ) - self.session_affinity_state = session_affinity_state - self.authentication = authentication - self.provisioning_state: Optional[Union[str, "_models.AfdProvisioningState"]] = None - self.deployment_status: Optional[Union[str, "_models.DeploymentStatus"]] = None - - -class AFDOriginGroupListResult(_serialization.Model): - """Result of the request to list origin groups. It contains a list of origin groups objects and a - URL link to get the next set of results. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: List of Azure Front Door origin groups within an Azure Front Door endpoint. - :vartype value: list[~azure.mgmt.cdn.models.AFDOriginGroup] - :ivar next_link: URL to get the next set of origin objects if there are any. - :vartype next_link: str - """ - - _validation = { - "value": {"readonly": True}, - } - - _attribute_map = { - "value": {"key": "value", "type": "[AFDOriginGroup]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__(self, *, next_link: Optional[str] = None, **kwargs: Any) -> None: - """ - :keyword next_link: URL to get the next set of origin objects if there are any. - :paramtype next_link: str - """ - super().__init__(**kwargs) - self.value: Optional[list["_models.AFDOriginGroup"]] = None - self.next_link = next_link - - -class AFDOriginGroupUpdatePropertiesParameters(_serialization.Model): - """The JSON object that contains the properties of the origin group. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar profile_name: The name of the profile which holds the origin group. - :vartype profile_name: str - :ivar load_balancing_settings: Load balancing settings for a backend pool. - :vartype load_balancing_settings: ~azure.mgmt.cdn.models.LoadBalancingSettingsParameters - :ivar health_probe_settings: Health probe settings to the origin that is used to determine the - health of the origin. - :vartype health_probe_settings: ~azure.mgmt.cdn.models.HealthProbeParameters - :ivar traffic_restoration_time_to_healed_or_new_endpoints_in_minutes: Time in minutes to shift - the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new - endpoint is added. Default is 10 mins. This property is currently not supported. - :vartype traffic_restoration_time_to_healed_or_new_endpoints_in_minutes: int - :ivar session_affinity_state: Whether to allow session affinity on this host. Valid options are - 'Enabled' or 'Disabled'. Known values are: "Enabled" and "Disabled". - :vartype session_affinity_state: str or ~azure.mgmt.cdn.models.EnabledState - :ivar authentication: Authentication settings for origin in origin group. - :vartype authentication: ~azure.mgmt.cdn.models.OriginAuthenticationProperties - """ - - _validation = { - "profile_name": {"readonly": True}, - "traffic_restoration_time_to_healed_or_new_endpoints_in_minutes": {"maximum": 50, "minimum": 0}, - } - - _attribute_map = { - "profile_name": {"key": "profileName", "type": "str"}, - "load_balancing_settings": {"key": "loadBalancingSettings", "type": "LoadBalancingSettingsParameters"}, - "health_probe_settings": {"key": "healthProbeSettings", "type": "HealthProbeParameters"}, - "traffic_restoration_time_to_healed_or_new_endpoints_in_minutes": { - "key": "trafficRestorationTimeToHealedOrNewEndpointsInMinutes", - "type": "int", - }, - "session_affinity_state": {"key": "sessionAffinityState", "type": "str"}, - "authentication": {"key": "authentication", "type": "OriginAuthenticationProperties"}, - } - - def __init__( - self, - *, - load_balancing_settings: Optional["_models.LoadBalancingSettingsParameters"] = None, - health_probe_settings: Optional["_models.HealthProbeParameters"] = None, - traffic_restoration_time_to_healed_or_new_endpoints_in_minutes: Optional[int] = None, - session_affinity_state: Optional[Union[str, "_models.EnabledState"]] = None, - authentication: Optional["_models.OriginAuthenticationProperties"] = None, - **kwargs: Any - ) -> None: - """ - :keyword load_balancing_settings: Load balancing settings for a backend pool. - :paramtype load_balancing_settings: ~azure.mgmt.cdn.models.LoadBalancingSettingsParameters - :keyword health_probe_settings: Health probe settings to the origin that is used to determine - the health of the origin. - :paramtype health_probe_settings: ~azure.mgmt.cdn.models.HealthProbeParameters - :keyword traffic_restoration_time_to_healed_or_new_endpoints_in_minutes: Time in minutes to - shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new - endpoint is added. Default is 10 mins. This property is currently not supported. - :paramtype traffic_restoration_time_to_healed_or_new_endpoints_in_minutes: int - :keyword session_affinity_state: Whether to allow session affinity on this host. Valid options - are 'Enabled' or 'Disabled'. Known values are: "Enabled" and "Disabled". - :paramtype session_affinity_state: str or ~azure.mgmt.cdn.models.EnabledState - :keyword authentication: Authentication settings for origin in origin group. - :paramtype authentication: ~azure.mgmt.cdn.models.OriginAuthenticationProperties - """ - super().__init__(**kwargs) - self.profile_name: Optional[str] = None - self.load_balancing_settings = load_balancing_settings - self.health_probe_settings = health_probe_settings - self.traffic_restoration_time_to_healed_or_new_endpoints_in_minutes = ( - traffic_restoration_time_to_healed_or_new_endpoints_in_minutes - ) - self.session_affinity_state = session_affinity_state - self.authentication = authentication - - -class AFDOriginGroupProperties(AFDOriginGroupUpdatePropertiesParameters, AFDStateProperties): - """The JSON object that contains the properties of the origin group. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar provisioning_state: Provisioning status. Known values are: "Succeeded", "Failed", - "Updating", "Deleting", and "Creating". - :vartype provisioning_state: str or ~azure.mgmt.cdn.models.AfdProvisioningState - :ivar deployment_status: Known values are: "NotStarted", "InProgress", "Succeeded", and - "Failed". - :vartype deployment_status: str or ~azure.mgmt.cdn.models.DeploymentStatus - :ivar profile_name: The name of the profile which holds the origin group. - :vartype profile_name: str - :ivar load_balancing_settings: Load balancing settings for a backend pool. - :vartype load_balancing_settings: ~azure.mgmt.cdn.models.LoadBalancingSettingsParameters - :ivar health_probe_settings: Health probe settings to the origin that is used to determine the - health of the origin. - :vartype health_probe_settings: ~azure.mgmt.cdn.models.HealthProbeParameters - :ivar traffic_restoration_time_to_healed_or_new_endpoints_in_minutes: Time in minutes to shift - the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new - endpoint is added. Default is 10 mins. This property is currently not supported. - :vartype traffic_restoration_time_to_healed_or_new_endpoints_in_minutes: int - :ivar session_affinity_state: Whether to allow session affinity on this host. Valid options are - 'Enabled' or 'Disabled'. Known values are: "Enabled" and "Disabled". - :vartype session_affinity_state: str or ~azure.mgmt.cdn.models.EnabledState - :ivar authentication: Authentication settings for origin in origin group. - :vartype authentication: ~azure.mgmt.cdn.models.OriginAuthenticationProperties - """ - - _validation = { - "provisioning_state": {"readonly": True}, - "deployment_status": {"readonly": True}, - "profile_name": {"readonly": True}, - "traffic_restoration_time_to_healed_or_new_endpoints_in_minutes": {"maximum": 50, "minimum": 0}, - } - - _attribute_map = { - "provisioning_state": {"key": "provisioningState", "type": "str"}, - "deployment_status": {"key": "deploymentStatus", "type": "str"}, - "profile_name": {"key": "profileName", "type": "str"}, - "load_balancing_settings": {"key": "loadBalancingSettings", "type": "LoadBalancingSettingsParameters"}, - "health_probe_settings": {"key": "healthProbeSettings", "type": "HealthProbeParameters"}, - "traffic_restoration_time_to_healed_or_new_endpoints_in_minutes": { - "key": "trafficRestorationTimeToHealedOrNewEndpointsInMinutes", - "type": "int", - }, - "session_affinity_state": {"key": "sessionAffinityState", "type": "str"}, - "authentication": {"key": "authentication", "type": "OriginAuthenticationProperties"}, - } - - def __init__( - self, - *, - load_balancing_settings: Optional["_models.LoadBalancingSettingsParameters"] = None, - health_probe_settings: Optional["_models.HealthProbeParameters"] = None, - traffic_restoration_time_to_healed_or_new_endpoints_in_minutes: Optional[int] = None, - session_affinity_state: Optional[Union[str, "_models.EnabledState"]] = None, - authentication: Optional["_models.OriginAuthenticationProperties"] = None, - **kwargs: Any - ) -> None: - """ - :keyword load_balancing_settings: Load balancing settings for a backend pool. - :paramtype load_balancing_settings: ~azure.mgmt.cdn.models.LoadBalancingSettingsParameters - :keyword health_probe_settings: Health probe settings to the origin that is used to determine - the health of the origin. - :paramtype health_probe_settings: ~azure.mgmt.cdn.models.HealthProbeParameters - :keyword traffic_restoration_time_to_healed_or_new_endpoints_in_minutes: Time in minutes to - shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new - endpoint is added. Default is 10 mins. This property is currently not supported. - :paramtype traffic_restoration_time_to_healed_or_new_endpoints_in_minutes: int - :keyword session_affinity_state: Whether to allow session affinity on this host. Valid options - are 'Enabled' or 'Disabled'. Known values are: "Enabled" and "Disabled". - :paramtype session_affinity_state: str or ~azure.mgmt.cdn.models.EnabledState - :keyword authentication: Authentication settings for origin in origin group. - :paramtype authentication: ~azure.mgmt.cdn.models.OriginAuthenticationProperties - """ - super().__init__( - load_balancing_settings=load_balancing_settings, - health_probe_settings=health_probe_settings, - traffic_restoration_time_to_healed_or_new_endpoints_in_minutes=traffic_restoration_time_to_healed_or_new_endpoints_in_minutes, - session_affinity_state=session_affinity_state, - authentication=authentication, - **kwargs - ) - self.provisioning_state: Optional[Union[str, "_models.AfdProvisioningState"]] = None - self.deployment_status: Optional[Union[str, "_models.DeploymentStatus"]] = None - self.profile_name: Optional[str] = None - self.load_balancing_settings = load_balancing_settings - self.health_probe_settings = health_probe_settings - self.traffic_restoration_time_to_healed_or_new_endpoints_in_minutes = ( - traffic_restoration_time_to_healed_or_new_endpoints_in_minutes - ) - self.session_affinity_state = session_affinity_state - self.authentication = authentication - - -class AFDOriginGroupUpdateParameters(_serialization.Model): - """AFDOrigin group properties needed for origin group creation or update. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar profile_name: The name of the profile which holds the origin group. - :vartype profile_name: str - :ivar load_balancing_settings: Load balancing settings for a backend pool. - :vartype load_balancing_settings: ~azure.mgmt.cdn.models.LoadBalancingSettingsParameters - :ivar health_probe_settings: Health probe settings to the origin that is used to determine the - health of the origin. - :vartype health_probe_settings: ~azure.mgmt.cdn.models.HealthProbeParameters - :ivar traffic_restoration_time_to_healed_or_new_endpoints_in_minutes: Time in minutes to shift - the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new - endpoint is added. Default is 10 mins. This property is currently not supported. - :vartype traffic_restoration_time_to_healed_or_new_endpoints_in_minutes: int - :ivar session_affinity_state: Whether to allow session affinity on this host. Valid options are - 'Enabled' or 'Disabled'. Known values are: "Enabled" and "Disabled". - :vartype session_affinity_state: str or ~azure.mgmt.cdn.models.EnabledState - :ivar authentication: Authentication settings for origin in origin group. - :vartype authentication: ~azure.mgmt.cdn.models.OriginAuthenticationProperties - """ - - _validation = { - "profile_name": {"readonly": True}, - "traffic_restoration_time_to_healed_or_new_endpoints_in_minutes": {"maximum": 50, "minimum": 0}, - } - - _attribute_map = { - "profile_name": {"key": "properties.profileName", "type": "str"}, - "load_balancing_settings": { - "key": "properties.loadBalancingSettings", - "type": "LoadBalancingSettingsParameters", - }, - "health_probe_settings": {"key": "properties.healthProbeSettings", "type": "HealthProbeParameters"}, - "traffic_restoration_time_to_healed_or_new_endpoints_in_minutes": { - "key": "properties.trafficRestorationTimeToHealedOrNewEndpointsInMinutes", - "type": "int", - }, - "session_affinity_state": {"key": "properties.sessionAffinityState", "type": "str"}, - "authentication": {"key": "properties.authentication", "type": "OriginAuthenticationProperties"}, - } - - def __init__( - self, - *, - load_balancing_settings: Optional["_models.LoadBalancingSettingsParameters"] = None, - health_probe_settings: Optional["_models.HealthProbeParameters"] = None, - traffic_restoration_time_to_healed_or_new_endpoints_in_minutes: Optional[int] = None, - session_affinity_state: Optional[Union[str, "_models.EnabledState"]] = None, - authentication: Optional["_models.OriginAuthenticationProperties"] = None, - **kwargs: Any - ) -> None: - """ - :keyword load_balancing_settings: Load balancing settings for a backend pool. - :paramtype load_balancing_settings: ~azure.mgmt.cdn.models.LoadBalancingSettingsParameters - :keyword health_probe_settings: Health probe settings to the origin that is used to determine - the health of the origin. - :paramtype health_probe_settings: ~azure.mgmt.cdn.models.HealthProbeParameters - :keyword traffic_restoration_time_to_healed_or_new_endpoints_in_minutes: Time in minutes to - shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new - endpoint is added. Default is 10 mins. This property is currently not supported. - :paramtype traffic_restoration_time_to_healed_or_new_endpoints_in_minutes: int - :keyword session_affinity_state: Whether to allow session affinity on this host. Valid options - are 'Enabled' or 'Disabled'. Known values are: "Enabled" and "Disabled". - :paramtype session_affinity_state: str or ~azure.mgmt.cdn.models.EnabledState - :keyword authentication: Authentication settings for origin in origin group. - :paramtype authentication: ~azure.mgmt.cdn.models.OriginAuthenticationProperties - """ - super().__init__(**kwargs) - self.profile_name: Optional[str] = None - self.load_balancing_settings = load_balancing_settings - self.health_probe_settings = health_probe_settings - self.traffic_restoration_time_to_healed_or_new_endpoints_in_minutes = ( - traffic_restoration_time_to_healed_or_new_endpoints_in_minutes - ) - self.session_affinity_state = session_affinity_state - self.authentication = authentication - - -class AFDOriginListResult(_serialization.Model): - """Result of the request to list origins. It contains a list of origin objects and a URL link to - get the next set of results. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: List of Azure Front Door origins within an Azure Front Door endpoint. - :vartype value: list[~azure.mgmt.cdn.models.AFDOrigin] - :ivar next_link: URL to get the next set of origin objects if there are any. - :vartype next_link: str - """ - - _validation = { - "value": {"readonly": True}, - } - - _attribute_map = { - "value": {"key": "value", "type": "[AFDOrigin]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__(self, *, next_link: Optional[str] = None, **kwargs: Any) -> None: - """ - :keyword next_link: URL to get the next set of origin objects if there are any. - :paramtype next_link: str - """ - super().__init__(**kwargs) - self.value: Optional[list["_models.AFDOrigin"]] = None - self.next_link = next_link - - -class AFDOriginUpdatePropertiesParameters(_serialization.Model): - """The JSON object that contains the properties of the origin. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar origin_group_name: The name of the origin group which contains this origin. - :vartype origin_group_name: str - :ivar azure_origin: Resource reference to the Azure origin resource. - :vartype azure_origin: ~azure.mgmt.cdn.models.ResourceReference - :ivar host_name: The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses - are supported.This should be unique across all origins in an endpoint. - :vartype host_name: str - :ivar http_port: The value of the HTTP port. Must be between 1 and 65535. - :vartype http_port: int - :ivar https_port: The value of the HTTPS port. Must be between 1 and 65535. - :vartype https_port: int - :ivar origin_host_header: The host header value sent to the origin with each request. If you - leave this blank, the request hostname determines this value. Azure Front Door origins, such as - Web Apps, Blob Storage, and Cloud Services require this host header value to match the origin - hostname by default. This overrides the host header defined at Endpoint. - :vartype origin_host_header: str - :ivar priority: Priority of origin in given origin group for load balancing. Higher priorities - will not be used for load balancing if any lower priority origin is healthy.Must be between 1 - and 5. - :vartype priority: int - :ivar weight: Weight of the origin in given origin group for load balancing. Must be between 1 - and 1000. - :vartype weight: int - :ivar shared_private_link_resource: The properties of the private link resource for private - origin. - :vartype shared_private_link_resource: - ~azure.mgmt.cdn.models.SharedPrivateLinkResourceProperties - :ivar enabled_state: Whether to enable health probes to be made against backends defined under - backendPools. Health probes can only be disabled if there is a single enabled backend in single - enabled backend pool. Known values are: "Enabled" and "Disabled". - :vartype enabled_state: str or ~azure.mgmt.cdn.models.EnabledState - :ivar enforce_certificate_name_check: Whether to enable certificate name check at origin level. - :vartype enforce_certificate_name_check: bool - """ - - _validation = { - "origin_group_name": {"readonly": True}, - "http_port": {"maximum": 65535, "minimum": 1}, - "https_port": {"maximum": 65535, "minimum": 1}, - "priority": {"maximum": 5, "minimum": 1}, - "weight": {"maximum": 1000, "minimum": 1}, - } - - _attribute_map = { - "origin_group_name": {"key": "originGroupName", "type": "str"}, - "azure_origin": {"key": "azureOrigin", "type": "ResourceReference"}, - "host_name": {"key": "hostName", "type": "str"}, - "http_port": {"key": "httpPort", "type": "int"}, - "https_port": {"key": "httpsPort", "type": "int"}, - "origin_host_header": {"key": "originHostHeader", "type": "str"}, - "priority": {"key": "priority", "type": "int"}, - "weight": {"key": "weight", "type": "int"}, - "shared_private_link_resource": { - "key": "sharedPrivateLinkResource", - "type": "SharedPrivateLinkResourceProperties", - }, - "enabled_state": {"key": "enabledState", "type": "str"}, - "enforce_certificate_name_check": {"key": "enforceCertificateNameCheck", "type": "bool"}, - } - - def __init__( - self, - *, - azure_origin: Optional["_models.ResourceReference"] = None, - host_name: Optional[str] = None, - http_port: int = 80, - https_port: int = 443, - origin_host_header: Optional[str] = None, - priority: Optional[int] = None, - weight: Optional[int] = None, - shared_private_link_resource: Optional["_models.SharedPrivateLinkResourceProperties"] = None, - enabled_state: Optional[Union[str, "_models.EnabledState"]] = None, - enforce_certificate_name_check: bool = True, - **kwargs: Any - ) -> None: - """ - :keyword azure_origin: Resource reference to the Azure origin resource. - :paramtype azure_origin: ~azure.mgmt.cdn.models.ResourceReference - :keyword host_name: The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses - are supported.This should be unique across all origins in an endpoint. - :paramtype host_name: str - :keyword http_port: The value of the HTTP port. Must be between 1 and 65535. - :paramtype http_port: int - :keyword https_port: The value of the HTTPS port. Must be between 1 and 65535. - :paramtype https_port: int - :keyword origin_host_header: The host header value sent to the origin with each request. If you - leave this blank, the request hostname determines this value. Azure Front Door origins, such as - Web Apps, Blob Storage, and Cloud Services require this host header value to match the origin - hostname by default. This overrides the host header defined at Endpoint. - :paramtype origin_host_header: str - :keyword priority: Priority of origin in given origin group for load balancing. Higher - priorities will not be used for load balancing if any lower priority origin is healthy.Must be - between 1 and 5. - :paramtype priority: int - :keyword weight: Weight of the origin in given origin group for load balancing. Must be between - 1 and 1000. - :paramtype weight: int - :keyword shared_private_link_resource: The properties of the private link resource for private - origin. - :paramtype shared_private_link_resource: - ~azure.mgmt.cdn.models.SharedPrivateLinkResourceProperties - :keyword enabled_state: Whether to enable health probes to be made against backends defined - under backendPools. Health probes can only be disabled if there is a single enabled backend in - single enabled backend pool. Known values are: "Enabled" and "Disabled". - :paramtype enabled_state: str or ~azure.mgmt.cdn.models.EnabledState - :keyword enforce_certificate_name_check: Whether to enable certificate name check at origin - level. - :paramtype enforce_certificate_name_check: bool - """ - super().__init__(**kwargs) - self.origin_group_name: Optional[str] = None - self.azure_origin = azure_origin - self.host_name = host_name - self.http_port = http_port - self.https_port = https_port - self.origin_host_header = origin_host_header - self.priority = priority - self.weight = weight - self.shared_private_link_resource = shared_private_link_resource - self.enabled_state = enabled_state - self.enforce_certificate_name_check = enforce_certificate_name_check - - -class AFDOriginProperties(AFDOriginUpdatePropertiesParameters, AFDStateProperties): - """The JSON object that contains the properties of the origin. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar provisioning_state: Provisioning status. Known values are: "Succeeded", "Failed", - "Updating", "Deleting", and "Creating". - :vartype provisioning_state: str or ~azure.mgmt.cdn.models.AfdProvisioningState - :ivar deployment_status: Known values are: "NotStarted", "InProgress", "Succeeded", and - "Failed". - :vartype deployment_status: str or ~azure.mgmt.cdn.models.DeploymentStatus - :ivar origin_group_name: The name of the origin group which contains this origin. - :vartype origin_group_name: str - :ivar azure_origin: Resource reference to the Azure origin resource. - :vartype azure_origin: ~azure.mgmt.cdn.models.ResourceReference - :ivar host_name: The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses - are supported.This should be unique across all origins in an endpoint. - :vartype host_name: str - :ivar http_port: The value of the HTTP port. Must be between 1 and 65535. - :vartype http_port: int - :ivar https_port: The value of the HTTPS port. Must be between 1 and 65535. - :vartype https_port: int - :ivar origin_host_header: The host header value sent to the origin with each request. If you - leave this blank, the request hostname determines this value. Azure Front Door origins, such as - Web Apps, Blob Storage, and Cloud Services require this host header value to match the origin - hostname by default. This overrides the host header defined at Endpoint. - :vartype origin_host_header: str - :ivar priority: Priority of origin in given origin group for load balancing. Higher priorities - will not be used for load balancing if any lower priority origin is healthy.Must be between 1 - and 5. - :vartype priority: int - :ivar weight: Weight of the origin in given origin group for load balancing. Must be between 1 - and 1000. - :vartype weight: int - :ivar shared_private_link_resource: The properties of the private link resource for private - origin. - :vartype shared_private_link_resource: - ~azure.mgmt.cdn.models.SharedPrivateLinkResourceProperties - :ivar enabled_state: Whether to enable health probes to be made against backends defined under - backendPools. Health probes can only be disabled if there is a single enabled backend in single - enabled backend pool. Known values are: "Enabled" and "Disabled". - :vartype enabled_state: str or ~azure.mgmt.cdn.models.EnabledState - :ivar enforce_certificate_name_check: Whether to enable certificate name check at origin level. - :vartype enforce_certificate_name_check: bool - """ - - _validation = { - "provisioning_state": {"readonly": True}, - "deployment_status": {"readonly": True}, - "origin_group_name": {"readonly": True}, - "http_port": {"maximum": 65535, "minimum": 1}, - "https_port": {"maximum": 65535, "minimum": 1}, - "priority": {"maximum": 5, "minimum": 1}, - "weight": {"maximum": 1000, "minimum": 1}, - } - - _attribute_map = { - "provisioning_state": {"key": "provisioningState", "type": "str"}, - "deployment_status": {"key": "deploymentStatus", "type": "str"}, - "origin_group_name": {"key": "originGroupName", "type": "str"}, - "azure_origin": {"key": "azureOrigin", "type": "ResourceReference"}, - "host_name": {"key": "hostName", "type": "str"}, - "http_port": {"key": "httpPort", "type": "int"}, - "https_port": {"key": "httpsPort", "type": "int"}, - "origin_host_header": {"key": "originHostHeader", "type": "str"}, - "priority": {"key": "priority", "type": "int"}, - "weight": {"key": "weight", "type": "int"}, - "shared_private_link_resource": { - "key": "sharedPrivateLinkResource", - "type": "SharedPrivateLinkResourceProperties", - }, - "enabled_state": {"key": "enabledState", "type": "str"}, - "enforce_certificate_name_check": {"key": "enforceCertificateNameCheck", "type": "bool"}, - } - - def __init__( - self, - *, - azure_origin: Optional["_models.ResourceReference"] = None, - host_name: Optional[str] = None, - http_port: int = 80, - https_port: int = 443, - origin_host_header: Optional[str] = None, - priority: Optional[int] = None, - weight: Optional[int] = None, - shared_private_link_resource: Optional["_models.SharedPrivateLinkResourceProperties"] = None, - enabled_state: Optional[Union[str, "_models.EnabledState"]] = None, - enforce_certificate_name_check: bool = True, - **kwargs: Any - ) -> None: - """ - :keyword azure_origin: Resource reference to the Azure origin resource. - :paramtype azure_origin: ~azure.mgmt.cdn.models.ResourceReference - :keyword host_name: The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses - are supported.This should be unique across all origins in an endpoint. - :paramtype host_name: str - :keyword http_port: The value of the HTTP port. Must be between 1 and 65535. - :paramtype http_port: int - :keyword https_port: The value of the HTTPS port. Must be between 1 and 65535. - :paramtype https_port: int - :keyword origin_host_header: The host header value sent to the origin with each request. If you - leave this blank, the request hostname determines this value. Azure Front Door origins, such as - Web Apps, Blob Storage, and Cloud Services require this host header value to match the origin - hostname by default. This overrides the host header defined at Endpoint. - :paramtype origin_host_header: str - :keyword priority: Priority of origin in given origin group for load balancing. Higher - priorities will not be used for load balancing if any lower priority origin is healthy.Must be - between 1 and 5. - :paramtype priority: int - :keyword weight: Weight of the origin in given origin group for load balancing. Must be between - 1 and 1000. - :paramtype weight: int - :keyword shared_private_link_resource: The properties of the private link resource for private - origin. - :paramtype shared_private_link_resource: - ~azure.mgmt.cdn.models.SharedPrivateLinkResourceProperties - :keyword enabled_state: Whether to enable health probes to be made against backends defined - under backendPools. Health probes can only be disabled if there is a single enabled backend in - single enabled backend pool. Known values are: "Enabled" and "Disabled". - :paramtype enabled_state: str or ~azure.mgmt.cdn.models.EnabledState - :keyword enforce_certificate_name_check: Whether to enable certificate name check at origin - level. - :paramtype enforce_certificate_name_check: bool - """ - super().__init__( - azure_origin=azure_origin, - host_name=host_name, - http_port=http_port, - https_port=https_port, - origin_host_header=origin_host_header, - priority=priority, - weight=weight, - shared_private_link_resource=shared_private_link_resource, - enabled_state=enabled_state, - enforce_certificate_name_check=enforce_certificate_name_check, - **kwargs - ) - self.provisioning_state: Optional[Union[str, "_models.AfdProvisioningState"]] = None - self.deployment_status: Optional[Union[str, "_models.DeploymentStatus"]] = None - self.origin_group_name: Optional[str] = None - self.azure_origin = azure_origin - self.host_name = host_name - self.http_port = http_port - self.https_port = https_port - self.origin_host_header = origin_host_header - self.priority = priority - self.weight = weight - self.shared_private_link_resource = shared_private_link_resource - self.enabled_state = enabled_state - self.enforce_certificate_name_check = enforce_certificate_name_check - - -class AFDOriginUpdateParameters(_serialization.Model): - """AFDOrigin properties needed for origin update. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar origin_group_name: The name of the origin group which contains this origin. - :vartype origin_group_name: str - :ivar azure_origin: Resource reference to the Azure origin resource. - :vartype azure_origin: ~azure.mgmt.cdn.models.ResourceReference - :ivar host_name: The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses - are supported.This should be unique across all origins in an endpoint. - :vartype host_name: str - :ivar http_port: The value of the HTTP port. Must be between 1 and 65535. - :vartype http_port: int - :ivar https_port: The value of the HTTPS port. Must be between 1 and 65535. - :vartype https_port: int - :ivar origin_host_header: The host header value sent to the origin with each request. If you - leave this blank, the request hostname determines this value. Azure Front Door origins, such as - Web Apps, Blob Storage, and Cloud Services require this host header value to match the origin - hostname by default. This overrides the host header defined at Endpoint. - :vartype origin_host_header: str - :ivar priority: Priority of origin in given origin group for load balancing. Higher priorities - will not be used for load balancing if any lower priority origin is healthy.Must be between 1 - and 5. - :vartype priority: int - :ivar weight: Weight of the origin in given origin group for load balancing. Must be between 1 - and 1000. - :vartype weight: int - :ivar shared_private_link_resource: The properties of the private link resource for private - origin. - :vartype shared_private_link_resource: - ~azure.mgmt.cdn.models.SharedPrivateLinkResourceProperties - :ivar enabled_state: Whether to enable health probes to be made against backends defined under - backendPools. Health probes can only be disabled if there is a single enabled backend in single - enabled backend pool. Known values are: "Enabled" and "Disabled". - :vartype enabled_state: str or ~azure.mgmt.cdn.models.EnabledState - :ivar enforce_certificate_name_check: Whether to enable certificate name check at origin level. - :vartype enforce_certificate_name_check: bool - """ - - _validation = { - "origin_group_name": {"readonly": True}, - "http_port": {"maximum": 65535, "minimum": 1}, - "https_port": {"maximum": 65535, "minimum": 1}, - "priority": {"maximum": 5, "minimum": 1}, - "weight": {"maximum": 1000, "minimum": 1}, - } - - _attribute_map = { - "origin_group_name": {"key": "properties.originGroupName", "type": "str"}, - "azure_origin": {"key": "properties.azureOrigin", "type": "ResourceReference"}, - "host_name": {"key": "properties.hostName", "type": "str"}, - "http_port": {"key": "properties.httpPort", "type": "int"}, - "https_port": {"key": "properties.httpsPort", "type": "int"}, - "origin_host_header": {"key": "properties.originHostHeader", "type": "str"}, - "priority": {"key": "properties.priority", "type": "int"}, - "weight": {"key": "properties.weight", "type": "int"}, - "shared_private_link_resource": { - "key": "properties.sharedPrivateLinkResource", - "type": "SharedPrivateLinkResourceProperties", - }, - "enabled_state": {"key": "properties.enabledState", "type": "str"}, - "enforce_certificate_name_check": {"key": "properties.enforceCertificateNameCheck", "type": "bool"}, - } - - def __init__( - self, - *, - azure_origin: Optional["_models.ResourceReference"] = None, - host_name: Optional[str] = None, - http_port: int = 80, - https_port: int = 443, - origin_host_header: Optional[str] = None, - priority: Optional[int] = None, - weight: Optional[int] = None, - shared_private_link_resource: Optional["_models.SharedPrivateLinkResourceProperties"] = None, - enabled_state: Optional[Union[str, "_models.EnabledState"]] = None, - enforce_certificate_name_check: bool = True, - **kwargs: Any - ) -> None: - """ - :keyword azure_origin: Resource reference to the Azure origin resource. - :paramtype azure_origin: ~azure.mgmt.cdn.models.ResourceReference - :keyword host_name: The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses - are supported.This should be unique across all origins in an endpoint. - :paramtype host_name: str - :keyword http_port: The value of the HTTP port. Must be between 1 and 65535. - :paramtype http_port: int - :keyword https_port: The value of the HTTPS port. Must be between 1 and 65535. - :paramtype https_port: int - :keyword origin_host_header: The host header value sent to the origin with each request. If you - leave this blank, the request hostname determines this value. Azure Front Door origins, such as - Web Apps, Blob Storage, and Cloud Services require this host header value to match the origin - hostname by default. This overrides the host header defined at Endpoint. - :paramtype origin_host_header: str - :keyword priority: Priority of origin in given origin group for load balancing. Higher - priorities will not be used for load balancing if any lower priority origin is healthy.Must be - between 1 and 5. - :paramtype priority: int - :keyword weight: Weight of the origin in given origin group for load balancing. Must be between - 1 and 1000. - :paramtype weight: int - :keyword shared_private_link_resource: The properties of the private link resource for private - origin. - :paramtype shared_private_link_resource: - ~azure.mgmt.cdn.models.SharedPrivateLinkResourceProperties - :keyword enabled_state: Whether to enable health probes to be made against backends defined - under backendPools. Health probes can only be disabled if there is a single enabled backend in - single enabled backend pool. Known values are: "Enabled" and "Disabled". - :paramtype enabled_state: str or ~azure.mgmt.cdn.models.EnabledState - :keyword enforce_certificate_name_check: Whether to enable certificate name check at origin - level. - :paramtype enforce_certificate_name_check: bool - """ - super().__init__(**kwargs) - self.origin_group_name: Optional[str] = None - self.azure_origin = azure_origin - self.host_name = host_name - self.http_port = http_port - self.https_port = https_port - self.origin_host_header = origin_host_header - self.priority = priority - self.weight = weight - self.shared_private_link_resource = shared_private_link_resource - self.enabled_state = enabled_state - self.enforce_certificate_name_check = enforce_certificate_name_check - - -class AfdPurgeParameters(_serialization.Model): - """Parameters required for content purge. - - All required parameters must be populated in order to send to server. - - :ivar content_paths: The path to the content to be purged. Can describe a file path or a wild - card directory. Required. - :vartype content_paths: list[str] - :ivar domains: List of domains. - :vartype domains: list[str] - """ - - _validation = { - "content_paths": {"required": True}, - } - - _attribute_map = { - "content_paths": {"key": "contentPaths", "type": "[str]"}, - "domains": {"key": "domains", "type": "[str]"}, - } - - def __init__(self, *, content_paths: list[str], domains: Optional[list[str]] = None, **kwargs: Any) -> None: - """ - :keyword content_paths: The path to the content to be purged. Can describe a file path or a - wild card directory. Required. - :paramtype content_paths: list[str] - :keyword domains: List of domains. - :paramtype domains: list[str] - """ - super().__init__(**kwargs) - self.content_paths = content_paths - self.domains = domains - - -class AfdRouteCacheConfiguration(_serialization.Model): - """Caching settings for a caching-type route. To disable caching, do not provide a - cacheConfiguration object. - - :ivar query_string_caching_behavior: Defines how Frontdoor caches requests that include query - strings. You can ignore any query strings when caching, ignore specific query strings, cache - every request with a unique URL, or cache specific query strings. Known values are: - "IgnoreQueryString", "UseQueryString", "IgnoreSpecifiedQueryStrings", and - "IncludeSpecifiedQueryStrings". - :vartype query_string_caching_behavior: str or - ~azure.mgmt.cdn.models.AfdQueryStringCachingBehavior - :ivar query_parameters: query parameters to include or exclude (comma separated). - :vartype query_parameters: str - :ivar compression_settings: compression settings. - :vartype compression_settings: ~azure.mgmt.cdn.models.CompressionSettings - """ - - _attribute_map = { - "query_string_caching_behavior": {"key": "queryStringCachingBehavior", "type": "str"}, - "query_parameters": {"key": "queryParameters", "type": "str"}, - "compression_settings": {"key": "compressionSettings", "type": "CompressionSettings"}, - } - - def __init__( - self, - *, - query_string_caching_behavior: Optional[Union[str, "_models.AfdQueryStringCachingBehavior"]] = None, - query_parameters: Optional[str] = None, - compression_settings: Optional["_models.CompressionSettings"] = None, - **kwargs: Any - ) -> None: - """ - :keyword query_string_caching_behavior: Defines how Frontdoor caches requests that include - query strings. You can ignore any query strings when caching, ignore specific query strings, - cache every request with a unique URL, or cache specific query strings. Known values are: - "IgnoreQueryString", "UseQueryString", "IgnoreSpecifiedQueryStrings", and - "IncludeSpecifiedQueryStrings". - :paramtype query_string_caching_behavior: str or - ~azure.mgmt.cdn.models.AfdQueryStringCachingBehavior - :keyword query_parameters: query parameters to include or exclude (comma separated). - :paramtype query_parameters: str - :keyword compression_settings: compression settings. - :paramtype compression_settings: ~azure.mgmt.cdn.models.CompressionSettings - """ - super().__init__(**kwargs) - self.query_string_caching_behavior = query_string_caching_behavior - self.query_parameters = query_parameters - self.compression_settings = compression_settings - - -class Certificate(_serialization.Model): - """Certificate used for https. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar type: The type of the secret resource. Known values are: "UrlSigningKey", - "CustomerCertificate", "ManagedCertificate", and "AzureFirstPartyManagedCertificate". - :vartype type: str or ~azure.mgmt.cdn.models.SecretType - :ivar subject: Subject name in the certificate. - :vartype subject: str - :ivar expiration_date: Certificate expiration date. - :vartype expiration_date: str - """ - - _validation = { - "subject": {"readonly": True}, - "expiration_date": {"readonly": True}, - } - - _attribute_map = { - "type": {"key": "type", "type": "str"}, - "subject": {"key": "subject", "type": "str"}, - "expiration_date": {"key": "expirationDate", "type": "str"}, - } - - def __init__(self, *, type: Optional[Union[str, "_models.SecretType"]] = None, **kwargs: Any) -> None: - """ - :keyword type: The type of the secret resource. Known values are: "UrlSigningKey", - "CustomerCertificate", "ManagedCertificate", and "AzureFirstPartyManagedCertificate". - :paramtype type: str or ~azure.mgmt.cdn.models.SecretType - """ - super().__init__(**kwargs) - self.type = type - self.subject: Optional[str] = None - self.expiration_date: Optional[str] = None - - -class AzureFirstPartyManagedCertificate(Certificate): - """Azure FirstParty Managed Certificate provided by other first party resource providers to enable - HTTPS. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar type: The type of the secret resource. Known values are: "UrlSigningKey", - "CustomerCertificate", "ManagedCertificate", and "AzureFirstPartyManagedCertificate". - :vartype type: str or ~azure.mgmt.cdn.models.SecretType - :ivar subject: Subject name in the certificate. - :vartype subject: str - :ivar expiration_date: Certificate expiration date. - :vartype expiration_date: str - """ - - -class SecretParameters(_serialization.Model): - """The json object containing secret parameters. - - You probably want to use the sub-classes and not this class directly. Known sub-classes are: - AzureFirstPartyManagedCertificateParameters, CustomerCertificateParameters, - ManagedCertificateParameters, UrlSigningKeyParameters - - All required parameters must be populated in order to send to server. - - :ivar type: The type of the secret resource. Required. Known values are: "UrlSigningKey", - "CustomerCertificate", "ManagedCertificate", and "AzureFirstPartyManagedCertificate". - :vartype type: str or ~azure.mgmt.cdn.models.SecretType - """ - - _validation = { - "type": {"required": True}, - } - - _attribute_map = { - "type": {"key": "type", "type": "str"}, - } - - _subtype_map = { - "type": { - "AzureFirstPartyManagedCertificate": "AzureFirstPartyManagedCertificateParameters", - "CustomerCertificate": "CustomerCertificateParameters", - "ManagedCertificate": "ManagedCertificateParameters", - "UrlSigningKey": "UrlSigningKeyParameters", - } - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.type: Optional[str] = None - - -class AzureFirstPartyManagedCertificateParameters(SecretParameters): # pylint: disable=name-too-long - """Azure FirstParty Managed Certificate provided by other first party resource providers to enable - HTTPS. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to server. - - :ivar type: The type of the secret resource. Required. Known values are: "UrlSigningKey", - "CustomerCertificate", "ManagedCertificate", and "AzureFirstPartyManagedCertificate". - :vartype type: str or ~azure.mgmt.cdn.models.SecretType - :ivar secret_source: Resource reference to the Azure Key Vault certificate. Expected to be in - format of - /subscriptions/{​​​​​​​​​subscriptionId}​​​​​​​​​/resourceGroups/{​​​​​​​​​resourceGroupName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/providers/Microsoft.KeyVault/vaults/{vaultName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/secrets/{certificateName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​. - :vartype secret_source: ~azure.mgmt.cdn.models.ResourceReference - :ivar subject: Subject name in the certificate. - :vartype subject: str - :ivar expiration_date: Certificate expiration date. - :vartype expiration_date: str - :ivar certificate_authority: Certificate issuing authority. - :vartype certificate_authority: str - :ivar subject_alternative_names: The list of SANs. - :vartype subject_alternative_names: list[str] - :ivar thumbprint: Certificate thumbprint. - :vartype thumbprint: str - """ - - _validation = { - "type": {"required": True}, - "secret_source": {"readonly": True}, - "subject": {"readonly": True}, - "expiration_date": {"readonly": True}, - "certificate_authority": {"readonly": True}, - "thumbprint": {"readonly": True}, - } - - _attribute_map = { - "type": {"key": "type", "type": "str"}, - "secret_source": {"key": "secretSource", "type": "ResourceReference"}, - "subject": {"key": "subject", "type": "str"}, - "expiration_date": {"key": "expirationDate", "type": "str"}, - "certificate_authority": {"key": "certificateAuthority", "type": "str"}, - "subject_alternative_names": {"key": "subjectAlternativeNames", "type": "[str]"}, - "thumbprint": {"key": "thumbprint", "type": "str"}, - } - - def __init__(self, *, subject_alternative_names: Optional[list[str]] = None, **kwargs: Any) -> None: - """ - :keyword subject_alternative_names: The list of SANs. - :paramtype subject_alternative_names: list[str] - """ - super().__init__(**kwargs) - self.type: str = "AzureFirstPartyManagedCertificate" - self.secret_source: Optional["_models.ResourceReference"] = None - self.subject: Optional[str] = None - self.expiration_date: Optional[str] = None - self.certificate_authority: Optional[str] = None - self.subject_alternative_names = subject_alternative_names - self.thumbprint: Optional[str] = None - - -class CacheConfiguration(_serialization.Model): - """Caching settings for a caching-type route. To disable caching, do not provide a - cacheConfiguration object. - - :ivar query_string_caching_behavior: Defines how Frontdoor caches requests that include query - strings. You can ignore any query strings when caching, ignore specific query strings, cache - every request with a unique URL, or cache specific query strings. Known values are: - "IgnoreQueryString", "UseQueryString", "IgnoreSpecifiedQueryStrings", and - "IncludeSpecifiedQueryStrings". - :vartype query_string_caching_behavior: str or - ~azure.mgmt.cdn.models.RuleQueryStringCachingBehavior - :ivar query_parameters: query parameters to include or exclude (comma separated). - :vartype query_parameters: str - :ivar is_compression_enabled: Indicates whether content compression is enabled. If compression - is enabled, content will be served as compressed if user requests for a compressed version. - Content won't be compressed on AzureFrontDoor when requested content is smaller than 1 byte or - larger than 1 MB. Known values are: "Enabled" and "Disabled". - :vartype is_compression_enabled: str or ~azure.mgmt.cdn.models.RuleIsCompressionEnabled - :ivar cache_behavior: Caching behavior for the requests. Known values are: "HonorOrigin", - "OverrideAlways", and "OverrideIfOriginMissing". - :vartype cache_behavior: str or ~azure.mgmt.cdn.models.RuleCacheBehavior - :ivar cache_duration: The duration for which the content needs to be cached. Allowed format is - [d.]hh:mm:ss. - :vartype cache_duration: str - """ - - _attribute_map = { - "query_string_caching_behavior": {"key": "queryStringCachingBehavior", "type": "str"}, - "query_parameters": {"key": "queryParameters", "type": "str"}, - "is_compression_enabled": {"key": "isCompressionEnabled", "type": "str"}, - "cache_behavior": {"key": "cacheBehavior", "type": "str"}, - "cache_duration": {"key": "cacheDuration", "type": "str"}, - } - - def __init__( - self, - *, - query_string_caching_behavior: Optional[Union[str, "_models.RuleQueryStringCachingBehavior"]] = None, - query_parameters: Optional[str] = None, - is_compression_enabled: Optional[Union[str, "_models.RuleIsCompressionEnabled"]] = None, - cache_behavior: Optional[Union[str, "_models.RuleCacheBehavior"]] = None, - cache_duration: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword query_string_caching_behavior: Defines how Frontdoor caches requests that include - query strings. You can ignore any query strings when caching, ignore specific query strings, - cache every request with a unique URL, or cache specific query strings. Known values are: - "IgnoreQueryString", "UseQueryString", "IgnoreSpecifiedQueryStrings", and - "IncludeSpecifiedQueryStrings". - :paramtype query_string_caching_behavior: str or - ~azure.mgmt.cdn.models.RuleQueryStringCachingBehavior - :keyword query_parameters: query parameters to include or exclude (comma separated). - :paramtype query_parameters: str - :keyword is_compression_enabled: Indicates whether content compression is enabled. If - compression is enabled, content will be served as compressed if user requests for a compressed - version. Content won't be compressed on AzureFrontDoor when requested content is smaller than 1 - byte or larger than 1 MB. Known values are: "Enabled" and "Disabled". - :paramtype is_compression_enabled: str or ~azure.mgmt.cdn.models.RuleIsCompressionEnabled - :keyword cache_behavior: Caching behavior for the requests. Known values are: "HonorOrigin", - "OverrideAlways", and "OverrideIfOriginMissing". - :paramtype cache_behavior: str or ~azure.mgmt.cdn.models.RuleCacheBehavior - :keyword cache_duration: The duration for which the content needs to be cached. Allowed format - is [d.]hh:mm:ss. - :paramtype cache_duration: str - """ - super().__init__(**kwargs) - self.query_string_caching_behavior = query_string_caching_behavior - self.query_parameters = query_parameters - self.is_compression_enabled = is_compression_enabled - self.cache_behavior = cache_behavior - self.cache_duration = cache_duration - - -class DeliveryRuleActionParameters(_serialization.Model): - """Defines the parameters for delivery rule actions. - - You probably want to use the sub-classes and not this class directly. Known sub-classes are: - CacheExpirationActionParameters, CacheKeyQueryStringActionParameters, HeaderActionParameters, - OriginGroupOverrideActionParameters, RouteConfigurationOverrideActionParameters, - UrlRedirectActionParameters, UrlRewriteActionParameters, UrlSigningActionParameters - - All required parameters must be populated in order to send to server. - - :ivar type_name: Required. Known values are: "DeliveryRuleUrlRedirectActionParameters", - "DeliveryRuleUrlSigningActionParameters", "DeliveryRuleOriginGroupOverrideActionParameters", - "DeliveryRuleUrlRewriteActionParameters", "DeliveryRuleHeaderActionParameters", - "DeliveryRuleCacheExpirationActionParameters", - "DeliveryRuleCacheKeyQueryStringBehaviorActionParameters", and - "DeliveryRuleRouteConfigurationOverrideActionParameters". - :vartype type_name: str or ~azure.mgmt.cdn.models.DeliveryRuleActionParametersType - """ - - _validation = { - "type_name": {"required": True}, - } - - _attribute_map = { - "type_name": {"key": "typeName", "type": "str"}, - } - - _subtype_map = { - "type_name": { - "DeliveryRuleCacheExpirationActionParameters": "CacheExpirationActionParameters", - "DeliveryRuleCacheKeyQueryStringBehaviorActionParameters": "CacheKeyQueryStringActionParameters", - "DeliveryRuleHeaderActionParameters": "HeaderActionParameters", - "DeliveryRuleOriginGroupOverrideActionParameters": "OriginGroupOverrideActionParameters", - "DeliveryRuleRouteConfigurationOverrideActionParameters": "RouteConfigurationOverrideActionParameters", - "DeliveryRuleUrlRedirectActionParameters": "UrlRedirectActionParameters", - "DeliveryRuleUrlRewriteActionParameters": "UrlRewriteActionParameters", - "DeliveryRuleUrlSigningActionParameters": "UrlSigningActionParameters", - } - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.type_name: Optional[str] = None - - -class CacheExpirationActionParameters(DeliveryRuleActionParameters): - """Defines the parameters for the cache expiration action. - - All required parameters must be populated in order to send to server. - - :ivar type_name: Required. Known values are: "DeliveryRuleUrlRedirectActionParameters", - "DeliveryRuleUrlSigningActionParameters", "DeliveryRuleOriginGroupOverrideActionParameters", - "DeliveryRuleUrlRewriteActionParameters", "DeliveryRuleHeaderActionParameters", - "DeliveryRuleCacheExpirationActionParameters", - "DeliveryRuleCacheKeyQueryStringBehaviorActionParameters", and - "DeliveryRuleRouteConfigurationOverrideActionParameters". - :vartype type_name: str or ~azure.mgmt.cdn.models.DeliveryRuleActionParametersType - :ivar cache_behavior: Caching behavior for the requests. Required. Known values are: - "BypassCache", "Override", and "SetIfMissing". - :vartype cache_behavior: str or ~azure.mgmt.cdn.models.CacheBehavior - :ivar cache_type: The level at which the content needs to be cached. Required. "All" - :vartype cache_type: str or ~azure.mgmt.cdn.models.CacheType - :ivar cache_duration: The duration for which the content needs to be cached. Allowed format is - [d.]hh:mm:ss. - :vartype cache_duration: str - """ - - _validation = { - "type_name": {"required": True}, - "cache_behavior": {"required": True}, - "cache_type": {"required": True}, - } - - _attribute_map = { - "type_name": {"key": "typeName", "type": "str"}, - "cache_behavior": {"key": "cacheBehavior", "type": "str"}, - "cache_type": {"key": "cacheType", "type": "str"}, - "cache_duration": {"key": "cacheDuration", "type": "str"}, - } - - def __init__( - self, - *, - cache_behavior: Union[str, "_models.CacheBehavior"], - cache_type: Union[str, "_models.CacheType"], - cache_duration: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword cache_behavior: Caching behavior for the requests. Required. Known values are: - "BypassCache", "Override", and "SetIfMissing". - :paramtype cache_behavior: str or ~azure.mgmt.cdn.models.CacheBehavior - :keyword cache_type: The level at which the content needs to be cached. Required. "All" - :paramtype cache_type: str or ~azure.mgmt.cdn.models.CacheType - :keyword cache_duration: The duration for which the content needs to be cached. Allowed format - is [d.]hh:mm:ss. - :paramtype cache_duration: str - """ - super().__init__(**kwargs) - self.type_name: str = "DeliveryRuleCacheExpirationActionParameters" - self.cache_behavior = cache_behavior - self.cache_type = cache_type - self.cache_duration = cache_duration - - -class CacheKeyQueryStringActionParameters(DeliveryRuleActionParameters): - """Defines the parameters for the cache-key query string action. - - All required parameters must be populated in order to send to server. - - :ivar type_name: Required. Known values are: "DeliveryRuleUrlRedirectActionParameters", - "DeliveryRuleUrlSigningActionParameters", "DeliveryRuleOriginGroupOverrideActionParameters", - "DeliveryRuleUrlRewriteActionParameters", "DeliveryRuleHeaderActionParameters", - "DeliveryRuleCacheExpirationActionParameters", - "DeliveryRuleCacheKeyQueryStringBehaviorActionParameters", and - "DeliveryRuleRouteConfigurationOverrideActionParameters". - :vartype type_name: str or ~azure.mgmt.cdn.models.DeliveryRuleActionParametersType - :ivar query_string_behavior: Caching behavior for the requests. Required. Known values are: - "Include", "IncludeAll", "Exclude", and "ExcludeAll". - :vartype query_string_behavior: str or ~azure.mgmt.cdn.models.QueryStringBehavior - :ivar query_parameters: query parameters to include or exclude (comma separated). - :vartype query_parameters: str - """ - - _validation = { - "type_name": {"required": True}, - "query_string_behavior": {"required": True}, - } - - _attribute_map = { - "type_name": {"key": "typeName", "type": "str"}, - "query_string_behavior": {"key": "queryStringBehavior", "type": "str"}, - "query_parameters": {"key": "queryParameters", "type": "str"}, - } - - def __init__( - self, - *, - query_string_behavior: Union[str, "_models.QueryStringBehavior"], - query_parameters: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword query_string_behavior: Caching behavior for the requests. Required. Known values are: - "Include", "IncludeAll", "Exclude", and "ExcludeAll". - :paramtype query_string_behavior: str or ~azure.mgmt.cdn.models.QueryStringBehavior - :keyword query_parameters: query parameters to include or exclude (comma separated). - :paramtype query_parameters: str - """ - super().__init__(**kwargs) - self.type_name: str = "DeliveryRuleCacheKeyQueryStringBehaviorActionParameters" - self.query_string_behavior = query_string_behavior - self.query_parameters = query_parameters - - -class CanMigrateParameters(_serialization.Model): - """Request body for CanMigrate operation. - - All required parameters must be populated in order to send to server. - - :ivar classic_resource_reference: Resource reference of the classic cdn profile or classic - frontdoor that need to be migrated. Required. - :vartype classic_resource_reference: ~azure.mgmt.cdn.models.ResourceReference - """ - - _validation = { - "classic_resource_reference": {"required": True}, - } - - _attribute_map = { - "classic_resource_reference": {"key": "classicResourceReference", "type": "ResourceReference"}, - } - - def __init__(self, *, classic_resource_reference: "_models.ResourceReference", **kwargs: Any) -> None: - """ - :keyword classic_resource_reference: Resource reference of the classic cdn profile or classic - frontdoor that need to be migrated. Required. - :paramtype classic_resource_reference: ~azure.mgmt.cdn.models.ResourceReference - """ - super().__init__(**kwargs) - self.classic_resource_reference = classic_resource_reference - - -class CanMigrateResult(_serialization.Model): - """Result for canMigrate operation. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar type: Resource type. - :vartype type: str - :ivar can_migrate: Flag that says if the profile can be migrated. - :vartype can_migrate: bool - :ivar default_sku: Recommended sku for the migration. Known values are: - "Standard_AzureFrontDoor" and "Premium_AzureFrontDoor". - :vartype default_sku: str or ~azure.mgmt.cdn.models.CanMigrateDefaultSku - :ivar errors: - :vartype errors: list[~azure.mgmt.cdn.models.MigrationErrorType] - """ - - _validation = { - "id": {"readonly": True}, - "type": {"readonly": True}, - "can_migrate": {"readonly": True}, - "default_sku": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "can_migrate": {"key": "properties.canMigrate", "type": "bool"}, - "default_sku": {"key": "properties.defaultSku", "type": "str"}, - "errors": {"key": "properties.errors", "type": "[MigrationErrorType]"}, - } - - def __init__(self, *, errors: Optional[list["_models.MigrationErrorType"]] = None, **kwargs: Any) -> None: - """ - :keyword errors: - :paramtype errors: list[~azure.mgmt.cdn.models.MigrationErrorType] - """ - super().__init__(**kwargs) - self.id: Optional[str] = None - self.type: Optional[str] = None - self.can_migrate: Optional[bool] = None - self.default_sku: Optional[Union[str, "_models.CanMigrateDefaultSku"]] = None - self.errors = errors - - -class CertificateSourceParameters(_serialization.Model): - """Defines the parameters for certificate source. - - You probably want to use the sub-classes and not this class directly. Known sub-classes are: - CdnCertificateSourceParameters, KeyVaultCertificateSourceParameters - - All required parameters must be populated in order to send to server. - - :ivar type_name: Required. Known values are: "CdnCertificateSourceParameters" and - "KeyVaultCertificateSourceParameters". - :vartype type_name: str or ~azure.mgmt.cdn.models.CertificateSourceParametersType - """ - - _validation = { - "type_name": {"required": True}, - } - - _attribute_map = { - "type_name": {"key": "typeName", "type": "str"}, - } - - _subtype_map = { - "type_name": { - "CdnCertificateSourceParameters": "CdnCertificateSourceParameters", - "KeyVaultCertificateSourceParameters": "KeyVaultCertificateSourceParameters", - } - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.type_name: Optional[str] = None - - -class CdnCertificateSourceParameters(CertificateSourceParameters): - """Defines the parameters for using CDN managed certificate for securing custom domain. - - All required parameters must be populated in order to send to server. - - :ivar type_name: Required. Known values are: "CdnCertificateSourceParameters" and - "KeyVaultCertificateSourceParameters". - :vartype type_name: str or ~azure.mgmt.cdn.models.CertificateSourceParametersType - :ivar certificate_type: Type of certificate used. Required. Known values are: "Shared" and - "Dedicated". - :vartype certificate_type: str or ~azure.mgmt.cdn.models.CertificateType - """ - - _validation = { - "type_name": {"required": True}, - "certificate_type": {"required": True}, - } - - _attribute_map = { - "type_name": {"key": "typeName", "type": "str"}, - "certificate_type": {"key": "certificateType", "type": "str"}, - } - - def __init__(self, *, certificate_type: Union[str, "_models.CertificateType"], **kwargs: Any) -> None: - """ - :keyword certificate_type: Type of certificate used. Required. Known values are: "Shared" and - "Dedicated". - :paramtype certificate_type: str or ~azure.mgmt.cdn.models.CertificateType - """ - super().__init__(**kwargs) - self.type_name: str = "CdnCertificateSourceParameters" - self.certificate_type = certificate_type - - -class CdnEndpoint(_serialization.Model): - """Defines the ARM Resource ID for the linked endpoints. - - :ivar id: ARM Resource ID string. - :vartype id: str - """ - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - } - - def __init__(self, *, id: Optional[str] = None, **kwargs: Any) -> None: # pylint: disable=redefined-builtin - """ - :keyword id: ARM Resource ID string. - :paramtype id: str - """ - super().__init__(**kwargs) - self.id = id - - -class CustomDomainHttpsParameters(_serialization.Model): - """The JSON object that contains the properties to secure a custom domain. - - You probably want to use the sub-classes and not this class directly. Known sub-classes are: - UserManagedHttpsParameters, CdnManagedHttpsParameters - - All required parameters must be populated in order to send to server. - - :ivar certificate_source: Defines the source of the SSL certificate. Required. Known values - are: "AzureKeyVault" and "Cdn". - :vartype certificate_source: str or ~azure.mgmt.cdn.models.CertificateSource - :ivar protocol_type: Defines the TLS extension protocol that is used for secure delivery. - Required. Known values are: "ServerNameIndication" and "IPBased". - :vartype protocol_type: str or ~azure.mgmt.cdn.models.ProtocolType - :ivar minimum_tls_version: TLS protocol version that will be used for Https. Known values are: - "None", "TLS10", and "TLS12". - :vartype minimum_tls_version: str or ~azure.mgmt.cdn.models.MinimumTlsVersion - """ - - _validation = { - "certificate_source": {"required": True}, - "protocol_type": {"required": True}, - } - - _attribute_map = { - "certificate_source": {"key": "certificateSource", "type": "str"}, - "protocol_type": {"key": "protocolType", "type": "str"}, - "minimum_tls_version": {"key": "minimumTlsVersion", "type": "str"}, - } - - _subtype_map = { - "certificate_source": {"AzureKeyVault": "UserManagedHttpsParameters", "Cdn": "CdnManagedHttpsParameters"} - } - - def __init__( - self, - *, - protocol_type: Union[str, "_models.ProtocolType"], - minimum_tls_version: Optional[Union[str, "_models.MinimumTlsVersion"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword protocol_type: Defines the TLS extension protocol that is used for secure delivery. - Required. Known values are: "ServerNameIndication" and "IPBased". - :paramtype protocol_type: str or ~azure.mgmt.cdn.models.ProtocolType - :keyword minimum_tls_version: TLS protocol version that will be used for Https. Known values - are: "None", "TLS10", and "TLS12". - :paramtype minimum_tls_version: str or ~azure.mgmt.cdn.models.MinimumTlsVersion - """ - super().__init__(**kwargs) - self.certificate_source: Optional[str] = None - self.protocol_type = protocol_type - self.minimum_tls_version = minimum_tls_version - - -class CdnManagedHttpsParameters(CustomDomainHttpsParameters): - """Defines the certificate source parameters using CDN managed certificate for enabling SSL. - - All required parameters must be populated in order to send to server. - - :ivar certificate_source: Defines the source of the SSL certificate. Required. Known values - are: "AzureKeyVault" and "Cdn". - :vartype certificate_source: str or ~azure.mgmt.cdn.models.CertificateSource - :ivar protocol_type: Defines the TLS extension protocol that is used for secure delivery. - Required. Known values are: "ServerNameIndication" and "IPBased". - :vartype protocol_type: str or ~azure.mgmt.cdn.models.ProtocolType - :ivar minimum_tls_version: TLS protocol version that will be used for Https. Known values are: - "None", "TLS10", and "TLS12". - :vartype minimum_tls_version: str or ~azure.mgmt.cdn.models.MinimumTlsVersion - :ivar certificate_source_parameters: Defines the certificate source parameters using CDN - managed certificate for enabling SSL. Required. - :vartype certificate_source_parameters: ~azure.mgmt.cdn.models.CdnCertificateSourceParameters - """ - - _validation = { - "certificate_source": {"required": True}, - "protocol_type": {"required": True}, - "certificate_source_parameters": {"required": True}, - } - - _attribute_map = { - "certificate_source": {"key": "certificateSource", "type": "str"}, - "protocol_type": {"key": "protocolType", "type": "str"}, - "minimum_tls_version": {"key": "minimumTlsVersion", "type": "str"}, - "certificate_source_parameters": { - "key": "certificateSourceParameters", - "type": "CdnCertificateSourceParameters", - }, - } - - def __init__( - self, - *, - protocol_type: Union[str, "_models.ProtocolType"], - certificate_source_parameters: "_models.CdnCertificateSourceParameters", - minimum_tls_version: Optional[Union[str, "_models.MinimumTlsVersion"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword protocol_type: Defines the TLS extension protocol that is used for secure delivery. - Required. Known values are: "ServerNameIndication" and "IPBased". - :paramtype protocol_type: str or ~azure.mgmt.cdn.models.ProtocolType - :keyword minimum_tls_version: TLS protocol version that will be used for Https. Known values - are: "None", "TLS10", and "TLS12". - :paramtype minimum_tls_version: str or ~azure.mgmt.cdn.models.MinimumTlsVersion - :keyword certificate_source_parameters: Defines the certificate source parameters using CDN - managed certificate for enabling SSL. Required. - :paramtype certificate_source_parameters: ~azure.mgmt.cdn.models.CdnCertificateSourceParameters - """ - super().__init__(protocol_type=protocol_type, minimum_tls_version=minimum_tls_version, **kwargs) - self.certificate_source: str = "Cdn" - self.certificate_source_parameters = certificate_source_parameters - - -class CdnMigrationToAfdParameters(_serialization.Model): - """Request body for Migrate operation. - - All required parameters must be populated in order to send to server. - - :ivar sku: Sku for the migration. Required. - :vartype sku: ~azure.mgmt.cdn.models.Sku - :ivar migration_endpoint_mappings: A name map between classic CDN endpoints and AFD - Premium/Standard endpoints. - :vartype migration_endpoint_mappings: list[~azure.mgmt.cdn.models.MigrationEndpointMapping] - """ - - _validation = { - "sku": {"required": True}, - } - - _attribute_map = { - "sku": {"key": "sku", "type": "Sku"}, - "migration_endpoint_mappings": {"key": "migrationEndpointMappings", "type": "[MigrationEndpointMapping]"}, - } - - def __init__( - self, - *, - sku: "_models.Sku", - migration_endpoint_mappings: Optional[list["_models.MigrationEndpointMapping"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword sku: Sku for the migration. Required. - :paramtype sku: ~azure.mgmt.cdn.models.Sku - :keyword migration_endpoint_mappings: A name map between classic CDN endpoints and AFD - Premium/Standard endpoints. - :paramtype migration_endpoint_mappings: list[~azure.mgmt.cdn.models.MigrationEndpointMapping] - """ - super().__init__(**kwargs) - self.sku = sku - self.migration_endpoint_mappings = migration_endpoint_mappings - - -class CdnWebApplicationFirewallPolicy(TrackedResource): - """Defines web application firewall policy for Azure CDN. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to server. - - :ivar id: Fully qualified resource ID for the resource. E.g. - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy - information. - :vartype system_data: ~azure.mgmt.cdn.models.SystemData - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - :ivar location: The geo-location where the resource lives. Required. - :vartype location: str - :ivar etag: Gets a unique read-only string that changes whenever the resource is updated. - :vartype etag: str - :ivar sku: The pricing tier (defines a CDN provider, feature list and rate) of the - CdnWebApplicationFirewallPolicy. Required. - :vartype sku: ~azure.mgmt.cdn.models.Sku - :ivar policy_settings: Describes policySettings for policy. - :vartype policy_settings: ~azure.mgmt.cdn.models.PolicySettings - :ivar rate_limit_rules: Describes rate limit rules inside the policy. - :vartype rate_limit_rules: ~azure.mgmt.cdn.models.RateLimitRuleList - :ivar custom_rules: Describes custom rules inside the policy. - :vartype custom_rules: ~azure.mgmt.cdn.models.CustomRuleList - :ivar managed_rules: Describes managed rules inside the policy. - :vartype managed_rules: ~azure.mgmt.cdn.models.ManagedRuleSetList - :ivar endpoint_links: Describes Azure CDN endpoints associated with this Web Application - Firewall policy. - :vartype endpoint_links: list[~azure.mgmt.cdn.models.CdnEndpoint] - :ivar extended_properties: Key-Value pair representing additional properties for Web - Application Firewall policy. - :vartype extended_properties: dict[str, str] - :ivar provisioning_state: Provisioning state of the WebApplicationFirewallPolicy. Known values - are: "Creating", "Succeeded", and "Failed". - :vartype provisioning_state: str or ~azure.mgmt.cdn.models.ProvisioningState - :ivar resource_state: Resource status of the policy. Known values are: "Creating", "Enabling", - "Enabled", "Disabling", "Disabled", and "Deleting". - :vartype resource_state: str or ~azure.mgmt.cdn.models.PolicyResourceState - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "system_data": {"readonly": True}, - "location": {"required": True}, - "sku": {"required": True}, - "endpoint_links": {"readonly": True}, - "provisioning_state": {"readonly": True}, - "resource_state": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "system_data": {"key": "systemData", "type": "SystemData"}, - "tags": {"key": "tags", "type": "{str}"}, - "location": {"key": "location", "type": "str"}, - "etag": {"key": "etag", "type": "str"}, - "sku": {"key": "sku", "type": "Sku"}, - "policy_settings": {"key": "properties.policySettings", "type": "PolicySettings"}, - "rate_limit_rules": {"key": "properties.rateLimitRules", "type": "RateLimitRuleList"}, - "custom_rules": {"key": "properties.customRules", "type": "CustomRuleList"}, - "managed_rules": {"key": "properties.managedRules", "type": "ManagedRuleSetList"}, - "endpoint_links": {"key": "properties.endpointLinks", "type": "[CdnEndpoint]"}, - "extended_properties": {"key": "properties.extendedProperties", "type": "{str}"}, - "provisioning_state": {"key": "properties.provisioningState", "type": "str"}, - "resource_state": {"key": "properties.resourceState", "type": "str"}, - } - - def __init__( - self, - *, - location: str, - sku: "_models.Sku", - tags: Optional[dict[str, str]] = None, - etag: Optional[str] = None, - policy_settings: Optional["_models.PolicySettings"] = None, - rate_limit_rules: Optional["_models.RateLimitRuleList"] = None, - custom_rules: Optional["_models.CustomRuleList"] = None, - managed_rules: Optional["_models.ManagedRuleSetList"] = None, - extended_properties: Optional[dict[str, str]] = None, - **kwargs: Any - ) -> None: - """ - :keyword tags: Resource tags. - :paramtype tags: dict[str, str] - :keyword location: The geo-location where the resource lives. Required. - :paramtype location: str - :keyword etag: Gets a unique read-only string that changes whenever the resource is updated. - :paramtype etag: str - :keyword sku: The pricing tier (defines a CDN provider, feature list and rate) of the - CdnWebApplicationFirewallPolicy. Required. - :paramtype sku: ~azure.mgmt.cdn.models.Sku - :keyword policy_settings: Describes policySettings for policy. - :paramtype policy_settings: ~azure.mgmt.cdn.models.PolicySettings - :keyword rate_limit_rules: Describes rate limit rules inside the policy. - :paramtype rate_limit_rules: ~azure.mgmt.cdn.models.RateLimitRuleList - :keyword custom_rules: Describes custom rules inside the policy. - :paramtype custom_rules: ~azure.mgmt.cdn.models.CustomRuleList - :keyword managed_rules: Describes managed rules inside the policy. - :paramtype managed_rules: ~azure.mgmt.cdn.models.ManagedRuleSetList - :keyword extended_properties: Key-Value pair representing additional properties for Web - Application Firewall policy. - :paramtype extended_properties: dict[str, str] - """ - super().__init__(tags=tags, location=location, **kwargs) - self.etag = etag - self.sku = sku - self.policy_settings = policy_settings - self.rate_limit_rules = rate_limit_rules - self.custom_rules = custom_rules - self.managed_rules = managed_rules - self.endpoint_links: Optional[list["_models.CdnEndpoint"]] = None - self.extended_properties = extended_properties - self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None - self.resource_state: Optional[Union[str, "_models.PolicyResourceState"]] = None - - -class CdnWebApplicationFirewallPolicyList(_serialization.Model): - """Defines a list of WebApplicationFirewallPolicies for Azure CDN. It contains a list of - WebApplicationFirewallPolicy objects and a URL link to get the next set of results. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: List of Azure CDN WebApplicationFirewallPolicies within a resource group. - :vartype value: list[~azure.mgmt.cdn.models.CdnWebApplicationFirewallPolicy] - :ivar next_link: URL to get the next set of WebApplicationFirewallPolicy objects if there are - any. - :vartype next_link: str - """ - - _validation = { - "value": {"readonly": True}, - } - - _attribute_map = { - "value": {"key": "value", "type": "[CdnWebApplicationFirewallPolicy]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__(self, *, next_link: Optional[str] = None, **kwargs: Any) -> None: - """ - :keyword next_link: URL to get the next set of WebApplicationFirewallPolicy objects if there - are any. - :paramtype next_link: str - """ - super().__init__(**kwargs) - self.value: Optional[list["_models.CdnWebApplicationFirewallPolicy"]] = None - self.next_link = next_link - - -class CdnWebApplicationFirewallPolicyPatchParameters(_serialization.Model): # pylint: disable=name-too-long - """Properties required to update a CdnWebApplicationFirewallPolicy. - - :ivar tags: CdnWebApplicationFirewallPolicy tags. - :vartype tags: dict[str, str] - """ - - _attribute_map = { - "tags": {"key": "tags", "type": "{str}"}, - } - - def __init__(self, *, tags: Optional[dict[str, str]] = None, **kwargs: Any) -> None: - """ - :keyword tags: CdnWebApplicationFirewallPolicy tags. - :paramtype tags: dict[str, str] - """ - super().__init__(**kwargs) - self.tags = tags - - -class CheckEndpointNameAvailabilityInput(_serialization.Model): - """Input of CheckNameAvailability API. - - All required parameters must be populated in order to send to server. - - :ivar name: The resource name to validate. Required. - :vartype name: str - :ivar type: The type of the resource whose name is to be validated. Required. Known values are: - "Microsoft.Cdn/Profiles/Endpoints" and "Microsoft.Cdn/Profiles/AfdEndpoints". - :vartype type: str or ~azure.mgmt.cdn.models.ResourceType - :ivar auto_generated_domain_name_label_scope: Indicates the endpoint name reuse scope. The - default value is TenantReuse. Known values are: "TenantReuse", "SubscriptionReuse", - "ResourceGroupReuse", and "NoReuse". - :vartype auto_generated_domain_name_label_scope: str or - ~azure.mgmt.cdn.models.AutoGeneratedDomainNameLabelScope - """ - - _validation = { - "name": {"required": True}, - "type": {"required": True}, - } - - _attribute_map = { - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "auto_generated_domain_name_label_scope": {"key": "autoGeneratedDomainNameLabelScope", "type": "str"}, - } - - def __init__( - self, - *, - name: str, - type: Union[str, "_models.ResourceType"], - auto_generated_domain_name_label_scope: Optional[ - Union[str, "_models.AutoGeneratedDomainNameLabelScope"] - ] = None, - **kwargs: Any - ) -> None: - """ - :keyword name: The resource name to validate. Required. - :paramtype name: str - :keyword type: The type of the resource whose name is to be validated. Required. Known values - are: "Microsoft.Cdn/Profiles/Endpoints" and "Microsoft.Cdn/Profiles/AfdEndpoints". - :paramtype type: str or ~azure.mgmt.cdn.models.ResourceType - :keyword auto_generated_domain_name_label_scope: Indicates the endpoint name reuse scope. The - default value is TenantReuse. Known values are: "TenantReuse", "SubscriptionReuse", - "ResourceGroupReuse", and "NoReuse". - :paramtype auto_generated_domain_name_label_scope: str or - ~azure.mgmt.cdn.models.AutoGeneratedDomainNameLabelScope - """ - super().__init__(**kwargs) - self.name = name - self.type = type - self.auto_generated_domain_name_label_scope = auto_generated_domain_name_label_scope - - -class CheckEndpointNameAvailabilityOutput(_serialization.Model): - """Output of check name availability API. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar name_available: Indicates whether the name is available. - :vartype name_available: bool - :ivar available_hostname: Returns the available hostname generated based on the - AutoGeneratedDomainNameLabelScope when the name is available, otherwise it returns empty - string. - :vartype available_hostname: str - :ivar reason: The reason why the name is not available. - :vartype reason: str - :ivar message: The detailed error message describing why the name is not available. - :vartype message: str - """ - - _validation = { - "name_available": {"readonly": True}, - "available_hostname": {"readonly": True}, - "reason": {"readonly": True}, - "message": {"readonly": True}, - } - - _attribute_map = { - "name_available": {"key": "nameAvailable", "type": "bool"}, - "available_hostname": {"key": "availableHostname", "type": "str"}, - "reason": {"key": "reason", "type": "str"}, - "message": {"key": "message", "type": "str"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.name_available: Optional[bool] = None - self.available_hostname: Optional[str] = None - self.reason: Optional[str] = None - self.message: Optional[str] = None - - -class CheckHostNameAvailabilityInput(_serialization.Model): - """Input of CheckHostNameAvailability API. - - All required parameters must be populated in order to send to server. - - :ivar host_name: The host name to validate. Required. - :vartype host_name: str - """ - - _validation = { - "host_name": {"required": True}, - } - - _attribute_map = { - "host_name": {"key": "hostName", "type": "str"}, - } - - def __init__(self, *, host_name: str, **kwargs: Any) -> None: - """ - :keyword host_name: The host name to validate. Required. - :paramtype host_name: str - """ - super().__init__(**kwargs) - self.host_name = host_name - - -class CheckNameAvailabilityInput(_serialization.Model): - """Input of CheckNameAvailability API. - - All required parameters must be populated in order to send to server. - - :ivar name: The resource name to validate. Required. - :vartype name: str - :ivar type: The type of the resource whose name is to be validated. Required. Known values are: - "Microsoft.Cdn/Profiles/Endpoints" and "Microsoft.Cdn/Profiles/AfdEndpoints". - :vartype type: str or ~azure.mgmt.cdn.models.ResourceType - """ - - _validation = { - "name": {"required": True}, - "type": {"required": True}, - } - - _attribute_map = { - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - } - - def __init__(self, *, name: str, type: Union[str, "_models.ResourceType"], **kwargs: Any) -> None: - """ - :keyword name: The resource name to validate. Required. - :paramtype name: str - :keyword type: The type of the resource whose name is to be validated. Required. Known values - are: "Microsoft.Cdn/Profiles/Endpoints" and "Microsoft.Cdn/Profiles/AfdEndpoints". - :paramtype type: str or ~azure.mgmt.cdn.models.ResourceType - """ - super().__init__(**kwargs) - self.name = name - self.type = type - - -class CheckNameAvailabilityOutput(_serialization.Model): - """Output of check name availability API. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar name_available: Indicates whether the name is available. - :vartype name_available: bool - :ivar reason: The reason why the name is not available. - :vartype reason: str - :ivar message: The detailed error message describing why the name is not available. - :vartype message: str - """ - - _validation = { - "name_available": {"readonly": True}, - "reason": {"readonly": True}, - "message": {"readonly": True}, - } - - _attribute_map = { - "name_available": {"key": "nameAvailable", "type": "bool"}, - "reason": {"key": "reason", "type": "str"}, - "message": {"key": "message", "type": "str"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.name_available: Optional[bool] = None - self.reason: Optional[str] = None - self.message: Optional[str] = None - - -class CidrIpAddress(_serialization.Model): - """CIDR Ip address. - - :ivar base_ip_address: Ip address itself. - :vartype base_ip_address: str - :ivar prefix_length: The length of the prefix of the ip address. - :vartype prefix_length: int - """ - - _attribute_map = { - "base_ip_address": {"key": "baseIpAddress", "type": "str"}, - "prefix_length": {"key": "prefixLength", "type": "int"}, - } - - def __init__( - self, *, base_ip_address: Optional[str] = None, prefix_length: Optional[int] = None, **kwargs: Any - ) -> None: - """ - :keyword base_ip_address: Ip address itself. - :paramtype base_ip_address: str - :keyword prefix_length: The length of the prefix of the ip address. - :paramtype prefix_length: int - """ - super().__init__(**kwargs) - self.base_ip_address = base_ip_address - self.prefix_length = prefix_length - - -class DeliveryRuleConditionParameters(_serialization.Model): - """Defines the parameters for delivery rule match conditions. - - You probably want to use the sub-classes and not this class directly. Known sub-classes are: - ClientPortMatchConditionParameters, CookiesMatchConditionParameters, - HostNameMatchConditionParameters, HttpVersionMatchConditionParameters, - IsDeviceMatchConditionParameters, PostArgsMatchConditionParameters, - QueryStringMatchConditionParameters, RemoteAddressMatchConditionParameters, - RequestBodyMatchConditionParameters, RequestHeaderMatchConditionParameters, - RequestMethodMatchConditionParameters, RequestSchemeMatchConditionParameters, - RequestUriMatchConditionParameters, ServerPortMatchConditionParameters, - SocketAddrMatchConditionParameters, SslProtocolMatchConditionParameters, - UrlFileExtensionMatchConditionParameters, UrlFileNameMatchConditionParameters, - UrlPathMatchConditionParameters - - All required parameters must be populated in order to send to server. - - :ivar type_name: Required. Known values are: "DeliveryRuleRemoteAddressConditionParameters", - "DeliveryRuleRequestMethodConditionParameters", "DeliveryRuleQueryStringConditionParameters", - "DeliveryRulePostArgsConditionParameters", "DeliveryRuleRequestUriConditionParameters", - "DeliveryRuleRequestHeaderConditionParameters", "DeliveryRuleRequestBodyConditionParameters", - "DeliveryRuleRequestSchemeConditionParameters", "DeliveryRuleUrlPathMatchConditionParameters", - "DeliveryRuleUrlFileExtensionMatchConditionParameters", - "DeliveryRuleUrlFilenameConditionParameters", "DeliveryRuleHttpVersionConditionParameters", - "DeliveryRuleCookiesConditionParameters", "DeliveryRuleIsDeviceConditionParameters", - "DeliveryRuleSocketAddrConditionParameters", "DeliveryRuleClientPortConditionParameters", - "DeliveryRuleServerPortConditionParameters", "DeliveryRuleHostNameConditionParameters", and - "DeliveryRuleSslProtocolConditionParameters". - :vartype type_name: str or ~azure.mgmt.cdn.models.DeliveryRuleConditionParametersType - """ - - _validation = { - "type_name": {"required": True}, - } - - _attribute_map = { - "type_name": {"key": "typeName", "type": "str"}, - } - - _subtype_map = { - "type_name": { - "DeliveryRuleClientPortConditionParameters": "ClientPortMatchConditionParameters", - "DeliveryRuleCookiesConditionParameters": "CookiesMatchConditionParameters", - "DeliveryRuleHostNameConditionParameters": "HostNameMatchConditionParameters", - "DeliveryRuleHttpVersionConditionParameters": "HttpVersionMatchConditionParameters", - "DeliveryRuleIsDeviceConditionParameters": "IsDeviceMatchConditionParameters", - "DeliveryRulePostArgsConditionParameters": "PostArgsMatchConditionParameters", - "DeliveryRuleQueryStringConditionParameters": "QueryStringMatchConditionParameters", - "DeliveryRuleRemoteAddressConditionParameters": "RemoteAddressMatchConditionParameters", - "DeliveryRuleRequestBodyConditionParameters": "RequestBodyMatchConditionParameters", - "DeliveryRuleRequestHeaderConditionParameters": "RequestHeaderMatchConditionParameters", - "DeliveryRuleRequestMethodConditionParameters": "RequestMethodMatchConditionParameters", - "DeliveryRuleRequestSchemeConditionParameters": "RequestSchemeMatchConditionParameters", - "DeliveryRuleRequestUriConditionParameters": "RequestUriMatchConditionParameters", - "DeliveryRuleServerPortConditionParameters": "ServerPortMatchConditionParameters", - "DeliveryRuleSocketAddrConditionParameters": "SocketAddrMatchConditionParameters", - "DeliveryRuleSslProtocolConditionParameters": "SslProtocolMatchConditionParameters", - "DeliveryRuleUrlFileExtensionMatchConditionParameters": "UrlFileExtensionMatchConditionParameters", - "DeliveryRuleUrlFilenameConditionParameters": "UrlFileNameMatchConditionParameters", - "DeliveryRuleUrlPathMatchConditionParameters": "UrlPathMatchConditionParameters", - } - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.type_name: Optional[str] = None - - -class ClientPortMatchConditionParameters(DeliveryRuleConditionParameters): - """Defines the parameters for ClientPort match conditions. - - All required parameters must be populated in order to send to server. - - :ivar type_name: Required. Known values are: "DeliveryRuleRemoteAddressConditionParameters", - "DeliveryRuleRequestMethodConditionParameters", "DeliveryRuleQueryStringConditionParameters", - "DeliveryRulePostArgsConditionParameters", "DeliveryRuleRequestUriConditionParameters", - "DeliveryRuleRequestHeaderConditionParameters", "DeliveryRuleRequestBodyConditionParameters", - "DeliveryRuleRequestSchemeConditionParameters", "DeliveryRuleUrlPathMatchConditionParameters", - "DeliveryRuleUrlFileExtensionMatchConditionParameters", - "DeliveryRuleUrlFilenameConditionParameters", "DeliveryRuleHttpVersionConditionParameters", - "DeliveryRuleCookiesConditionParameters", "DeliveryRuleIsDeviceConditionParameters", - "DeliveryRuleSocketAddrConditionParameters", "DeliveryRuleClientPortConditionParameters", - "DeliveryRuleServerPortConditionParameters", "DeliveryRuleHostNameConditionParameters", and - "DeliveryRuleSslProtocolConditionParameters". - :vartype type_name: str or ~azure.mgmt.cdn.models.DeliveryRuleConditionParametersType - :ivar operator: Describes operator to be matched. Required. Known values are: "Any", "Equal", - "Contains", "BeginsWith", "EndsWith", "LessThan", "LessThanOrEqual", "GreaterThan", - "GreaterThanOrEqual", and "RegEx". - :vartype operator: str or ~azure.mgmt.cdn.models.ClientPortOperator - :ivar negate_condition: Describes if this is negate condition or not. - :vartype negate_condition: bool - :ivar match_values: The match value for the condition of the delivery rule. - :vartype match_values: list[str] - :ivar transforms: List of transforms. - :vartype transforms: list[str or ~azure.mgmt.cdn.models.Transform] - """ - - _validation = { - "type_name": {"required": True}, - "operator": {"required": True}, - } - - _attribute_map = { - "type_name": {"key": "typeName", "type": "str"}, - "operator": {"key": "operator", "type": "str"}, - "negate_condition": {"key": "negateCondition", "type": "bool"}, - "match_values": {"key": "matchValues", "type": "[str]"}, - "transforms": {"key": "transforms", "type": "[str]"}, - } - - def __init__( - self, - *, - operator: Union[str, "_models.ClientPortOperator"], - negate_condition: bool = False, - match_values: Optional[list[str]] = None, - transforms: Optional[list[Union[str, "_models.Transform"]]] = None, - **kwargs: Any - ) -> None: - """ - :keyword operator: Describes operator to be matched. Required. Known values are: "Any", - "Equal", "Contains", "BeginsWith", "EndsWith", "LessThan", "LessThanOrEqual", "GreaterThan", - "GreaterThanOrEqual", and "RegEx". - :paramtype operator: str or ~azure.mgmt.cdn.models.ClientPortOperator - :keyword negate_condition: Describes if this is negate condition or not. - :paramtype negate_condition: bool - :keyword match_values: The match value for the condition of the delivery rule. - :paramtype match_values: list[str] - :keyword transforms: List of transforms. - :paramtype transforms: list[str or ~azure.mgmt.cdn.models.Transform] - """ - super().__init__(**kwargs) - self.type_name: str = "DeliveryRuleClientPortConditionParameters" - self.operator = operator - self.negate_condition = negate_condition - self.match_values = match_values - self.transforms = transforms - - -class Components18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsPropertiesDataItems( - _serialization.Model -): # pylint: disable=name-too-long - """Components18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsPropertiesDataItems. - - :ivar date_time: - :vartype date_time: ~datetime.datetime - :ivar value: - :vartype value: float - """ - - _attribute_map = { - "date_time": {"key": "dateTime", "type": "iso-8601"}, - "value": {"key": "value", "type": "float"}, - } - - def __init__( - self, *, date_time: Optional[datetime.datetime] = None, value: Optional[float] = None, **kwargs: Any - ) -> None: - """ - :keyword date_time: - :paramtype date_time: ~datetime.datetime - :keyword value: - :paramtype value: float - """ - super().__init__(**kwargs) - self.date_time = date_time - self.value = value - - -class Components1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsPropertiesDataItems( - _serialization.Model -): # pylint: disable=name-too-long - """Components1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsPropertiesDataItems. - - :ivar date_time: - :vartype date_time: ~datetime.datetime - :ivar value: - :vartype value: float - """ - - _attribute_map = { - "date_time": {"key": "dateTime", "type": "iso-8601"}, - "value": {"key": "value", "type": "float"}, - } - - def __init__( - self, *, date_time: Optional[datetime.datetime] = None, value: Optional[float] = None, **kwargs: Any - ) -> None: - """ - :keyword date_time: - :paramtype date_time: ~datetime.datetime - :keyword value: - :paramtype value: float - """ - super().__init__(**kwargs) - self.date_time = date_time - self.value = value - - -class ComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItems( - _serialization.Model -): # pylint: disable=name-too-long - """ComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItems. - - :ivar metric: - :vartype metric: str - :ivar value: - :vartype value: int - :ivar percentage: - :vartype percentage: float - """ - - _attribute_map = { - "metric": {"key": "metric", "type": "str"}, - "value": {"key": "value", "type": "int"}, - "percentage": {"key": "percentage", "type": "float"}, - } - - def __init__( - self, - *, - metric: Optional[str] = None, - value: Optional[int] = None, - percentage: Optional[float] = None, - **kwargs: Any - ) -> None: - """ - :keyword metric: - :paramtype metric: str - :keyword value: - :paramtype value: int - :keyword percentage: - :paramtype percentage: float - """ - super().__init__(**kwargs) - self.metric = metric - self.value = value - self.percentage = percentage - - -class CompressionSettings(_serialization.Model): - """settings for compression. - - :ivar content_types_to_compress: List of content types on which compression applies. The value - should be a valid MIME type. - :vartype content_types_to_compress: list[str] - :ivar is_compression_enabled: Indicates whether content compression is enabled on - AzureFrontDoor. Default value is false. If compression is enabled, content will be served as - compressed if user requests for a compressed version. Content won't be compressed on - AzureFrontDoor when requested content is smaller than 1 byte or larger than 1 MB. - :vartype is_compression_enabled: bool - """ - - _attribute_map = { - "content_types_to_compress": {"key": "contentTypesToCompress", "type": "[str]"}, - "is_compression_enabled": {"key": "isCompressionEnabled", "type": "bool"}, - } - - def __init__( - self, - *, - content_types_to_compress: Optional[list[str]] = None, - is_compression_enabled: Optional[bool] = None, - **kwargs: Any - ) -> None: - """ - :keyword content_types_to_compress: List of content types on which compression applies. The - value should be a valid MIME type. - :paramtype content_types_to_compress: list[str] - :keyword is_compression_enabled: Indicates whether content compression is enabled on - AzureFrontDoor. Default value is false. If compression is enabled, content will be served as - compressed if user requests for a compressed version. Content won't be compressed on - AzureFrontDoor when requested content is smaller than 1 byte or larger than 1 MB. - :paramtype is_compression_enabled: bool - """ - super().__init__(**kwargs) - self.content_types_to_compress = content_types_to_compress - self.is_compression_enabled = is_compression_enabled - - -class ContinentsResponse(_serialization.Model): - """Continents Response. - - :ivar continents: - :vartype continents: list[~azure.mgmt.cdn.models.ContinentsResponseContinentsItem] - :ivar country_or_regions: - :vartype country_or_regions: - list[~azure.mgmt.cdn.models.ContinentsResponseCountryOrRegionsItem] - """ - - _attribute_map = { - "continents": {"key": "continents", "type": "[ContinentsResponseContinentsItem]"}, - "country_or_regions": {"key": "countryOrRegions", "type": "[ContinentsResponseCountryOrRegionsItem]"}, - } - - def __init__( - self, - *, - continents: Optional[list["_models.ContinentsResponseContinentsItem"]] = None, - country_or_regions: Optional[list["_models.ContinentsResponseCountryOrRegionsItem"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword continents: - :paramtype continents: list[~azure.mgmt.cdn.models.ContinentsResponseContinentsItem] - :keyword country_or_regions: - :paramtype country_or_regions: - list[~azure.mgmt.cdn.models.ContinentsResponseCountryOrRegionsItem] - """ - super().__init__(**kwargs) - self.continents = continents - self.country_or_regions = country_or_regions - - -class ContinentsResponseContinentsItem(_serialization.Model): - """ContinentsResponseContinentsItem. - - :ivar id: - :vartype id: str - """ - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - } - - def __init__(self, *, id: Optional[str] = None, **kwargs: Any) -> None: # pylint: disable=redefined-builtin - """ - :keyword id: - :paramtype id: str - """ - super().__init__(**kwargs) - self.id = id - - -class ContinentsResponseCountryOrRegionsItem(_serialization.Model): - """ContinentsResponseCountryOrRegionsItem. - - :ivar id: - :vartype id: str - :ivar continent_id: - :vartype continent_id: str - """ - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "continent_id": {"key": "continentId", "type": "str"}, - } - - def __init__( - self, - *, - id: Optional[str] = None, # pylint: disable=redefined-builtin - continent_id: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword id: - :paramtype id: str - :keyword continent_id: - :paramtype continent_id: str - """ - super().__init__(**kwargs) - self.id = id - self.continent_id = continent_id - - -class CookiesMatchConditionParameters(DeliveryRuleConditionParameters): - """Defines the parameters for Cookies match conditions. - - All required parameters must be populated in order to send to server. - - :ivar type_name: Required. Known values are: "DeliveryRuleRemoteAddressConditionParameters", - "DeliveryRuleRequestMethodConditionParameters", "DeliveryRuleQueryStringConditionParameters", - "DeliveryRulePostArgsConditionParameters", "DeliveryRuleRequestUriConditionParameters", - "DeliveryRuleRequestHeaderConditionParameters", "DeliveryRuleRequestBodyConditionParameters", - "DeliveryRuleRequestSchemeConditionParameters", "DeliveryRuleUrlPathMatchConditionParameters", - "DeliveryRuleUrlFileExtensionMatchConditionParameters", - "DeliveryRuleUrlFilenameConditionParameters", "DeliveryRuleHttpVersionConditionParameters", - "DeliveryRuleCookiesConditionParameters", "DeliveryRuleIsDeviceConditionParameters", - "DeliveryRuleSocketAddrConditionParameters", "DeliveryRuleClientPortConditionParameters", - "DeliveryRuleServerPortConditionParameters", "DeliveryRuleHostNameConditionParameters", and - "DeliveryRuleSslProtocolConditionParameters". - :vartype type_name: str or ~azure.mgmt.cdn.models.DeliveryRuleConditionParametersType - :ivar selector: Name of Cookies to be matched. - :vartype selector: str - :ivar operator: Describes operator to be matched. Required. Known values are: "Any", "Equal", - "Contains", "BeginsWith", "EndsWith", "LessThan", "LessThanOrEqual", "GreaterThan", - "GreaterThanOrEqual", and "RegEx". - :vartype operator: str or ~azure.mgmt.cdn.models.CookiesOperator - :ivar negate_condition: Describes if this is negate condition or not. - :vartype negate_condition: bool - :ivar match_values: The match value for the condition of the delivery rule. - :vartype match_values: list[str] - :ivar transforms: List of transforms. - :vartype transforms: list[str or ~azure.mgmt.cdn.models.Transform] - """ - - _validation = { - "type_name": {"required": True}, - "operator": {"required": True}, - } - - _attribute_map = { - "type_name": {"key": "typeName", "type": "str"}, - "selector": {"key": "selector", "type": "str"}, - "operator": {"key": "operator", "type": "str"}, - "negate_condition": {"key": "negateCondition", "type": "bool"}, - "match_values": {"key": "matchValues", "type": "[str]"}, - "transforms": {"key": "transforms", "type": "[str]"}, - } - - def __init__( - self, - *, - operator: Union[str, "_models.CookiesOperator"], - selector: Optional[str] = None, - negate_condition: bool = False, - match_values: Optional[list[str]] = None, - transforms: Optional[list[Union[str, "_models.Transform"]]] = None, - **kwargs: Any - ) -> None: - """ - :keyword selector: Name of Cookies to be matched. - :paramtype selector: str - :keyword operator: Describes operator to be matched. Required. Known values are: "Any", - "Equal", "Contains", "BeginsWith", "EndsWith", "LessThan", "LessThanOrEqual", "GreaterThan", - "GreaterThanOrEqual", and "RegEx". - :paramtype operator: str or ~azure.mgmt.cdn.models.CookiesOperator - :keyword negate_condition: Describes if this is negate condition or not. - :paramtype negate_condition: bool - :keyword match_values: The match value for the condition of the delivery rule. - :paramtype match_values: list[str] - :keyword transforms: List of transforms. - :paramtype transforms: list[str or ~azure.mgmt.cdn.models.Transform] - """ - super().__init__(**kwargs) - self.type_name: str = "DeliveryRuleCookiesConditionParameters" - self.selector = selector - self.operator = operator - self.negate_condition = negate_condition - self.match_values = match_values - self.transforms = transforms - - -class CustomDomain(ProxyResource): - """Friendly domain name mapping to the endpoint hostname that the customer provides for branding - purposes, e.g. www.contoso.com. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. E.g. - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy - information. - :vartype system_data: ~azure.mgmt.cdn.models.SystemData - :ivar host_name: The host name of the custom domain. Must be a domain name. - :vartype host_name: str - :ivar resource_state: Resource status of the custom domain. Known values are: "Creating", - "Active", and "Deleting". - :vartype resource_state: str or ~azure.mgmt.cdn.models.CustomDomainResourceState - :ivar custom_https_provisioning_state: Provisioning status of the custom domain. Known values - are: "Enabling", "Enabled", "Disabling", "Disabled", and "Failed". - :vartype custom_https_provisioning_state: str or - ~azure.mgmt.cdn.models.CustomHttpsProvisioningState - :ivar custom_https_provisioning_substate: Provisioning substate shows the progress of custom - HTTPS enabling/disabling process step by step. Known values are: - "SubmittingDomainControlValidationRequest", "PendingDomainControlValidationREquestApproval", - "DomainControlValidationRequestApproved", "DomainControlValidationRequestRejected", - "DomainControlValidationRequestTimedOut", "IssuingCertificate", "DeployingCertificate", - "CertificateDeployed", "DeletingCertificate", and "CertificateDeleted". - :vartype custom_https_provisioning_substate: str or - ~azure.mgmt.cdn.models.CustomHttpsProvisioningSubstate - :ivar custom_https_parameters: Certificate parameters for securing custom HTTPS. - :vartype custom_https_parameters: ~azure.mgmt.cdn.models.CustomDomainHttpsParameters - :ivar validation_data: Special validation or data may be required when delivering CDN to some - regions due to local compliance reasons. E.g. ICP license number of a custom domain is required - to deliver content in China. - :vartype validation_data: str - :ivar provisioning_state: Provisioning status of Custom Https of the custom domain. Known - values are: "Enabling", "Enabled", "Disabling", "Disabled", and "Failed". - :vartype provisioning_state: str or ~azure.mgmt.cdn.models.CustomHttpsProvisioningState - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "system_data": {"readonly": True}, - "resource_state": {"readonly": True}, - "custom_https_provisioning_state": {"readonly": True}, - "custom_https_provisioning_substate": {"readonly": True}, - "provisioning_state": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "system_data": {"key": "systemData", "type": "SystemData"}, - "host_name": {"key": "properties.hostName", "type": "str"}, - "resource_state": {"key": "properties.resourceState", "type": "str"}, - "custom_https_provisioning_state": {"key": "properties.customHttpsProvisioningState", "type": "str"}, - "custom_https_provisioning_substate": {"key": "properties.customHttpsProvisioningSubstate", "type": "str"}, - "custom_https_parameters": {"key": "properties.customHttpsParameters", "type": "CustomDomainHttpsParameters"}, - "validation_data": {"key": "properties.validationData", "type": "str"}, - "provisioning_state": {"key": "properties.provisioningState", "type": "str"}, - } - - def __init__( - self, - *, - host_name: Optional[str] = None, - custom_https_parameters: Optional["_models.CustomDomainHttpsParameters"] = None, - validation_data: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword host_name: The host name of the custom domain. Must be a domain name. - :paramtype host_name: str - :keyword custom_https_parameters: Certificate parameters for securing custom HTTPS. - :paramtype custom_https_parameters: ~azure.mgmt.cdn.models.CustomDomainHttpsParameters - :keyword validation_data: Special validation or data may be required when delivering CDN to - some regions due to local compliance reasons. E.g. ICP license number of a custom domain is - required to deliver content in China. - :paramtype validation_data: str - """ - super().__init__(**kwargs) - self.host_name = host_name - self.resource_state: Optional[Union[str, "_models.CustomDomainResourceState"]] = None - self.custom_https_provisioning_state: Optional[Union[str, "_models.CustomHttpsProvisioningState"]] = None - self.custom_https_provisioning_substate: Optional[Union[str, "_models.CustomHttpsProvisioningSubstate"]] = None - self.custom_https_parameters = custom_https_parameters - self.validation_data = validation_data - self.provisioning_state: Optional[Union[str, "_models.CustomHttpsProvisioningState"]] = None - - -class CustomDomainListResult(_serialization.Model): - """Result of the request to list custom domains. It contains a list of custom domain objects and a - URL link to get the next set of results. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: List of CDN CustomDomains within an endpoint. - :vartype value: list[~azure.mgmt.cdn.models.CustomDomain] - :ivar next_link: URL to get the next set of custom domain objects if there are any. - :vartype next_link: str - """ - - _validation = { - "value": {"readonly": True}, - } - - _attribute_map = { - "value": {"key": "value", "type": "[CustomDomain]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__(self, *, next_link: Optional[str] = None, **kwargs: Any) -> None: - """ - :keyword next_link: URL to get the next set of custom domain objects if there are any. - :paramtype next_link: str - """ - super().__init__(**kwargs) - self.value: Optional[list["_models.CustomDomain"]] = None - self.next_link = next_link - - -class CustomDomainParameters(_serialization.Model): - """The customDomain JSON object required for custom domain creation or update. - - :ivar host_name: The host name of the custom domain. Must be a domain name. - :vartype host_name: str - """ - - _attribute_map = { - "host_name": {"key": "properties.hostName", "type": "str"}, - } - - def __init__(self, *, host_name: Optional[str] = None, **kwargs: Any) -> None: - """ - :keyword host_name: The host name of the custom domain. Must be a domain name. - :paramtype host_name: str - """ - super().__init__(**kwargs) - self.host_name = host_name - - -class CustomerCertificate(Certificate): - """Customer Certificate used for https. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar type: The type of the secret resource. Known values are: "UrlSigningKey", - "CustomerCertificate", "ManagedCertificate", and "AzureFirstPartyManagedCertificate". - :vartype type: str or ~azure.mgmt.cdn.models.SecretType - :ivar subject: Subject name in the certificate. - :vartype subject: str - :ivar expiration_date: Certificate expiration date. - :vartype expiration_date: str - :ivar secret_source: Resource reference to the Azure Key Vault certificate. Expected to be in - format of - /subscriptions/{​​​​​​​​​subscriptionId}​​​​​​​​​/resourceGroups/{​​​​​​​​​resourceGroupName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/providers/Microsoft.KeyVault/vaults/{vaultName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/secrets/{certificateName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​. - :vartype secret_source: ~azure.mgmt.cdn.models.ResourceReference - :ivar secret_version: Certificate version. - :vartype secret_version: str - :ivar certificate_authority: Certificate issuing authority. - :vartype certificate_authority: str - :ivar use_latest_version: Whether to use the latest version for the certificate. - :vartype use_latest_version: bool - :ivar subject_alternative_names: The list of SANs. - :vartype subject_alternative_names: list[str] - :ivar thumbprint: Certificate thumbprint. - :vartype thumbprint: str - """ - - _validation = { - "subject": {"readonly": True}, - "expiration_date": {"readonly": True}, - "certificate_authority": {"readonly": True}, - "thumbprint": {"readonly": True}, - } - - _attribute_map = { - "type": {"key": "type", "type": "str"}, - "subject": {"key": "subject", "type": "str"}, - "expiration_date": {"key": "expirationDate", "type": "str"}, - "secret_source": {"key": "secretSource", "type": "ResourceReference"}, - "secret_version": {"key": "secretVersion", "type": "str"}, - "certificate_authority": {"key": "certificateAuthority", "type": "str"}, - "use_latest_version": {"key": "useLatestVersion", "type": "bool"}, - "subject_alternative_names": {"key": "subjectAlternativeNames", "type": "[str]"}, - "thumbprint": {"key": "thumbprint", "type": "str"}, - } - - def __init__( - self, - *, - type: Optional[Union[str, "_models.SecretType"]] = None, - secret_source: Optional["_models.ResourceReference"] = None, - secret_version: Optional[str] = None, - use_latest_version: Optional[bool] = None, - subject_alternative_names: Optional[list[str]] = None, - **kwargs: Any - ) -> None: - """ - :keyword type: The type of the secret resource. Known values are: "UrlSigningKey", - "CustomerCertificate", "ManagedCertificate", and "AzureFirstPartyManagedCertificate". - :paramtype type: str or ~azure.mgmt.cdn.models.SecretType - :keyword secret_source: Resource reference to the Azure Key Vault certificate. Expected to be - in format of - /subscriptions/{​​​​​​​​​subscriptionId}​​​​​​​​​/resourceGroups/{​​​​​​​​​resourceGroupName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/providers/Microsoft.KeyVault/vaults/{vaultName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/secrets/{certificateName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​. - :paramtype secret_source: ~azure.mgmt.cdn.models.ResourceReference - :keyword secret_version: Certificate version. - :paramtype secret_version: str - :keyword use_latest_version: Whether to use the latest version for the certificate. - :paramtype use_latest_version: bool - :keyword subject_alternative_names: The list of SANs. - :paramtype subject_alternative_names: list[str] - """ - super().__init__(type=type, **kwargs) - self.secret_source = secret_source - self.secret_version = secret_version - self.certificate_authority: Optional[str] = None - self.use_latest_version = use_latest_version - self.subject_alternative_names = subject_alternative_names - self.thumbprint: Optional[str] = None - - -class CustomerCertificateParameters(SecretParameters): - """Customer Certificate used for https. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to server. - - :ivar type: The type of the secret resource. Required. Known values are: "UrlSigningKey", - "CustomerCertificate", "ManagedCertificate", and "AzureFirstPartyManagedCertificate". - :vartype type: str or ~azure.mgmt.cdn.models.SecretType - :ivar secret_source: Resource reference to the Azure Key Vault certificate. Expected to be in - format of - /subscriptions/{​​​​​​​​​subscriptionId}​​​​​​​​​/resourceGroups/{​​​​​​​​​resourceGroupName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/providers/Microsoft.KeyVault/vaults/{vaultName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/secrets/{certificateName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​. - Required. - :vartype secret_source: ~azure.mgmt.cdn.models.ResourceReference - :ivar secret_version: Version of the secret to be used. - :vartype secret_version: str - :ivar use_latest_version: Whether to use the latest version for the certificate. - :vartype use_latest_version: bool - :ivar subject: Subject name in the certificate. - :vartype subject: str - :ivar expiration_date: Certificate expiration date. - :vartype expiration_date: str - :ivar certificate_authority: Certificate issuing authority. - :vartype certificate_authority: str - :ivar subject_alternative_names: The list of SANs. - :vartype subject_alternative_names: list[str] - :ivar thumbprint: Certificate thumbprint. - :vartype thumbprint: str - """ - - _validation = { - "type": {"required": True}, - "secret_source": {"required": True}, - "subject": {"readonly": True}, - "expiration_date": {"readonly": True}, - "certificate_authority": {"readonly": True}, - "thumbprint": {"readonly": True}, - } - - _attribute_map = { - "type": {"key": "type", "type": "str"}, - "secret_source": {"key": "secretSource", "type": "ResourceReference"}, - "secret_version": {"key": "secretVersion", "type": "str"}, - "use_latest_version": {"key": "useLatestVersion", "type": "bool"}, - "subject": {"key": "subject", "type": "str"}, - "expiration_date": {"key": "expirationDate", "type": "str"}, - "certificate_authority": {"key": "certificateAuthority", "type": "str"}, - "subject_alternative_names": {"key": "subjectAlternativeNames", "type": "[str]"}, - "thumbprint": {"key": "thumbprint", "type": "str"}, - } - - def __init__( - self, - *, - secret_source: "_models.ResourceReference", - secret_version: Optional[str] = None, - use_latest_version: Optional[bool] = None, - subject_alternative_names: Optional[list[str]] = None, - **kwargs: Any - ) -> None: - """ - :keyword secret_source: Resource reference to the Azure Key Vault certificate. Expected to be - in format of - /subscriptions/{​​​​​​​​​subscriptionId}​​​​​​​​​/resourceGroups/{​​​​​​​​​resourceGroupName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/providers/Microsoft.KeyVault/vaults/{vaultName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/secrets/{certificateName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​. - Required. - :paramtype secret_source: ~azure.mgmt.cdn.models.ResourceReference - :keyword secret_version: Version of the secret to be used. - :paramtype secret_version: str - :keyword use_latest_version: Whether to use the latest version for the certificate. - :paramtype use_latest_version: bool - :keyword subject_alternative_names: The list of SANs. - :paramtype subject_alternative_names: list[str] - """ - super().__init__(**kwargs) - self.type: str = "CustomerCertificate" - self.secret_source = secret_source - self.secret_version = secret_version - self.use_latest_version = use_latest_version - self.subject: Optional[str] = None - self.expiration_date: Optional[str] = None - self.certificate_authority: Optional[str] = None - self.subject_alternative_names = subject_alternative_names - self.thumbprint: Optional[str] = None - - -class CustomRule(_serialization.Model): - """Defines the common attributes for a custom rule that can be included in a waf policy. - - All required parameters must be populated in order to send to server. - - :ivar name: Defines the name of the custom rule. Required. - :vartype name: str - :ivar enabled_state: Describes if the custom rule is in enabled or disabled state. Defaults to - Enabled if not specified. Known values are: "Disabled" and "Enabled". - :vartype enabled_state: str or ~azure.mgmt.cdn.models.CustomRuleEnabledState - :ivar priority: Defines in what order this rule be evaluated in the overall list of custom - rules. Required. - :vartype priority: int - :ivar match_conditions: List of match conditions. Required. - :vartype match_conditions: list[~azure.mgmt.cdn.models.MatchCondition] - :ivar action: Describes what action to be applied when rule matches. Required. Known values - are: "Allow", "Block", "Log", and "Redirect". - :vartype action: str or ~azure.mgmt.cdn.models.ActionType - """ - - _validation = { - "name": {"required": True}, - "priority": {"required": True, "maximum": 1000, "minimum": 0}, - "match_conditions": {"required": True}, - "action": {"required": True}, - } - - _attribute_map = { - "name": {"key": "name", "type": "str"}, - "enabled_state": {"key": "enabledState", "type": "str"}, - "priority": {"key": "priority", "type": "int"}, - "match_conditions": {"key": "matchConditions", "type": "[MatchCondition]"}, - "action": {"key": "action", "type": "str"}, - } - - def __init__( - self, - *, - name: str, - priority: int, - match_conditions: list["_models.MatchCondition"], - action: Union[str, "_models.ActionType"], - enabled_state: Optional[Union[str, "_models.CustomRuleEnabledState"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword name: Defines the name of the custom rule. Required. - :paramtype name: str - :keyword enabled_state: Describes if the custom rule is in enabled or disabled state. Defaults - to Enabled if not specified. Known values are: "Disabled" and "Enabled". - :paramtype enabled_state: str or ~azure.mgmt.cdn.models.CustomRuleEnabledState - :keyword priority: Defines in what order this rule be evaluated in the overall list of custom - rules. Required. - :paramtype priority: int - :keyword match_conditions: List of match conditions. Required. - :paramtype match_conditions: list[~azure.mgmt.cdn.models.MatchCondition] - :keyword action: Describes what action to be applied when rule matches. Required. Known values - are: "Allow", "Block", "Log", and "Redirect". - :paramtype action: str or ~azure.mgmt.cdn.models.ActionType - """ - super().__init__(**kwargs) - self.name = name - self.enabled_state = enabled_state - self.priority = priority - self.match_conditions = match_conditions - self.action = action - - -class CustomRuleList(_serialization.Model): - """Defines contents of custom rules. - - :ivar rules: List of rules. - :vartype rules: list[~azure.mgmt.cdn.models.CustomRule] - """ - - _attribute_map = { - "rules": {"key": "rules", "type": "[CustomRule]"}, - } - - def __init__(self, *, rules: Optional[list["_models.CustomRule"]] = None, **kwargs: Any) -> None: - """ - :keyword rules: List of rules. - :paramtype rules: list[~azure.mgmt.cdn.models.CustomRule] - """ - super().__init__(**kwargs) - self.rules = rules - - -class DeepCreatedCustomDomain(_serialization.Model): - """Custom domains created on the CDN endpoint. - - All required parameters must be populated in order to send to server. - - :ivar name: Custom domain name. Required. - :vartype name: str - :ivar host_name: The host name of the custom domain. Must be a domain name. - :vartype host_name: str - :ivar validation_data: Special validation or data may be required when delivering CDN to some - regions due to local compliance reasons. E.g. ICP license number of a custom domain is required - to deliver content in China. - :vartype validation_data: str - """ - - _validation = { - "name": {"required": True}, - } - - _attribute_map = { - "name": {"key": "name", "type": "str"}, - "host_name": {"key": "properties.hostName", "type": "str"}, - "validation_data": {"key": "properties.validationData", "type": "str"}, - } - - def __init__( - self, *, name: str, host_name: Optional[str] = None, validation_data: Optional[str] = None, **kwargs: Any - ) -> None: - """ - :keyword name: Custom domain name. Required. - :paramtype name: str - :keyword host_name: The host name of the custom domain. Must be a domain name. - :paramtype host_name: str - :keyword validation_data: Special validation or data may be required when delivering CDN to - some regions due to local compliance reasons. E.g. ICP license number of a custom domain is - required to deliver content in China. - :paramtype validation_data: str - """ - super().__init__(**kwargs) - self.name = name - self.host_name = host_name - self.validation_data = validation_data - - -class DeepCreatedOrigin(_serialization.Model): - """The main origin of CDN content which is added when creating a CDN endpoint. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to server. - - :ivar name: Origin name which must be unique within the endpoint. Required. - :vartype name: str - :ivar host_name: The address of the origin. It can be a domain name, IPv4 address, or IPv6 - address. This should be unique across all origins in an endpoint. - :vartype host_name: str - :ivar http_port: The value of the HTTP port. Must be between 1 and 65535. - :vartype http_port: int - :ivar https_port: The value of the HTTPS port. Must be between 1 and 65535. - :vartype https_port: int - :ivar origin_host_header: The host header value sent to the origin with each request. If you - leave this blank, the request hostname determines this value. Azure CDN origins, such as Web - Apps, Blob Storage, and Cloud Services require this host header value to match the origin - hostname by default. - :vartype origin_host_header: str - :ivar priority: Priority of origin in given origin group for load balancing. Higher priorities - will not be used for load balancing if any lower priority origin is healthy.Must be between 1 - and 5. - :vartype priority: int - :ivar weight: Weight of the origin in given origin group for load balancing. Must be between 1 - and 1000. - :vartype weight: int - :ivar enabled: Origin is enabled for load balancing or not. By default, origin is always - enabled. - :vartype enabled: bool - :ivar private_link_alias: The Alias of the Private Link resource. Populating this optional - field indicates that this origin is 'Private'. - :vartype private_link_alias: str - :ivar private_link_resource_id: The Resource Id of the Private Link resource. Populating this - optional field indicates that this backend is 'Private'. - :vartype private_link_resource_id: str - :ivar private_link_location: The location of the Private Link resource. Required only if - 'privateLinkResourceId' is populated. - :vartype private_link_location: str - :ivar private_link_approval_message: A custom message to be included in the approval request to - connect to the Private Link. - :vartype private_link_approval_message: str - :ivar private_endpoint_status: The approval status for the connection to the Private Link. - Known values are: "Pending", "Approved", "Rejected", "Disconnected", and "Timeout". - :vartype private_endpoint_status: str or ~azure.mgmt.cdn.models.PrivateEndpointStatus - """ - - _validation = { - "name": {"required": True}, - "http_port": {"maximum": 65535, "minimum": 1}, - "https_port": {"maximum": 65535, "minimum": 1}, - "priority": {"maximum": 5, "minimum": 1}, - "weight": {"maximum": 1000, "minimum": 1}, - "private_endpoint_status": {"readonly": True}, - } - - _attribute_map = { - "name": {"key": "name", "type": "str"}, - "host_name": {"key": "properties.hostName", "type": "str"}, - "http_port": {"key": "properties.httpPort", "type": "int"}, - "https_port": {"key": "properties.httpsPort", "type": "int"}, - "origin_host_header": {"key": "properties.originHostHeader", "type": "str"}, - "priority": {"key": "properties.priority", "type": "int"}, - "weight": {"key": "properties.weight", "type": "int"}, - "enabled": {"key": "properties.enabled", "type": "bool"}, - "private_link_alias": {"key": "properties.privateLinkAlias", "type": "str"}, - "private_link_resource_id": {"key": "properties.privateLinkResourceId", "type": "str"}, - "private_link_location": {"key": "properties.privateLinkLocation", "type": "str"}, - "private_link_approval_message": {"key": "properties.privateLinkApprovalMessage", "type": "str"}, - "private_endpoint_status": {"key": "properties.privateEndpointStatus", "type": "str"}, - } - - def __init__( - self, - *, - name: str, - host_name: Optional[str] = None, - http_port: Optional[int] = None, - https_port: Optional[int] = None, - origin_host_header: Optional[str] = None, - priority: Optional[int] = None, - weight: Optional[int] = None, - enabled: Optional[bool] = None, - private_link_alias: Optional[str] = None, - private_link_resource_id: Optional[str] = None, - private_link_location: Optional[str] = None, - private_link_approval_message: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword name: Origin name which must be unique within the endpoint. Required. - :paramtype name: str - :keyword host_name: The address of the origin. It can be a domain name, IPv4 address, or IPv6 - address. This should be unique across all origins in an endpoint. - :paramtype host_name: str - :keyword http_port: The value of the HTTP port. Must be between 1 and 65535. - :paramtype http_port: int - :keyword https_port: The value of the HTTPS port. Must be between 1 and 65535. - :paramtype https_port: int - :keyword origin_host_header: The host header value sent to the origin with each request. If you - leave this blank, the request hostname determines this value. Azure CDN origins, such as Web - Apps, Blob Storage, and Cloud Services require this host header value to match the origin - hostname by default. - :paramtype origin_host_header: str - :keyword priority: Priority of origin in given origin group for load balancing. Higher - priorities will not be used for load balancing if any lower priority origin is healthy.Must be - between 1 and 5. - :paramtype priority: int - :keyword weight: Weight of the origin in given origin group for load balancing. Must be between - 1 and 1000. - :paramtype weight: int - :keyword enabled: Origin is enabled for load balancing or not. By default, origin is always - enabled. - :paramtype enabled: bool - :keyword private_link_alias: The Alias of the Private Link resource. Populating this optional - field indicates that this origin is 'Private'. - :paramtype private_link_alias: str - :keyword private_link_resource_id: The Resource Id of the Private Link resource. Populating - this optional field indicates that this backend is 'Private'. - :paramtype private_link_resource_id: str - :keyword private_link_location: The location of the Private Link resource. Required only if - 'privateLinkResourceId' is populated. - :paramtype private_link_location: str - :keyword private_link_approval_message: A custom message to be included in the approval request - to connect to the Private Link. - :paramtype private_link_approval_message: str - """ - super().__init__(**kwargs) - self.name = name - self.host_name = host_name - self.http_port = http_port - self.https_port = https_port - self.origin_host_header = origin_host_header - self.priority = priority - self.weight = weight - self.enabled = enabled - self.private_link_alias = private_link_alias - self.private_link_resource_id = private_link_resource_id - self.private_link_location = private_link_location - self.private_link_approval_message = private_link_approval_message - self.private_endpoint_status: Optional[Union[str, "_models.PrivateEndpointStatus"]] = None - - -class DeepCreatedOriginGroup(_serialization.Model): - """The origin group for CDN content which is added when creating a CDN endpoint. Traffic is sent - to the origins within the origin group based on origin health. - - All required parameters must be populated in order to send to server. - - :ivar name: Origin group name which must be unique within the endpoint. Required. - :vartype name: str - :ivar health_probe_settings: Health probe settings to the origin that is used to determine the - health of the origin. - :vartype health_probe_settings: ~azure.mgmt.cdn.models.HealthProbeParameters - :ivar origins: The source of the content being delivered via CDN within given origin group. - :vartype origins: list[~azure.mgmt.cdn.models.ResourceReference] - :ivar traffic_restoration_time_to_healed_or_new_endpoints_in_minutes: Time in minutes to shift - the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new - endpoint is added. Default is 10 mins. This property is currently not supported. - :vartype traffic_restoration_time_to_healed_or_new_endpoints_in_minutes: int - :ivar response_based_origin_error_detection_settings: The JSON object that contains the - properties to determine origin health using real requests/responses.This property is currently - not supported. - :vartype response_based_origin_error_detection_settings: - ~azure.mgmt.cdn.models.ResponseBasedOriginErrorDetectionParameters - """ - - _validation = { - "name": {"required": True}, - "traffic_restoration_time_to_healed_or_new_endpoints_in_minutes": {"maximum": 50, "minimum": 0}, - } - - _attribute_map = { - "name": {"key": "name", "type": "str"}, - "health_probe_settings": {"key": "properties.healthProbeSettings", "type": "HealthProbeParameters"}, - "origins": {"key": "properties.origins", "type": "[ResourceReference]"}, - "traffic_restoration_time_to_healed_or_new_endpoints_in_minutes": { - "key": "properties.trafficRestorationTimeToHealedOrNewEndpointsInMinutes", - "type": "int", - }, - "response_based_origin_error_detection_settings": { - "key": "properties.responseBasedOriginErrorDetectionSettings", - "type": "ResponseBasedOriginErrorDetectionParameters", - }, - } - - def __init__( - self, - *, - name: str, - health_probe_settings: Optional["_models.HealthProbeParameters"] = None, - origins: Optional[list["_models.ResourceReference"]] = None, - traffic_restoration_time_to_healed_or_new_endpoints_in_minutes: Optional[int] = None, - response_based_origin_error_detection_settings: Optional[ - "_models.ResponseBasedOriginErrorDetectionParameters" - ] = None, - **kwargs: Any - ) -> None: - """ - :keyword name: Origin group name which must be unique within the endpoint. Required. - :paramtype name: str - :keyword health_probe_settings: Health probe settings to the origin that is used to determine - the health of the origin. - :paramtype health_probe_settings: ~azure.mgmt.cdn.models.HealthProbeParameters - :keyword origins: The source of the content being delivered via CDN within given origin group. - :paramtype origins: list[~azure.mgmt.cdn.models.ResourceReference] - :keyword traffic_restoration_time_to_healed_or_new_endpoints_in_minutes: Time in minutes to - shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new - endpoint is added. Default is 10 mins. This property is currently not supported. - :paramtype traffic_restoration_time_to_healed_or_new_endpoints_in_minutes: int - :keyword response_based_origin_error_detection_settings: The JSON object that contains the - properties to determine origin health using real requests/responses.This property is currently - not supported. - :paramtype response_based_origin_error_detection_settings: - ~azure.mgmt.cdn.models.ResponseBasedOriginErrorDetectionParameters - """ - super().__init__(**kwargs) - self.name = name - self.health_probe_settings = health_probe_settings - self.origins = origins - self.traffic_restoration_time_to_healed_or_new_endpoints_in_minutes = ( - traffic_restoration_time_to_healed_or_new_endpoints_in_minutes - ) - self.response_based_origin_error_detection_settings = response_based_origin_error_detection_settings - - -class DeliveryRule(_serialization.Model): - """A rule that specifies a set of actions and conditions. - - All required parameters must be populated in order to send to server. - - :ivar name: Name of the rule. - :vartype name: str - :ivar order: The order in which the rules are applied for the endpoint. Possible values - {0,1,2,3,………}. A rule with a lesser order will be applied before a rule with a greater order. - Rule with order 0 is a special rule. It does not require any condition and actions listed in it - will always be applied. Required. - :vartype order: int - :ivar conditions: A list of conditions that must be matched for the actions to be executed. - :vartype conditions: list[~azure.mgmt.cdn.models.DeliveryRuleCondition] - :ivar actions: A list of actions that are executed when all the conditions of a rule are - satisfied. Required. - :vartype actions: list[~azure.mgmt.cdn.models.DeliveryRuleAction] - """ - - _validation = { - "order": {"required": True}, - "actions": {"required": True}, - } - - _attribute_map = { - "name": {"key": "name", "type": "str"}, - "order": {"key": "order", "type": "int"}, - "conditions": {"key": "conditions", "type": "[DeliveryRuleCondition]"}, - "actions": {"key": "actions", "type": "[DeliveryRuleAction]"}, - } - - def __init__( - self, - *, - order: int, - actions: list["_models.DeliveryRuleAction"], - name: Optional[str] = None, - conditions: Optional[list["_models.DeliveryRuleCondition"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword name: Name of the rule. - :paramtype name: str - :keyword order: The order in which the rules are applied for the endpoint. Possible values - {0,1,2,3,………}. A rule with a lesser order will be applied before a rule with a greater order. - Rule with order 0 is a special rule. It does not require any condition and actions listed in it - will always be applied. Required. - :paramtype order: int - :keyword conditions: A list of conditions that must be matched for the actions to be executed. - :paramtype conditions: list[~azure.mgmt.cdn.models.DeliveryRuleCondition] - :keyword actions: A list of actions that are executed when all the conditions of a rule are - satisfied. Required. - :paramtype actions: list[~azure.mgmt.cdn.models.DeliveryRuleAction] - """ - super().__init__(**kwargs) - self.name = name - self.order = order - self.conditions = conditions - self.actions = actions - - -class DeliveryRuleAction(_serialization.Model): - """An action for the delivery rule. - - You probably want to use the sub-classes and not this class directly. Known sub-classes are: - DeliveryRuleCacheExpirationAction, DeliveryRuleCacheKeyQueryStringAction, - DeliveryRuleRequestHeaderAction, DeliveryRuleResponseHeaderAction, OriginGroupOverrideAction, - DeliveryRuleRouteConfigurationOverrideAction, UrlRedirectAction, UrlRewriteAction, - UrlSigningAction - - All required parameters must be populated in order to send to server. - - :ivar name: The name of the action for the delivery rule. Required. Known values are: - "CacheExpiration", "CacheKeyQueryString", "ModifyRequestHeader", "ModifyResponseHeader", - "UrlRedirect", "UrlRewrite", "UrlSigning", "OriginGroupOverride", and - "RouteConfigurationOverride". - :vartype name: str or ~azure.mgmt.cdn.models.DeliveryRuleActionEnum - """ - - _validation = { - "name": {"required": True}, - } - - _attribute_map = { - "name": {"key": "name", "type": "str"}, - } - - _subtype_map = { - "name": { - "CacheExpiration": "DeliveryRuleCacheExpirationAction", - "CacheKeyQueryString": "DeliveryRuleCacheKeyQueryStringAction", - "ModifyRequestHeader": "DeliveryRuleRequestHeaderAction", - "ModifyResponseHeader": "DeliveryRuleResponseHeaderAction", - "OriginGroupOverride": "OriginGroupOverrideAction", - "RouteConfigurationOverride": "DeliveryRuleRouteConfigurationOverrideAction", - "UrlRedirect": "UrlRedirectAction", - "UrlRewrite": "UrlRewriteAction", - "UrlSigning": "UrlSigningAction", - } - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.name: Optional[str] = None - - -class DeliveryRuleCacheExpirationAction(DeliveryRuleAction): - """Defines the cache expiration action for the delivery rule. - - All required parameters must be populated in order to send to server. - - :ivar name: The name of the action for the delivery rule. Required. Known values are: - "CacheExpiration", "CacheKeyQueryString", "ModifyRequestHeader", "ModifyResponseHeader", - "UrlRedirect", "UrlRewrite", "UrlSigning", "OriginGroupOverride", and - "RouteConfigurationOverride". - :vartype name: str or ~azure.mgmt.cdn.models.DeliveryRuleActionEnum - :ivar parameters: Defines the parameters for the action. Required. - :vartype parameters: ~azure.mgmt.cdn.models.CacheExpirationActionParameters - """ - - _validation = { - "name": {"required": True}, - "parameters": {"required": True}, - } - - _attribute_map = { - "name": {"key": "name", "type": "str"}, - "parameters": {"key": "parameters", "type": "CacheExpirationActionParameters"}, - } - - def __init__(self, *, parameters: "_models.CacheExpirationActionParameters", **kwargs: Any) -> None: - """ - :keyword parameters: Defines the parameters for the action. Required. - :paramtype parameters: ~azure.mgmt.cdn.models.CacheExpirationActionParameters - """ - super().__init__(**kwargs) - self.name: str = "CacheExpiration" - self.parameters = parameters - - -class DeliveryRuleCacheKeyQueryStringAction(DeliveryRuleAction): - """Defines the cache-key query string action for the delivery rule. - - All required parameters must be populated in order to send to server. - - :ivar name: The name of the action for the delivery rule. Required. Known values are: - "CacheExpiration", "CacheKeyQueryString", "ModifyRequestHeader", "ModifyResponseHeader", - "UrlRedirect", "UrlRewrite", "UrlSigning", "OriginGroupOverride", and - "RouteConfigurationOverride". - :vartype name: str or ~azure.mgmt.cdn.models.DeliveryRuleActionEnum - :ivar parameters: Defines the parameters for the action. Required. - :vartype parameters: ~azure.mgmt.cdn.models.CacheKeyQueryStringActionParameters - """ - - _validation = { - "name": {"required": True}, - "parameters": {"required": True}, - } - - _attribute_map = { - "name": {"key": "name", "type": "str"}, - "parameters": {"key": "parameters", "type": "CacheKeyQueryStringActionParameters"}, - } - - def __init__(self, *, parameters: "_models.CacheKeyQueryStringActionParameters", **kwargs: Any) -> None: - """ - :keyword parameters: Defines the parameters for the action. Required. - :paramtype parameters: ~azure.mgmt.cdn.models.CacheKeyQueryStringActionParameters - """ - super().__init__(**kwargs) - self.name: str = "CacheKeyQueryString" - self.parameters = parameters - - -class DeliveryRuleCondition(_serialization.Model): - """A condition for the delivery rule. - - You probably want to use the sub-classes and not this class directly. Known sub-classes are: - DeliveryRuleClientPortCondition, DeliveryRuleCookiesCondition, DeliveryRuleHostNameCondition, - DeliveryRuleHttpVersionCondition, DeliveryRuleIsDeviceCondition, DeliveryRulePostArgsCondition, - DeliveryRuleQueryStringCondition, DeliveryRuleRemoteAddressCondition, - DeliveryRuleRequestBodyCondition, DeliveryRuleRequestHeaderCondition, - DeliveryRuleRequestMethodCondition, DeliveryRuleRequestSchemeCondition, - DeliveryRuleRequestUriCondition, DeliveryRuleServerPortCondition, - DeliveryRuleSocketAddrCondition, DeliveryRuleSslProtocolCondition, - DeliveryRuleUrlFileExtensionCondition, DeliveryRuleUrlFileNameCondition, - DeliveryRuleUrlPathCondition - - All required parameters must be populated in order to send to server. - - :ivar name: The name of the condition for the delivery rule. Required. Known values are: - "RemoteAddress", "RequestMethod", "QueryString", "PostArgs", "RequestUri", "RequestHeader", - "RequestBody", "RequestScheme", "UrlPath", "UrlFileExtension", "UrlFileName", "HttpVersion", - "Cookies", "IsDevice", "SocketAddr", "ClientPort", "ServerPort", "HostName", and "SslProtocol". - :vartype name: str or ~azure.mgmt.cdn.models.MatchVariable - """ - - _validation = { - "name": {"required": True}, - } - - _attribute_map = { - "name": {"key": "name", "type": "str"}, - } - - _subtype_map = { - "name": { - "ClientPort": "DeliveryRuleClientPortCondition", - "Cookies": "DeliveryRuleCookiesCondition", - "HostName": "DeliveryRuleHostNameCondition", - "HttpVersion": "DeliveryRuleHttpVersionCondition", - "IsDevice": "DeliveryRuleIsDeviceCondition", - "PostArgs": "DeliveryRulePostArgsCondition", - "QueryString": "DeliveryRuleQueryStringCondition", - "RemoteAddress": "DeliveryRuleRemoteAddressCondition", - "RequestBody": "DeliveryRuleRequestBodyCondition", - "RequestHeader": "DeliveryRuleRequestHeaderCondition", - "RequestMethod": "DeliveryRuleRequestMethodCondition", - "RequestScheme": "DeliveryRuleRequestSchemeCondition", - "RequestUri": "DeliveryRuleRequestUriCondition", - "ServerPort": "DeliveryRuleServerPortCondition", - "SocketAddr": "DeliveryRuleSocketAddrCondition", - "SslProtocol": "DeliveryRuleSslProtocolCondition", - "UrlFileExtension": "DeliveryRuleUrlFileExtensionCondition", - "UrlFileName": "DeliveryRuleUrlFileNameCondition", - "UrlPath": "DeliveryRuleUrlPathCondition", - } - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.name: Optional[str] = None - - -class DeliveryRuleClientPortCondition(DeliveryRuleCondition): - """Defines the ClientPort condition for the delivery rule. - - All required parameters must be populated in order to send to server. - - :ivar name: The name of the condition for the delivery rule. Required. Known values are: - "RemoteAddress", "RequestMethod", "QueryString", "PostArgs", "RequestUri", "RequestHeader", - "RequestBody", "RequestScheme", "UrlPath", "UrlFileExtension", "UrlFileName", "HttpVersion", - "Cookies", "IsDevice", "SocketAddr", "ClientPort", "ServerPort", "HostName", and "SslProtocol". - :vartype name: str or ~azure.mgmt.cdn.models.MatchVariable - :ivar parameters: Defines the parameters for the condition. Required. - :vartype parameters: ~azure.mgmt.cdn.models.ClientPortMatchConditionParameters - """ - - _validation = { - "name": {"required": True}, - "parameters": {"required": True}, - } - - _attribute_map = { - "name": {"key": "name", "type": "str"}, - "parameters": {"key": "parameters", "type": "ClientPortMatchConditionParameters"}, - } - - def __init__(self, *, parameters: "_models.ClientPortMatchConditionParameters", **kwargs: Any) -> None: - """ - :keyword parameters: Defines the parameters for the condition. Required. - :paramtype parameters: ~azure.mgmt.cdn.models.ClientPortMatchConditionParameters - """ - super().__init__(**kwargs) - self.name: str = "ClientPort" - self.parameters = parameters - - -class DeliveryRuleCookiesCondition(DeliveryRuleCondition): - """Defines the Cookies condition for the delivery rule. - - All required parameters must be populated in order to send to server. - - :ivar name: The name of the condition for the delivery rule. Required. Known values are: - "RemoteAddress", "RequestMethod", "QueryString", "PostArgs", "RequestUri", "RequestHeader", - "RequestBody", "RequestScheme", "UrlPath", "UrlFileExtension", "UrlFileName", "HttpVersion", - "Cookies", "IsDevice", "SocketAddr", "ClientPort", "ServerPort", "HostName", and "SslProtocol". - :vartype name: str or ~azure.mgmt.cdn.models.MatchVariable - :ivar parameters: Defines the parameters for the condition. Required. - :vartype parameters: ~azure.mgmt.cdn.models.CookiesMatchConditionParameters - """ - - _validation = { - "name": {"required": True}, - "parameters": {"required": True}, - } - - _attribute_map = { - "name": {"key": "name", "type": "str"}, - "parameters": {"key": "parameters", "type": "CookiesMatchConditionParameters"}, - } - - def __init__(self, *, parameters: "_models.CookiesMatchConditionParameters", **kwargs: Any) -> None: - """ - :keyword parameters: Defines the parameters for the condition. Required. - :paramtype parameters: ~azure.mgmt.cdn.models.CookiesMatchConditionParameters - """ - super().__init__(**kwargs) - self.name: str = "Cookies" - self.parameters = parameters - - -class DeliveryRuleHostNameCondition(DeliveryRuleCondition): - """Defines the HostName condition for the delivery rule. - - All required parameters must be populated in order to send to server. - - :ivar name: The name of the condition for the delivery rule. Required. Known values are: - "RemoteAddress", "RequestMethod", "QueryString", "PostArgs", "RequestUri", "RequestHeader", - "RequestBody", "RequestScheme", "UrlPath", "UrlFileExtension", "UrlFileName", "HttpVersion", - "Cookies", "IsDevice", "SocketAddr", "ClientPort", "ServerPort", "HostName", and "SslProtocol". - :vartype name: str or ~azure.mgmt.cdn.models.MatchVariable - :ivar parameters: Defines the parameters for the condition. Required. - :vartype parameters: ~azure.mgmt.cdn.models.HostNameMatchConditionParameters - """ - - _validation = { - "name": {"required": True}, - "parameters": {"required": True}, - } - - _attribute_map = { - "name": {"key": "name", "type": "str"}, - "parameters": {"key": "parameters", "type": "HostNameMatchConditionParameters"}, - } - - def __init__(self, *, parameters: "_models.HostNameMatchConditionParameters", **kwargs: Any) -> None: - """ - :keyword parameters: Defines the parameters for the condition. Required. - :paramtype parameters: ~azure.mgmt.cdn.models.HostNameMatchConditionParameters - """ - super().__init__(**kwargs) - self.name: str = "HostName" - self.parameters = parameters - - -class DeliveryRuleHttpVersionCondition(DeliveryRuleCondition): - """Defines the HttpVersion condition for the delivery rule. - - All required parameters must be populated in order to send to server. - - :ivar name: The name of the condition for the delivery rule. Required. Known values are: - "RemoteAddress", "RequestMethod", "QueryString", "PostArgs", "RequestUri", "RequestHeader", - "RequestBody", "RequestScheme", "UrlPath", "UrlFileExtension", "UrlFileName", "HttpVersion", - "Cookies", "IsDevice", "SocketAddr", "ClientPort", "ServerPort", "HostName", and "SslProtocol". - :vartype name: str or ~azure.mgmt.cdn.models.MatchVariable - :ivar parameters: Defines the parameters for the condition. Required. - :vartype parameters: ~azure.mgmt.cdn.models.HttpVersionMatchConditionParameters - """ - - _validation = { - "name": {"required": True}, - "parameters": {"required": True}, - } - - _attribute_map = { - "name": {"key": "name", "type": "str"}, - "parameters": {"key": "parameters", "type": "HttpVersionMatchConditionParameters"}, - } - - def __init__(self, *, parameters: "_models.HttpVersionMatchConditionParameters", **kwargs: Any) -> None: - """ - :keyword parameters: Defines the parameters for the condition. Required. - :paramtype parameters: ~azure.mgmt.cdn.models.HttpVersionMatchConditionParameters - """ - super().__init__(**kwargs) - self.name: str = "HttpVersion" - self.parameters = parameters - - -class DeliveryRuleIsDeviceCondition(DeliveryRuleCondition): - """Defines the IsDevice condition for the delivery rule. - - All required parameters must be populated in order to send to server. - - :ivar name: The name of the condition for the delivery rule. Required. Known values are: - "RemoteAddress", "RequestMethod", "QueryString", "PostArgs", "RequestUri", "RequestHeader", - "RequestBody", "RequestScheme", "UrlPath", "UrlFileExtension", "UrlFileName", "HttpVersion", - "Cookies", "IsDevice", "SocketAddr", "ClientPort", "ServerPort", "HostName", and "SslProtocol". - :vartype name: str or ~azure.mgmt.cdn.models.MatchVariable - :ivar parameters: Defines the parameters for the condition. Required. - :vartype parameters: ~azure.mgmt.cdn.models.IsDeviceMatchConditionParameters - """ - - _validation = { - "name": {"required": True}, - "parameters": {"required": True}, - } - - _attribute_map = { - "name": {"key": "name", "type": "str"}, - "parameters": {"key": "parameters", "type": "IsDeviceMatchConditionParameters"}, - } - - def __init__(self, *, parameters: "_models.IsDeviceMatchConditionParameters", **kwargs: Any) -> None: - """ - :keyword parameters: Defines the parameters for the condition. Required. - :paramtype parameters: ~azure.mgmt.cdn.models.IsDeviceMatchConditionParameters - """ - super().__init__(**kwargs) - self.name: str = "IsDevice" - self.parameters = parameters - - -class DeliveryRulePostArgsCondition(DeliveryRuleCondition): - """Defines the PostArgs condition for the delivery rule. - - All required parameters must be populated in order to send to server. - - :ivar name: The name of the condition for the delivery rule. Required. Known values are: - "RemoteAddress", "RequestMethod", "QueryString", "PostArgs", "RequestUri", "RequestHeader", - "RequestBody", "RequestScheme", "UrlPath", "UrlFileExtension", "UrlFileName", "HttpVersion", - "Cookies", "IsDevice", "SocketAddr", "ClientPort", "ServerPort", "HostName", and "SslProtocol". - :vartype name: str or ~azure.mgmt.cdn.models.MatchVariable - :ivar parameters: Defines the parameters for the condition. Required. - :vartype parameters: ~azure.mgmt.cdn.models.PostArgsMatchConditionParameters - """ - - _validation = { - "name": {"required": True}, - "parameters": {"required": True}, - } - - _attribute_map = { - "name": {"key": "name", "type": "str"}, - "parameters": {"key": "parameters", "type": "PostArgsMatchConditionParameters"}, - } - - def __init__(self, *, parameters: "_models.PostArgsMatchConditionParameters", **kwargs: Any) -> None: - """ - :keyword parameters: Defines the parameters for the condition. Required. - :paramtype parameters: ~azure.mgmt.cdn.models.PostArgsMatchConditionParameters - """ - super().__init__(**kwargs) - self.name: str = "PostArgs" - self.parameters = parameters - - -class DeliveryRuleQueryStringCondition(DeliveryRuleCondition): - """Defines the QueryString condition for the delivery rule. - - All required parameters must be populated in order to send to server. - - :ivar name: The name of the condition for the delivery rule. Required. Known values are: - "RemoteAddress", "RequestMethod", "QueryString", "PostArgs", "RequestUri", "RequestHeader", - "RequestBody", "RequestScheme", "UrlPath", "UrlFileExtension", "UrlFileName", "HttpVersion", - "Cookies", "IsDevice", "SocketAddr", "ClientPort", "ServerPort", "HostName", and "SslProtocol". - :vartype name: str or ~azure.mgmt.cdn.models.MatchVariable - :ivar parameters: Defines the parameters for the condition. Required. - :vartype parameters: ~azure.mgmt.cdn.models.QueryStringMatchConditionParameters - """ - - _validation = { - "name": {"required": True}, - "parameters": {"required": True}, - } - - _attribute_map = { - "name": {"key": "name", "type": "str"}, - "parameters": {"key": "parameters", "type": "QueryStringMatchConditionParameters"}, - } - - def __init__(self, *, parameters: "_models.QueryStringMatchConditionParameters", **kwargs: Any) -> None: - """ - :keyword parameters: Defines the parameters for the condition. Required. - :paramtype parameters: ~azure.mgmt.cdn.models.QueryStringMatchConditionParameters - """ - super().__init__(**kwargs) - self.name: str = "QueryString" - self.parameters = parameters - - -class DeliveryRuleRemoteAddressCondition(DeliveryRuleCondition): - """Defines the RemoteAddress condition for the delivery rule. - - All required parameters must be populated in order to send to server. - - :ivar name: The name of the condition for the delivery rule. Required. Known values are: - "RemoteAddress", "RequestMethod", "QueryString", "PostArgs", "RequestUri", "RequestHeader", - "RequestBody", "RequestScheme", "UrlPath", "UrlFileExtension", "UrlFileName", "HttpVersion", - "Cookies", "IsDevice", "SocketAddr", "ClientPort", "ServerPort", "HostName", and "SslProtocol". - :vartype name: str or ~azure.mgmt.cdn.models.MatchVariable - :ivar parameters: Defines the parameters for the condition. Required. - :vartype parameters: ~azure.mgmt.cdn.models.RemoteAddressMatchConditionParameters - """ - - _validation = { - "name": {"required": True}, - "parameters": {"required": True}, - } - - _attribute_map = { - "name": {"key": "name", "type": "str"}, - "parameters": {"key": "parameters", "type": "RemoteAddressMatchConditionParameters"}, - } - - def __init__(self, *, parameters: "_models.RemoteAddressMatchConditionParameters", **kwargs: Any) -> None: - """ - :keyword parameters: Defines the parameters for the condition. Required. - :paramtype parameters: ~azure.mgmt.cdn.models.RemoteAddressMatchConditionParameters - """ - super().__init__(**kwargs) - self.name: str = "RemoteAddress" - self.parameters = parameters - - -class DeliveryRuleRequestBodyCondition(DeliveryRuleCondition): - """Defines the RequestBody condition for the delivery rule. - - All required parameters must be populated in order to send to server. - - :ivar name: The name of the condition for the delivery rule. Required. Known values are: - "RemoteAddress", "RequestMethod", "QueryString", "PostArgs", "RequestUri", "RequestHeader", - "RequestBody", "RequestScheme", "UrlPath", "UrlFileExtension", "UrlFileName", "HttpVersion", - "Cookies", "IsDevice", "SocketAddr", "ClientPort", "ServerPort", "HostName", and "SslProtocol". - :vartype name: str or ~azure.mgmt.cdn.models.MatchVariable - :ivar parameters: Defines the parameters for the condition. Required. - :vartype parameters: ~azure.mgmt.cdn.models.RequestBodyMatchConditionParameters - """ - - _validation = { - "name": {"required": True}, - "parameters": {"required": True}, - } - - _attribute_map = { - "name": {"key": "name", "type": "str"}, - "parameters": {"key": "parameters", "type": "RequestBodyMatchConditionParameters"}, - } - - def __init__(self, *, parameters: "_models.RequestBodyMatchConditionParameters", **kwargs: Any) -> None: - """ - :keyword parameters: Defines the parameters for the condition. Required. - :paramtype parameters: ~azure.mgmt.cdn.models.RequestBodyMatchConditionParameters - """ - super().__init__(**kwargs) - self.name: str = "RequestBody" - self.parameters = parameters - - -class DeliveryRuleRequestHeaderAction(DeliveryRuleAction): - """Defines the request header action for the delivery rule. - - All required parameters must be populated in order to send to server. - - :ivar name: The name of the action for the delivery rule. Required. Known values are: - "CacheExpiration", "CacheKeyQueryString", "ModifyRequestHeader", "ModifyResponseHeader", - "UrlRedirect", "UrlRewrite", "UrlSigning", "OriginGroupOverride", and - "RouteConfigurationOverride". - :vartype name: str or ~azure.mgmt.cdn.models.DeliveryRuleActionEnum - :ivar parameters: Defines the parameters for the action. Required. - :vartype parameters: ~azure.mgmt.cdn.models.HeaderActionParameters - """ - - _validation = { - "name": {"required": True}, - "parameters": {"required": True}, - } - - _attribute_map = { - "name": {"key": "name", "type": "str"}, - "parameters": {"key": "parameters", "type": "HeaderActionParameters"}, - } - - def __init__(self, *, parameters: "_models.HeaderActionParameters", **kwargs: Any) -> None: - """ - :keyword parameters: Defines the parameters for the action. Required. - :paramtype parameters: ~azure.mgmt.cdn.models.HeaderActionParameters - """ - super().__init__(**kwargs) - self.name: str = "ModifyRequestHeader" - self.parameters = parameters - - -class DeliveryRuleRequestHeaderCondition(DeliveryRuleCondition): - """Defines the RequestHeader condition for the delivery rule. - - All required parameters must be populated in order to send to server. - - :ivar name: The name of the condition for the delivery rule. Required. Known values are: - "RemoteAddress", "RequestMethod", "QueryString", "PostArgs", "RequestUri", "RequestHeader", - "RequestBody", "RequestScheme", "UrlPath", "UrlFileExtension", "UrlFileName", "HttpVersion", - "Cookies", "IsDevice", "SocketAddr", "ClientPort", "ServerPort", "HostName", and "SslProtocol". - :vartype name: str or ~azure.mgmt.cdn.models.MatchVariable - :ivar parameters: Defines the parameters for the condition. Required. - :vartype parameters: ~azure.mgmt.cdn.models.RequestHeaderMatchConditionParameters - """ - - _validation = { - "name": {"required": True}, - "parameters": {"required": True}, - } - - _attribute_map = { - "name": {"key": "name", "type": "str"}, - "parameters": {"key": "parameters", "type": "RequestHeaderMatchConditionParameters"}, - } - - def __init__(self, *, parameters: "_models.RequestHeaderMatchConditionParameters", **kwargs: Any) -> None: - """ - :keyword parameters: Defines the parameters for the condition. Required. - :paramtype parameters: ~azure.mgmt.cdn.models.RequestHeaderMatchConditionParameters - """ - super().__init__(**kwargs) - self.name: str = "RequestHeader" - self.parameters = parameters - - -class DeliveryRuleRequestMethodCondition(DeliveryRuleCondition): - """Defines the RequestMethod condition for the delivery rule. - - All required parameters must be populated in order to send to server. - - :ivar name: The name of the condition for the delivery rule. Required. Known values are: - "RemoteAddress", "RequestMethod", "QueryString", "PostArgs", "RequestUri", "RequestHeader", - "RequestBody", "RequestScheme", "UrlPath", "UrlFileExtension", "UrlFileName", "HttpVersion", - "Cookies", "IsDevice", "SocketAddr", "ClientPort", "ServerPort", "HostName", and "SslProtocol". - :vartype name: str or ~azure.mgmt.cdn.models.MatchVariable - :ivar parameters: Defines the parameters for the condition. Required. - :vartype parameters: ~azure.mgmt.cdn.models.RequestMethodMatchConditionParameters - """ - - _validation = { - "name": {"required": True}, - "parameters": {"required": True}, - } - - _attribute_map = { - "name": {"key": "name", "type": "str"}, - "parameters": {"key": "parameters", "type": "RequestMethodMatchConditionParameters"}, - } - - def __init__(self, *, parameters: "_models.RequestMethodMatchConditionParameters", **kwargs: Any) -> None: - """ - :keyword parameters: Defines the parameters for the condition. Required. - :paramtype parameters: ~azure.mgmt.cdn.models.RequestMethodMatchConditionParameters - """ - super().__init__(**kwargs) - self.name: str = "RequestMethod" - self.parameters = parameters - - -class DeliveryRuleRequestSchemeCondition(DeliveryRuleCondition): - """Defines the RequestScheme condition for the delivery rule. - - All required parameters must be populated in order to send to server. - - :ivar name: The name of the condition for the delivery rule. Required. Known values are: - "RemoteAddress", "RequestMethod", "QueryString", "PostArgs", "RequestUri", "RequestHeader", - "RequestBody", "RequestScheme", "UrlPath", "UrlFileExtension", "UrlFileName", "HttpVersion", - "Cookies", "IsDevice", "SocketAddr", "ClientPort", "ServerPort", "HostName", and "SslProtocol". - :vartype name: str or ~azure.mgmt.cdn.models.MatchVariable - :ivar parameters: Defines the parameters for the condition. Required. - :vartype parameters: ~azure.mgmt.cdn.models.RequestSchemeMatchConditionParameters - """ - - _validation = { - "name": {"required": True}, - "parameters": {"required": True}, - } - - _attribute_map = { - "name": {"key": "name", "type": "str"}, - "parameters": {"key": "parameters", "type": "RequestSchemeMatchConditionParameters"}, - } - - def __init__(self, *, parameters: "_models.RequestSchemeMatchConditionParameters", **kwargs: Any) -> None: - """ - :keyword parameters: Defines the parameters for the condition. Required. - :paramtype parameters: ~azure.mgmt.cdn.models.RequestSchemeMatchConditionParameters - """ - super().__init__(**kwargs) - self.name: str = "RequestScheme" - self.parameters = parameters - - -class DeliveryRuleRequestUriCondition(DeliveryRuleCondition): - """Defines the RequestUri condition for the delivery rule. - - All required parameters must be populated in order to send to server. - - :ivar name: The name of the condition for the delivery rule. Required. Known values are: - "RemoteAddress", "RequestMethod", "QueryString", "PostArgs", "RequestUri", "RequestHeader", - "RequestBody", "RequestScheme", "UrlPath", "UrlFileExtension", "UrlFileName", "HttpVersion", - "Cookies", "IsDevice", "SocketAddr", "ClientPort", "ServerPort", "HostName", and "SslProtocol". - :vartype name: str or ~azure.mgmt.cdn.models.MatchVariable - :ivar parameters: Defines the parameters for the condition. Required. - :vartype parameters: ~azure.mgmt.cdn.models.RequestUriMatchConditionParameters - """ - - _validation = { - "name": {"required": True}, - "parameters": {"required": True}, - } - - _attribute_map = { - "name": {"key": "name", "type": "str"}, - "parameters": {"key": "parameters", "type": "RequestUriMatchConditionParameters"}, - } - - def __init__(self, *, parameters: "_models.RequestUriMatchConditionParameters", **kwargs: Any) -> None: - """ - :keyword parameters: Defines the parameters for the condition. Required. - :paramtype parameters: ~azure.mgmt.cdn.models.RequestUriMatchConditionParameters - """ - super().__init__(**kwargs) - self.name: str = "RequestUri" - self.parameters = parameters - - -class DeliveryRuleResponseHeaderAction(DeliveryRuleAction): - """Defines the response header action for the delivery rule. - - All required parameters must be populated in order to send to server. - - :ivar name: The name of the action for the delivery rule. Required. Known values are: - "CacheExpiration", "CacheKeyQueryString", "ModifyRequestHeader", "ModifyResponseHeader", - "UrlRedirect", "UrlRewrite", "UrlSigning", "OriginGroupOverride", and - "RouteConfigurationOverride". - :vartype name: str or ~azure.mgmt.cdn.models.DeliveryRuleActionEnum - :ivar parameters: Defines the parameters for the action. Required. - :vartype parameters: ~azure.mgmt.cdn.models.HeaderActionParameters - """ - - _validation = { - "name": {"required": True}, - "parameters": {"required": True}, - } - - _attribute_map = { - "name": {"key": "name", "type": "str"}, - "parameters": {"key": "parameters", "type": "HeaderActionParameters"}, - } - - def __init__(self, *, parameters: "_models.HeaderActionParameters", **kwargs: Any) -> None: - """ - :keyword parameters: Defines the parameters for the action. Required. - :paramtype parameters: ~azure.mgmt.cdn.models.HeaderActionParameters - """ - super().__init__(**kwargs) - self.name: str = "ModifyResponseHeader" - self.parameters = parameters - - -class DeliveryRuleRouteConfigurationOverrideAction(DeliveryRuleAction): # pylint: disable=name-too-long - """Defines the route configuration override action for the delivery rule. Only applicable to - Frontdoor Standard/Premium Profiles. - - All required parameters must be populated in order to send to server. - - :ivar name: The name of the action for the delivery rule. Required. Known values are: - "CacheExpiration", "CacheKeyQueryString", "ModifyRequestHeader", "ModifyResponseHeader", - "UrlRedirect", "UrlRewrite", "UrlSigning", "OriginGroupOverride", and - "RouteConfigurationOverride". - :vartype name: str or ~azure.mgmt.cdn.models.DeliveryRuleActionEnum - :ivar parameters: Defines the parameters for the action. Required. - :vartype parameters: ~azure.mgmt.cdn.models.RouteConfigurationOverrideActionParameters - """ - - _validation = { - "name": {"required": True}, - "parameters": {"required": True}, - } - - _attribute_map = { - "name": {"key": "name", "type": "str"}, - "parameters": {"key": "parameters", "type": "RouteConfigurationOverrideActionParameters"}, - } - - def __init__(self, *, parameters: "_models.RouteConfigurationOverrideActionParameters", **kwargs: Any) -> None: - """ - :keyword parameters: Defines the parameters for the action. Required. - :paramtype parameters: ~azure.mgmt.cdn.models.RouteConfigurationOverrideActionParameters - """ - super().__init__(**kwargs) - self.name: str = "RouteConfigurationOverride" - self.parameters = parameters - - -class DeliveryRuleServerPortCondition(DeliveryRuleCondition): - """Defines the ServerPort condition for the delivery rule. - - All required parameters must be populated in order to send to server. - - :ivar name: The name of the condition for the delivery rule. Required. Known values are: - "RemoteAddress", "RequestMethod", "QueryString", "PostArgs", "RequestUri", "RequestHeader", - "RequestBody", "RequestScheme", "UrlPath", "UrlFileExtension", "UrlFileName", "HttpVersion", - "Cookies", "IsDevice", "SocketAddr", "ClientPort", "ServerPort", "HostName", and "SslProtocol". - :vartype name: str or ~azure.mgmt.cdn.models.MatchVariable - :ivar parameters: Defines the parameters for the condition. Required. - :vartype parameters: ~azure.mgmt.cdn.models.ServerPortMatchConditionParameters - """ - - _validation = { - "name": {"required": True}, - "parameters": {"required": True}, - } - - _attribute_map = { - "name": {"key": "name", "type": "str"}, - "parameters": {"key": "parameters", "type": "ServerPortMatchConditionParameters"}, - } - - def __init__(self, *, parameters: "_models.ServerPortMatchConditionParameters", **kwargs: Any) -> None: - """ - :keyword parameters: Defines the parameters for the condition. Required. - :paramtype parameters: ~azure.mgmt.cdn.models.ServerPortMatchConditionParameters - """ - super().__init__(**kwargs) - self.name: str = "ServerPort" - self.parameters = parameters - - -class DeliveryRuleSocketAddrCondition(DeliveryRuleCondition): - """Defines the SocketAddress condition for the delivery rule. - - All required parameters must be populated in order to send to server. - - :ivar name: The name of the condition for the delivery rule. Required. Known values are: - "RemoteAddress", "RequestMethod", "QueryString", "PostArgs", "RequestUri", "RequestHeader", - "RequestBody", "RequestScheme", "UrlPath", "UrlFileExtension", "UrlFileName", "HttpVersion", - "Cookies", "IsDevice", "SocketAddr", "ClientPort", "ServerPort", "HostName", and "SslProtocol". - :vartype name: str or ~azure.mgmt.cdn.models.MatchVariable - :ivar parameters: Defines the parameters for the condition. Required. - :vartype parameters: ~azure.mgmt.cdn.models.SocketAddrMatchConditionParameters - """ - - _validation = { - "name": {"required": True}, - "parameters": {"required": True}, - } - - _attribute_map = { - "name": {"key": "name", "type": "str"}, - "parameters": {"key": "parameters", "type": "SocketAddrMatchConditionParameters"}, - } - - def __init__(self, *, parameters: "_models.SocketAddrMatchConditionParameters", **kwargs: Any) -> None: - """ - :keyword parameters: Defines the parameters for the condition. Required. - :paramtype parameters: ~azure.mgmt.cdn.models.SocketAddrMatchConditionParameters - """ - super().__init__(**kwargs) - self.name: str = "SocketAddr" - self.parameters = parameters - - -class DeliveryRuleSslProtocolCondition(DeliveryRuleCondition): - """Defines the SslProtocol condition for the delivery rule. - - All required parameters must be populated in order to send to server. - - :ivar name: The name of the condition for the delivery rule. Required. Known values are: - "RemoteAddress", "RequestMethod", "QueryString", "PostArgs", "RequestUri", "RequestHeader", - "RequestBody", "RequestScheme", "UrlPath", "UrlFileExtension", "UrlFileName", "HttpVersion", - "Cookies", "IsDevice", "SocketAddr", "ClientPort", "ServerPort", "HostName", and "SslProtocol". - :vartype name: str or ~azure.mgmt.cdn.models.MatchVariable - :ivar parameters: Defines the parameters for the condition. Required. - :vartype parameters: ~azure.mgmt.cdn.models.SslProtocolMatchConditionParameters - """ - - _validation = { - "name": {"required": True}, - "parameters": {"required": True}, - } - - _attribute_map = { - "name": {"key": "name", "type": "str"}, - "parameters": {"key": "parameters", "type": "SslProtocolMatchConditionParameters"}, - } - - def __init__(self, *, parameters: "_models.SslProtocolMatchConditionParameters", **kwargs: Any) -> None: - """ - :keyword parameters: Defines the parameters for the condition. Required. - :paramtype parameters: ~azure.mgmt.cdn.models.SslProtocolMatchConditionParameters - """ - super().__init__(**kwargs) - self.name: str = "SslProtocol" - self.parameters = parameters - - -class DeliveryRuleUrlFileExtensionCondition(DeliveryRuleCondition): - """Defines the UrlFileExtension condition for the delivery rule. - - All required parameters must be populated in order to send to server. - - :ivar name: The name of the condition for the delivery rule. Required. Known values are: - "RemoteAddress", "RequestMethod", "QueryString", "PostArgs", "RequestUri", "RequestHeader", - "RequestBody", "RequestScheme", "UrlPath", "UrlFileExtension", "UrlFileName", "HttpVersion", - "Cookies", "IsDevice", "SocketAddr", "ClientPort", "ServerPort", "HostName", and "SslProtocol". - :vartype name: str or ~azure.mgmt.cdn.models.MatchVariable - :ivar parameters: Defines the parameters for the condition. Required. - :vartype parameters: ~azure.mgmt.cdn.models.UrlFileExtensionMatchConditionParameters - """ - - _validation = { - "name": {"required": True}, - "parameters": {"required": True}, - } - - _attribute_map = { - "name": {"key": "name", "type": "str"}, - "parameters": {"key": "parameters", "type": "UrlFileExtensionMatchConditionParameters"}, - } - - def __init__(self, *, parameters: "_models.UrlFileExtensionMatchConditionParameters", **kwargs: Any) -> None: - """ - :keyword parameters: Defines the parameters for the condition. Required. - :paramtype parameters: ~azure.mgmt.cdn.models.UrlFileExtensionMatchConditionParameters - """ - super().__init__(**kwargs) - self.name: str = "UrlFileExtension" - self.parameters = parameters - - -class DeliveryRuleUrlFileNameCondition(DeliveryRuleCondition): - """Defines the UrlFileName condition for the delivery rule. - - All required parameters must be populated in order to send to server. - - :ivar name: The name of the condition for the delivery rule. Required. Known values are: - "RemoteAddress", "RequestMethod", "QueryString", "PostArgs", "RequestUri", "RequestHeader", - "RequestBody", "RequestScheme", "UrlPath", "UrlFileExtension", "UrlFileName", "HttpVersion", - "Cookies", "IsDevice", "SocketAddr", "ClientPort", "ServerPort", "HostName", and "SslProtocol". - :vartype name: str or ~azure.mgmt.cdn.models.MatchVariable - :ivar parameters: Defines the parameters for the condition. Required. - :vartype parameters: ~azure.mgmt.cdn.models.UrlFileNameMatchConditionParameters - """ - - _validation = { - "name": {"required": True}, - "parameters": {"required": True}, - } - - _attribute_map = { - "name": {"key": "name", "type": "str"}, - "parameters": {"key": "parameters", "type": "UrlFileNameMatchConditionParameters"}, - } - - def __init__(self, *, parameters: "_models.UrlFileNameMatchConditionParameters", **kwargs: Any) -> None: - """ - :keyword parameters: Defines the parameters for the condition. Required. - :paramtype parameters: ~azure.mgmt.cdn.models.UrlFileNameMatchConditionParameters - """ - super().__init__(**kwargs) - self.name: str = "UrlFileName" - self.parameters = parameters - - -class DeliveryRuleUrlPathCondition(DeliveryRuleCondition): - """Defines the UrlPath condition for the delivery rule. - - All required parameters must be populated in order to send to server. - - :ivar name: The name of the condition for the delivery rule. Required. Known values are: - "RemoteAddress", "RequestMethod", "QueryString", "PostArgs", "RequestUri", "RequestHeader", - "RequestBody", "RequestScheme", "UrlPath", "UrlFileExtension", "UrlFileName", "HttpVersion", - "Cookies", "IsDevice", "SocketAddr", "ClientPort", "ServerPort", "HostName", and "SslProtocol". - :vartype name: str or ~azure.mgmt.cdn.models.MatchVariable - :ivar parameters: Defines the parameters for the condition. Required. - :vartype parameters: ~azure.mgmt.cdn.models.UrlPathMatchConditionParameters - """ - - _validation = { - "name": {"required": True}, - "parameters": {"required": True}, - } - - _attribute_map = { - "name": {"key": "name", "type": "str"}, - "parameters": {"key": "parameters", "type": "UrlPathMatchConditionParameters"}, - } - - def __init__(self, *, parameters: "_models.UrlPathMatchConditionParameters", **kwargs: Any) -> None: - """ - :keyword parameters: Defines the parameters for the condition. Required. - :paramtype parameters: ~azure.mgmt.cdn.models.UrlPathMatchConditionParameters - """ - super().__init__(**kwargs) - self.name: str = "UrlPath" - self.parameters = parameters - - -class DimensionProperties(_serialization.Model): - """Type of operation: get, read, delete, etc. - - :ivar name: Name of dimension. - :vartype name: str - :ivar display_name: Display name of dimension. - :vartype display_name: str - :ivar internal_name: Internal name of dimension. - :vartype internal_name: str - """ - - _attribute_map = { - "name": {"key": "name", "type": "str"}, - "display_name": {"key": "displayName", "type": "str"}, - "internal_name": {"key": "internalName", "type": "str"}, - } - - def __init__( - self, - *, - name: Optional[str] = None, - display_name: Optional[str] = None, - internal_name: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword name: Name of dimension. - :paramtype name: str - :keyword display_name: Display name of dimension. - :paramtype display_name: str - :keyword internal_name: Internal name of dimension. - :paramtype internal_name: str - """ - super().__init__(**kwargs) - self.name = name - self.display_name = display_name - self.internal_name = internal_name - - -class DomainValidationProperties(_serialization.Model): - """The JSON object that contains the properties to validate a domain. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar validation_token: Challenge used for DNS TXT record or file based validation. - :vartype validation_token: str - :ivar expiration_date: The date time that the token expires. - :vartype expiration_date: str - """ - - _validation = { - "validation_token": {"readonly": True}, - "expiration_date": {"readonly": True}, - } - - _attribute_map = { - "validation_token": {"key": "validationToken", "type": "str"}, - "expiration_date": {"key": "expirationDate", "type": "str"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.validation_token: Optional[str] = None - self.expiration_date: Optional[str] = None - - -class EdgeNode(ProxyResource): - """Edgenode is a global Point of Presence (POP) location used to deliver CDN content to end users. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. E.g. - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy - information. - :vartype system_data: ~azure.mgmt.cdn.models.SystemData - :ivar ip_address_groups: List of ip address groups. - :vartype ip_address_groups: list[~azure.mgmt.cdn.models.IpAddressGroup] - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "system_data": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "system_data": {"key": "systemData", "type": "SystemData"}, - "ip_address_groups": {"key": "properties.ipAddressGroups", "type": "[IpAddressGroup]"}, - } - - def __init__(self, *, ip_address_groups: Optional[list["_models.IpAddressGroup"]] = None, **kwargs: Any) -> None: - """ - :keyword ip_address_groups: List of ip address groups. - :paramtype ip_address_groups: list[~azure.mgmt.cdn.models.IpAddressGroup] - """ - super().__init__(**kwargs) - self.ip_address_groups = ip_address_groups - - -class EdgenodeResult(_serialization.Model): - """Result of the request to list CDN edgenodes. It contains a list of ip address group and a URL - link to get the next set of results. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: Edge node of CDN service. - :vartype value: list[~azure.mgmt.cdn.models.EdgeNode] - :ivar next_link: URL to get the next set of edgenode list results if there are any. - :vartype next_link: str - """ - - _validation = { - "value": {"readonly": True}, - } - - _attribute_map = { - "value": {"key": "value", "type": "[EdgeNode]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__(self, *, next_link: Optional[str] = None, **kwargs: Any) -> None: - """ - :keyword next_link: URL to get the next set of edgenode list results if there are any. - :paramtype next_link: str - """ - super().__init__(**kwargs) - self.value: Optional[list["_models.EdgeNode"]] = None - self.next_link = next_link - - -class Endpoint(TrackedResource): - """CDN endpoint is the entity within a CDN profile containing configuration information such as - origin, protocol, content caching and delivery behavior. The CDN endpoint uses the URL format - :code:``.azureedge.net. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to server. - - :ivar id: Fully qualified resource ID for the resource. E.g. - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy - information. - :vartype system_data: ~azure.mgmt.cdn.models.SystemData - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - :ivar location: The geo-location where the resource lives. Required. - :vartype location: str - :ivar origin_path: A directory path on the origin that CDN can use to retrieve content from, - e.g. contoso.cloudapp.net/originpath. - :vartype origin_path: str - :ivar content_types_to_compress: List of content types on which compression applies. The value - should be a valid MIME type. - :vartype content_types_to_compress: list[str] - :ivar origin_host_header: The host header value sent to the origin with each request. This - property at Endpoint is only allowed when endpoint uses single origin and can be overridden by - the same property specified at origin.If you leave this blank, the request hostname determines - this value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this - host header value to match the origin hostname by default. - :vartype origin_host_header: str - :ivar is_compression_enabled: Indicates whether content compression is enabled on CDN. Default - value is false. If compression is enabled, content will be served as compressed if user - requests for a compressed version. Content won't be compressed on CDN when requested content is - smaller than 1 byte or larger than 1 MB. - :vartype is_compression_enabled: bool - :ivar is_http_allowed: Indicates whether HTTP traffic is allowed on the endpoint. Default value - is true. At least one protocol (HTTP or HTTPS) must be allowed. - :vartype is_http_allowed: bool - :ivar is_https_allowed: Indicates whether HTTPS traffic is allowed on the endpoint. Default - value is true. At least one protocol (HTTP or HTTPS) must be allowed. - :vartype is_https_allowed: bool - :ivar query_string_caching_behavior: Defines how CDN caches requests that include query - strings. You can ignore any query strings when caching, bypass caching to prevent requests that - contain query strings from being cached, or cache every request with a unique URL. Known values - are: "IgnoreQueryString", "BypassCaching", "UseQueryString", and "NotSet". - :vartype query_string_caching_behavior: str or - ~azure.mgmt.cdn.models.QueryStringCachingBehavior - :ivar optimization_type: Specifies what scenario the customer wants this CDN endpoint to - optimize for, e.g. Download, Media services. With this information, CDN can apply scenario - driven optimization. Known values are: "GeneralWebDelivery", "GeneralMediaStreaming", - "VideoOnDemandMediaStreaming", "LargeFileDownload", and "DynamicSiteAcceleration". - :vartype optimization_type: str or ~azure.mgmt.cdn.models.OptimizationType - :ivar probe_path: Path to a file hosted on the origin which helps accelerate delivery of the - dynamic content and calculate the most optimal routes for the CDN. This is relative to the - origin path. This property is only relevant when using a single origin. - :vartype probe_path: str - :ivar geo_filters: List of rules defining the user's geo access within a CDN endpoint. Each geo - filter defines an access rule to a specified path or content, e.g. block APAC for path - /pictures/. - :vartype geo_filters: list[~azure.mgmt.cdn.models.GeoFilter] - :ivar default_origin_group: A reference to the origin group. - :vartype default_origin_group: ~azure.mgmt.cdn.models.ResourceReference - :ivar url_signing_keys: List of keys used to validate the signed URL hashes. - :vartype url_signing_keys: list[~azure.mgmt.cdn.models.UrlSigningKey] - :ivar delivery_policy: A policy that specifies the delivery rules to be used for an endpoint. - :vartype delivery_policy: - ~azure.mgmt.cdn.models.EndpointPropertiesUpdateParametersDeliveryPolicy - :ivar web_application_firewall_policy_link: Defines the Web Application Firewall policy for the - endpoint (if applicable). - :vartype web_application_firewall_policy_link: - ~azure.mgmt.cdn.models.EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink - :ivar host_name: The host name of the endpoint structured as {endpointName}.{DNSZone}, e.g. - contoso.azureedge.net. - :vartype host_name: str - :ivar origins: The source of the content being delivered via CDN. - :vartype origins: list[~azure.mgmt.cdn.models.DeepCreatedOrigin] - :ivar origin_groups: The origin groups comprising of origins that are used for load balancing - the traffic based on availability. - :vartype origin_groups: list[~azure.mgmt.cdn.models.DeepCreatedOriginGroup] - :ivar custom_domains: The custom domains under the endpoint. - :vartype custom_domains: list[~azure.mgmt.cdn.models.DeepCreatedCustomDomain] - :ivar resource_state: Resource status of the endpoint. Known values are: "Creating", - "Deleting", "Running", "Starting", "Stopped", and "Stopping". - :vartype resource_state: str or ~azure.mgmt.cdn.models.EndpointResourceState - :ivar provisioning_state: Provisioning status of the endpoint. Known values are: "Succeeded", - "Failed", "Updating", "Deleting", and "Creating". - :vartype provisioning_state: str or ~azure.mgmt.cdn.models.EndpointProvisioningState - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "system_data": {"readonly": True}, - "location": {"required": True}, - "host_name": {"readonly": True}, - "custom_domains": {"readonly": True}, - "resource_state": {"readonly": True}, - "provisioning_state": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "system_data": {"key": "systemData", "type": "SystemData"}, - "tags": {"key": "tags", "type": "{str}"}, - "location": {"key": "location", "type": "str"}, - "origin_path": {"key": "properties.originPath", "type": "str"}, - "content_types_to_compress": {"key": "properties.contentTypesToCompress", "type": "[str]"}, - "origin_host_header": {"key": "properties.originHostHeader", "type": "str"}, - "is_compression_enabled": {"key": "properties.isCompressionEnabled", "type": "bool"}, - "is_http_allowed": {"key": "properties.isHttpAllowed", "type": "bool"}, - "is_https_allowed": {"key": "properties.isHttpsAllowed", "type": "bool"}, - "query_string_caching_behavior": {"key": "properties.queryStringCachingBehavior", "type": "str"}, - "optimization_type": {"key": "properties.optimizationType", "type": "str"}, - "probe_path": {"key": "properties.probePath", "type": "str"}, - "geo_filters": {"key": "properties.geoFilters", "type": "[GeoFilter]"}, - "default_origin_group": {"key": "properties.defaultOriginGroup", "type": "ResourceReference"}, - "url_signing_keys": {"key": "properties.urlSigningKeys", "type": "[UrlSigningKey]"}, - "delivery_policy": { - "key": "properties.deliveryPolicy", - "type": "EndpointPropertiesUpdateParametersDeliveryPolicy", - }, - "web_application_firewall_policy_link": { - "key": "properties.webApplicationFirewallPolicyLink", - "type": "EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink", - }, - "host_name": {"key": "properties.hostName", "type": "str"}, - "origins": {"key": "properties.origins", "type": "[DeepCreatedOrigin]"}, - "origin_groups": {"key": "properties.originGroups", "type": "[DeepCreatedOriginGroup]"}, - "custom_domains": {"key": "properties.customDomains", "type": "[DeepCreatedCustomDomain]"}, - "resource_state": {"key": "properties.resourceState", "type": "str"}, - "provisioning_state": {"key": "properties.provisioningState", "type": "str"}, - } - - def __init__( # pylint: disable=too-many-locals - self, - *, - location: str, - tags: Optional[dict[str, str]] = None, - origin_path: Optional[str] = None, - content_types_to_compress: Optional[list[str]] = None, - origin_host_header: Optional[str] = None, - is_compression_enabled: Optional[bool] = None, - is_http_allowed: bool = True, - is_https_allowed: bool = True, - query_string_caching_behavior: Optional[Union[str, "_models.QueryStringCachingBehavior"]] = None, - optimization_type: Optional[Union[str, "_models.OptimizationType"]] = None, - probe_path: Optional[str] = None, - geo_filters: Optional[list["_models.GeoFilter"]] = None, - default_origin_group: Optional["_models.ResourceReference"] = None, - url_signing_keys: Optional[list["_models.UrlSigningKey"]] = None, - delivery_policy: Optional["_models.EndpointPropertiesUpdateParametersDeliveryPolicy"] = None, - web_application_firewall_policy_link: Optional[ - "_models.EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink" - ] = None, - origins: Optional[list["_models.DeepCreatedOrigin"]] = None, - origin_groups: Optional[list["_models.DeepCreatedOriginGroup"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword tags: Resource tags. - :paramtype tags: dict[str, str] - :keyword location: The geo-location where the resource lives. Required. - :paramtype location: str - :keyword origin_path: A directory path on the origin that CDN can use to retrieve content from, - e.g. contoso.cloudapp.net/originpath. - :paramtype origin_path: str - :keyword content_types_to_compress: List of content types on which compression applies. The - value should be a valid MIME type. - :paramtype content_types_to_compress: list[str] - :keyword origin_host_header: The host header value sent to the origin with each request. This - property at Endpoint is only allowed when endpoint uses single origin and can be overridden by - the same property specified at origin.If you leave this blank, the request hostname determines - this value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this - host header value to match the origin hostname by default. - :paramtype origin_host_header: str - :keyword is_compression_enabled: Indicates whether content compression is enabled on CDN. - Default value is false. If compression is enabled, content will be served as compressed if user - requests for a compressed version. Content won't be compressed on CDN when requested content is - smaller than 1 byte or larger than 1 MB. - :paramtype is_compression_enabled: bool - :keyword is_http_allowed: Indicates whether HTTP traffic is allowed on the endpoint. Default - value is true. At least one protocol (HTTP or HTTPS) must be allowed. - :paramtype is_http_allowed: bool - :keyword is_https_allowed: Indicates whether HTTPS traffic is allowed on the endpoint. Default - value is true. At least one protocol (HTTP or HTTPS) must be allowed. - :paramtype is_https_allowed: bool - :keyword query_string_caching_behavior: Defines how CDN caches requests that include query - strings. You can ignore any query strings when caching, bypass caching to prevent requests that - contain query strings from being cached, or cache every request with a unique URL. Known values - are: "IgnoreQueryString", "BypassCaching", "UseQueryString", and "NotSet". - :paramtype query_string_caching_behavior: str or - ~azure.mgmt.cdn.models.QueryStringCachingBehavior - :keyword optimization_type: Specifies what scenario the customer wants this CDN endpoint to - optimize for, e.g. Download, Media services. With this information, CDN can apply scenario - driven optimization. Known values are: "GeneralWebDelivery", "GeneralMediaStreaming", - "VideoOnDemandMediaStreaming", "LargeFileDownload", and "DynamicSiteAcceleration". - :paramtype optimization_type: str or ~azure.mgmt.cdn.models.OptimizationType - :keyword probe_path: Path to a file hosted on the origin which helps accelerate delivery of the - dynamic content and calculate the most optimal routes for the CDN. This is relative to the - origin path. This property is only relevant when using a single origin. - :paramtype probe_path: str - :keyword geo_filters: List of rules defining the user's geo access within a CDN endpoint. Each - geo filter defines an access rule to a specified path or content, e.g. block APAC for path - /pictures/. - :paramtype geo_filters: list[~azure.mgmt.cdn.models.GeoFilter] - :keyword default_origin_group: A reference to the origin group. - :paramtype default_origin_group: ~azure.mgmt.cdn.models.ResourceReference - :keyword url_signing_keys: List of keys used to validate the signed URL hashes. - :paramtype url_signing_keys: list[~azure.mgmt.cdn.models.UrlSigningKey] - :keyword delivery_policy: A policy that specifies the delivery rules to be used for an - endpoint. - :paramtype delivery_policy: - ~azure.mgmt.cdn.models.EndpointPropertiesUpdateParametersDeliveryPolicy - :keyword web_application_firewall_policy_link: Defines the Web Application Firewall policy for - the endpoint (if applicable). - :paramtype web_application_firewall_policy_link: - ~azure.mgmt.cdn.models.EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink - :keyword origins: The source of the content being delivered via CDN. - :paramtype origins: list[~azure.mgmt.cdn.models.DeepCreatedOrigin] - :keyword origin_groups: The origin groups comprising of origins that are used for load - balancing the traffic based on availability. - :paramtype origin_groups: list[~azure.mgmt.cdn.models.DeepCreatedOriginGroup] - """ - super().__init__(tags=tags, location=location, **kwargs) - self.origin_path = origin_path - self.content_types_to_compress = content_types_to_compress - self.origin_host_header = origin_host_header - self.is_compression_enabled = is_compression_enabled - self.is_http_allowed = is_http_allowed - self.is_https_allowed = is_https_allowed - self.query_string_caching_behavior = query_string_caching_behavior - self.optimization_type = optimization_type - self.probe_path = probe_path - self.geo_filters = geo_filters - self.default_origin_group = default_origin_group - self.url_signing_keys = url_signing_keys - self.delivery_policy = delivery_policy - self.web_application_firewall_policy_link = web_application_firewall_policy_link - self.host_name: Optional[str] = None - self.origins = origins - self.origin_groups = origin_groups - self.custom_domains: Optional[list["_models.DeepCreatedCustomDomain"]] = None - self.resource_state: Optional[Union[str, "_models.EndpointResourceState"]] = None - self.provisioning_state: Optional[Union[str, "_models.EndpointProvisioningState"]] = None - - -class EndpointListResult(_serialization.Model): - """Result of the request to list endpoints. It contains a list of endpoint objects and a URL link - to get the next set of results. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: List of CDN endpoints within a profile. - :vartype value: list[~azure.mgmt.cdn.models.Endpoint] - :ivar next_link: URL to get the next set of endpoint objects if there is any. - :vartype next_link: str - """ - - _validation = { - "value": {"readonly": True}, - } - - _attribute_map = { - "value": {"key": "value", "type": "[Endpoint]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__(self, *, next_link: Optional[str] = None, **kwargs: Any) -> None: - """ - :keyword next_link: URL to get the next set of endpoint objects if there is any. - :paramtype next_link: str - """ - super().__init__(**kwargs) - self.value: Optional[list["_models.Endpoint"]] = None - self.next_link = next_link - - -class EndpointPropertiesUpdateParameters(_serialization.Model): - """The JSON object containing endpoint update parameters. - - :ivar origin_path: A directory path on the origin that CDN can use to retrieve content from, - e.g. contoso.cloudapp.net/originpath. - :vartype origin_path: str - :ivar content_types_to_compress: List of content types on which compression applies. The value - should be a valid MIME type. - :vartype content_types_to_compress: list[str] - :ivar origin_host_header: The host header value sent to the origin with each request. This - property at Endpoint is only allowed when endpoint uses single origin and can be overridden by - the same property specified at origin.If you leave this blank, the request hostname determines - this value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this - host header value to match the origin hostname by default. - :vartype origin_host_header: str - :ivar is_compression_enabled: Indicates whether content compression is enabled on CDN. Default - value is false. If compression is enabled, content will be served as compressed if user - requests for a compressed version. Content won't be compressed on CDN when requested content is - smaller than 1 byte or larger than 1 MB. - :vartype is_compression_enabled: bool - :ivar is_http_allowed: Indicates whether HTTP traffic is allowed on the endpoint. Default value - is true. At least one protocol (HTTP or HTTPS) must be allowed. - :vartype is_http_allowed: bool - :ivar is_https_allowed: Indicates whether HTTPS traffic is allowed on the endpoint. Default - value is true. At least one protocol (HTTP or HTTPS) must be allowed. - :vartype is_https_allowed: bool - :ivar query_string_caching_behavior: Defines how CDN caches requests that include query - strings. You can ignore any query strings when caching, bypass caching to prevent requests that - contain query strings from being cached, or cache every request with a unique URL. Known values - are: "IgnoreQueryString", "BypassCaching", "UseQueryString", and "NotSet". - :vartype query_string_caching_behavior: str or - ~azure.mgmt.cdn.models.QueryStringCachingBehavior - :ivar optimization_type: Specifies what scenario the customer wants this CDN endpoint to - optimize for, e.g. Download, Media services. With this information, CDN can apply scenario - driven optimization. Known values are: "GeneralWebDelivery", "GeneralMediaStreaming", - "VideoOnDemandMediaStreaming", "LargeFileDownload", and "DynamicSiteAcceleration". - :vartype optimization_type: str or ~azure.mgmt.cdn.models.OptimizationType - :ivar probe_path: Path to a file hosted on the origin which helps accelerate delivery of the - dynamic content and calculate the most optimal routes for the CDN. This is relative to the - origin path. This property is only relevant when using a single origin. - :vartype probe_path: str - :ivar geo_filters: List of rules defining the user's geo access within a CDN endpoint. Each geo - filter defines an access rule to a specified path or content, e.g. block APAC for path - /pictures/. - :vartype geo_filters: list[~azure.mgmt.cdn.models.GeoFilter] - :ivar default_origin_group: A reference to the origin group. - :vartype default_origin_group: ~azure.mgmt.cdn.models.ResourceReference - :ivar url_signing_keys: List of keys used to validate the signed URL hashes. - :vartype url_signing_keys: list[~azure.mgmt.cdn.models.UrlSigningKey] - :ivar delivery_policy: A policy that specifies the delivery rules to be used for an endpoint. - :vartype delivery_policy: - ~azure.mgmt.cdn.models.EndpointPropertiesUpdateParametersDeliveryPolicy - :ivar web_application_firewall_policy_link: Defines the Web Application Firewall policy for the - endpoint (if applicable). - :vartype web_application_firewall_policy_link: - ~azure.mgmt.cdn.models.EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink - """ - - _attribute_map = { - "origin_path": {"key": "originPath", "type": "str"}, - "content_types_to_compress": {"key": "contentTypesToCompress", "type": "[str]"}, - "origin_host_header": {"key": "originHostHeader", "type": "str"}, - "is_compression_enabled": {"key": "isCompressionEnabled", "type": "bool"}, - "is_http_allowed": {"key": "isHttpAllowed", "type": "bool"}, - "is_https_allowed": {"key": "isHttpsAllowed", "type": "bool"}, - "query_string_caching_behavior": {"key": "queryStringCachingBehavior", "type": "str"}, - "optimization_type": {"key": "optimizationType", "type": "str"}, - "probe_path": {"key": "probePath", "type": "str"}, - "geo_filters": {"key": "geoFilters", "type": "[GeoFilter]"}, - "default_origin_group": {"key": "defaultOriginGroup", "type": "ResourceReference"}, - "url_signing_keys": {"key": "urlSigningKeys", "type": "[UrlSigningKey]"}, - "delivery_policy": {"key": "deliveryPolicy", "type": "EndpointPropertiesUpdateParametersDeliveryPolicy"}, - "web_application_firewall_policy_link": { - "key": "webApplicationFirewallPolicyLink", - "type": "EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink", - }, - } - - def __init__( - self, - *, - origin_path: Optional[str] = None, - content_types_to_compress: Optional[list[str]] = None, - origin_host_header: Optional[str] = None, - is_compression_enabled: Optional[bool] = None, - is_http_allowed: bool = True, - is_https_allowed: bool = True, - query_string_caching_behavior: Optional[Union[str, "_models.QueryStringCachingBehavior"]] = None, - optimization_type: Optional[Union[str, "_models.OptimizationType"]] = None, - probe_path: Optional[str] = None, - geo_filters: Optional[list["_models.GeoFilter"]] = None, - default_origin_group: Optional["_models.ResourceReference"] = None, - url_signing_keys: Optional[list["_models.UrlSigningKey"]] = None, - delivery_policy: Optional["_models.EndpointPropertiesUpdateParametersDeliveryPolicy"] = None, - web_application_firewall_policy_link: Optional[ - "_models.EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink" - ] = None, - **kwargs: Any - ) -> None: - """ - :keyword origin_path: A directory path on the origin that CDN can use to retrieve content from, - e.g. contoso.cloudapp.net/originpath. - :paramtype origin_path: str - :keyword content_types_to_compress: List of content types on which compression applies. The - value should be a valid MIME type. - :paramtype content_types_to_compress: list[str] - :keyword origin_host_header: The host header value sent to the origin with each request. This - property at Endpoint is only allowed when endpoint uses single origin and can be overridden by - the same property specified at origin.If you leave this blank, the request hostname determines - this value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this - host header value to match the origin hostname by default. - :paramtype origin_host_header: str - :keyword is_compression_enabled: Indicates whether content compression is enabled on CDN. - Default value is false. If compression is enabled, content will be served as compressed if user - requests for a compressed version. Content won't be compressed on CDN when requested content is - smaller than 1 byte or larger than 1 MB. - :paramtype is_compression_enabled: bool - :keyword is_http_allowed: Indicates whether HTTP traffic is allowed on the endpoint. Default - value is true. At least one protocol (HTTP or HTTPS) must be allowed. - :paramtype is_http_allowed: bool - :keyword is_https_allowed: Indicates whether HTTPS traffic is allowed on the endpoint. Default - value is true. At least one protocol (HTTP or HTTPS) must be allowed. - :paramtype is_https_allowed: bool - :keyword query_string_caching_behavior: Defines how CDN caches requests that include query - strings. You can ignore any query strings when caching, bypass caching to prevent requests that - contain query strings from being cached, or cache every request with a unique URL. Known values - are: "IgnoreQueryString", "BypassCaching", "UseQueryString", and "NotSet". - :paramtype query_string_caching_behavior: str or - ~azure.mgmt.cdn.models.QueryStringCachingBehavior - :keyword optimization_type: Specifies what scenario the customer wants this CDN endpoint to - optimize for, e.g. Download, Media services. With this information, CDN can apply scenario - driven optimization. Known values are: "GeneralWebDelivery", "GeneralMediaStreaming", - "VideoOnDemandMediaStreaming", "LargeFileDownload", and "DynamicSiteAcceleration". - :paramtype optimization_type: str or ~azure.mgmt.cdn.models.OptimizationType - :keyword probe_path: Path to a file hosted on the origin which helps accelerate delivery of the - dynamic content and calculate the most optimal routes for the CDN. This is relative to the - origin path. This property is only relevant when using a single origin. - :paramtype probe_path: str - :keyword geo_filters: List of rules defining the user's geo access within a CDN endpoint. Each - geo filter defines an access rule to a specified path or content, e.g. block APAC for path - /pictures/. - :paramtype geo_filters: list[~azure.mgmt.cdn.models.GeoFilter] - :keyword default_origin_group: A reference to the origin group. - :paramtype default_origin_group: ~azure.mgmt.cdn.models.ResourceReference - :keyword url_signing_keys: List of keys used to validate the signed URL hashes. - :paramtype url_signing_keys: list[~azure.mgmt.cdn.models.UrlSigningKey] - :keyword delivery_policy: A policy that specifies the delivery rules to be used for an - endpoint. - :paramtype delivery_policy: - ~azure.mgmt.cdn.models.EndpointPropertiesUpdateParametersDeliveryPolicy - :keyword web_application_firewall_policy_link: Defines the Web Application Firewall policy for - the endpoint (if applicable). - :paramtype web_application_firewall_policy_link: - ~azure.mgmt.cdn.models.EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink - """ - super().__init__(**kwargs) - self.origin_path = origin_path - self.content_types_to_compress = content_types_to_compress - self.origin_host_header = origin_host_header - self.is_compression_enabled = is_compression_enabled - self.is_http_allowed = is_http_allowed - self.is_https_allowed = is_https_allowed - self.query_string_caching_behavior = query_string_caching_behavior - self.optimization_type = optimization_type - self.probe_path = probe_path - self.geo_filters = geo_filters - self.default_origin_group = default_origin_group - self.url_signing_keys = url_signing_keys - self.delivery_policy = delivery_policy - self.web_application_firewall_policy_link = web_application_firewall_policy_link - - -class EndpointProperties(EndpointPropertiesUpdateParameters): - """The JSON object that contains the properties required to create an endpoint. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to server. - - :ivar origin_path: A directory path on the origin that CDN can use to retrieve content from, - e.g. contoso.cloudapp.net/originpath. - :vartype origin_path: str - :ivar content_types_to_compress: List of content types on which compression applies. The value - should be a valid MIME type. - :vartype content_types_to_compress: list[str] - :ivar origin_host_header: The host header value sent to the origin with each request. This - property at Endpoint is only allowed when endpoint uses single origin and can be overridden by - the same property specified at origin.If you leave this blank, the request hostname determines - this value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this - host header value to match the origin hostname by default. - :vartype origin_host_header: str - :ivar is_compression_enabled: Indicates whether content compression is enabled on CDN. Default - value is false. If compression is enabled, content will be served as compressed if user - requests for a compressed version. Content won't be compressed on CDN when requested content is - smaller than 1 byte or larger than 1 MB. - :vartype is_compression_enabled: bool - :ivar is_http_allowed: Indicates whether HTTP traffic is allowed on the endpoint. Default value - is true. At least one protocol (HTTP or HTTPS) must be allowed. - :vartype is_http_allowed: bool - :ivar is_https_allowed: Indicates whether HTTPS traffic is allowed on the endpoint. Default - value is true. At least one protocol (HTTP or HTTPS) must be allowed. - :vartype is_https_allowed: bool - :ivar query_string_caching_behavior: Defines how CDN caches requests that include query - strings. You can ignore any query strings when caching, bypass caching to prevent requests that - contain query strings from being cached, or cache every request with a unique URL. Known values - are: "IgnoreQueryString", "BypassCaching", "UseQueryString", and "NotSet". - :vartype query_string_caching_behavior: str or - ~azure.mgmt.cdn.models.QueryStringCachingBehavior - :ivar optimization_type: Specifies what scenario the customer wants this CDN endpoint to - optimize for, e.g. Download, Media services. With this information, CDN can apply scenario - driven optimization. Known values are: "GeneralWebDelivery", "GeneralMediaStreaming", - "VideoOnDemandMediaStreaming", "LargeFileDownload", and "DynamicSiteAcceleration". - :vartype optimization_type: str or ~azure.mgmt.cdn.models.OptimizationType - :ivar probe_path: Path to a file hosted on the origin which helps accelerate delivery of the - dynamic content and calculate the most optimal routes for the CDN. This is relative to the - origin path. This property is only relevant when using a single origin. - :vartype probe_path: str - :ivar geo_filters: List of rules defining the user's geo access within a CDN endpoint. Each geo - filter defines an access rule to a specified path or content, e.g. block APAC for path - /pictures/. - :vartype geo_filters: list[~azure.mgmt.cdn.models.GeoFilter] - :ivar default_origin_group: A reference to the origin group. - :vartype default_origin_group: ~azure.mgmt.cdn.models.ResourceReference - :ivar url_signing_keys: List of keys used to validate the signed URL hashes. - :vartype url_signing_keys: list[~azure.mgmt.cdn.models.UrlSigningKey] - :ivar delivery_policy: A policy that specifies the delivery rules to be used for an endpoint. - :vartype delivery_policy: - ~azure.mgmt.cdn.models.EndpointPropertiesUpdateParametersDeliveryPolicy - :ivar web_application_firewall_policy_link: Defines the Web Application Firewall policy for the - endpoint (if applicable). - :vartype web_application_firewall_policy_link: - ~azure.mgmt.cdn.models.EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink - :ivar host_name: The host name of the endpoint structured as {endpointName}.{DNSZone}, e.g. - contoso.azureedge.net. - :vartype host_name: str - :ivar origins: The source of the content being delivered via CDN. Required. - :vartype origins: list[~azure.mgmt.cdn.models.DeepCreatedOrigin] - :ivar origin_groups: The origin groups comprising of origins that are used for load balancing - the traffic based on availability. - :vartype origin_groups: list[~azure.mgmt.cdn.models.DeepCreatedOriginGroup] - :ivar custom_domains: The custom domains under the endpoint. - :vartype custom_domains: list[~azure.mgmt.cdn.models.DeepCreatedCustomDomain] - :ivar resource_state: Resource status of the endpoint. Known values are: "Creating", - "Deleting", "Running", "Starting", "Stopped", and "Stopping". - :vartype resource_state: str or ~azure.mgmt.cdn.models.EndpointResourceState - :ivar provisioning_state: Provisioning status of the endpoint. Known values are: "Succeeded", - "Failed", "Updating", "Deleting", and "Creating". - :vartype provisioning_state: str or ~azure.mgmt.cdn.models.EndpointProvisioningState - """ - - _validation = { - "host_name": {"readonly": True}, - "origins": {"required": True}, - "custom_domains": {"readonly": True}, - "resource_state": {"readonly": True}, - "provisioning_state": {"readonly": True}, - } - - _attribute_map = { - "origin_path": {"key": "originPath", "type": "str"}, - "content_types_to_compress": {"key": "contentTypesToCompress", "type": "[str]"}, - "origin_host_header": {"key": "originHostHeader", "type": "str"}, - "is_compression_enabled": {"key": "isCompressionEnabled", "type": "bool"}, - "is_http_allowed": {"key": "isHttpAllowed", "type": "bool"}, - "is_https_allowed": {"key": "isHttpsAllowed", "type": "bool"}, - "query_string_caching_behavior": {"key": "queryStringCachingBehavior", "type": "str"}, - "optimization_type": {"key": "optimizationType", "type": "str"}, - "probe_path": {"key": "probePath", "type": "str"}, - "geo_filters": {"key": "geoFilters", "type": "[GeoFilter]"}, - "default_origin_group": {"key": "defaultOriginGroup", "type": "ResourceReference"}, - "url_signing_keys": {"key": "urlSigningKeys", "type": "[UrlSigningKey]"}, - "delivery_policy": {"key": "deliveryPolicy", "type": "EndpointPropertiesUpdateParametersDeliveryPolicy"}, - "web_application_firewall_policy_link": { - "key": "webApplicationFirewallPolicyLink", - "type": "EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink", - }, - "host_name": {"key": "hostName", "type": "str"}, - "origins": {"key": "origins", "type": "[DeepCreatedOrigin]"}, - "origin_groups": {"key": "originGroups", "type": "[DeepCreatedOriginGroup]"}, - "custom_domains": {"key": "customDomains", "type": "[DeepCreatedCustomDomain]"}, - "resource_state": {"key": "resourceState", "type": "str"}, - "provisioning_state": {"key": "provisioningState", "type": "str"}, - } - - def __init__( - self, - *, - origins: list["_models.DeepCreatedOrigin"], - origin_path: Optional[str] = None, - content_types_to_compress: Optional[list[str]] = None, - origin_host_header: Optional[str] = None, - is_compression_enabled: Optional[bool] = None, - is_http_allowed: bool = True, - is_https_allowed: bool = True, - query_string_caching_behavior: Optional[Union[str, "_models.QueryStringCachingBehavior"]] = None, - optimization_type: Optional[Union[str, "_models.OptimizationType"]] = None, - probe_path: Optional[str] = None, - geo_filters: Optional[list["_models.GeoFilter"]] = None, - default_origin_group: Optional["_models.ResourceReference"] = None, - url_signing_keys: Optional[list["_models.UrlSigningKey"]] = None, - delivery_policy: Optional["_models.EndpointPropertiesUpdateParametersDeliveryPolicy"] = None, - web_application_firewall_policy_link: Optional[ - "_models.EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink" - ] = None, - origin_groups: Optional[list["_models.DeepCreatedOriginGroup"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword origin_path: A directory path on the origin that CDN can use to retrieve content from, - e.g. contoso.cloudapp.net/originpath. - :paramtype origin_path: str - :keyword content_types_to_compress: List of content types on which compression applies. The - value should be a valid MIME type. - :paramtype content_types_to_compress: list[str] - :keyword origin_host_header: The host header value sent to the origin with each request. This - property at Endpoint is only allowed when endpoint uses single origin and can be overridden by - the same property specified at origin.If you leave this blank, the request hostname determines - this value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this - host header value to match the origin hostname by default. - :paramtype origin_host_header: str - :keyword is_compression_enabled: Indicates whether content compression is enabled on CDN. - Default value is false. If compression is enabled, content will be served as compressed if user - requests for a compressed version. Content won't be compressed on CDN when requested content is - smaller than 1 byte or larger than 1 MB. - :paramtype is_compression_enabled: bool - :keyword is_http_allowed: Indicates whether HTTP traffic is allowed on the endpoint. Default - value is true. At least one protocol (HTTP or HTTPS) must be allowed. - :paramtype is_http_allowed: bool - :keyword is_https_allowed: Indicates whether HTTPS traffic is allowed on the endpoint. Default - value is true. At least one protocol (HTTP or HTTPS) must be allowed. - :paramtype is_https_allowed: bool - :keyword query_string_caching_behavior: Defines how CDN caches requests that include query - strings. You can ignore any query strings when caching, bypass caching to prevent requests that - contain query strings from being cached, or cache every request with a unique URL. Known values - are: "IgnoreQueryString", "BypassCaching", "UseQueryString", and "NotSet". - :paramtype query_string_caching_behavior: str or - ~azure.mgmt.cdn.models.QueryStringCachingBehavior - :keyword optimization_type: Specifies what scenario the customer wants this CDN endpoint to - optimize for, e.g. Download, Media services. With this information, CDN can apply scenario - driven optimization. Known values are: "GeneralWebDelivery", "GeneralMediaStreaming", - "VideoOnDemandMediaStreaming", "LargeFileDownload", and "DynamicSiteAcceleration". - :paramtype optimization_type: str or ~azure.mgmt.cdn.models.OptimizationType - :keyword probe_path: Path to a file hosted on the origin which helps accelerate delivery of the - dynamic content and calculate the most optimal routes for the CDN. This is relative to the - origin path. This property is only relevant when using a single origin. - :paramtype probe_path: str - :keyword geo_filters: List of rules defining the user's geo access within a CDN endpoint. Each - geo filter defines an access rule to a specified path or content, e.g. block APAC for path - /pictures/. - :paramtype geo_filters: list[~azure.mgmt.cdn.models.GeoFilter] - :keyword default_origin_group: A reference to the origin group. - :paramtype default_origin_group: ~azure.mgmt.cdn.models.ResourceReference - :keyword url_signing_keys: List of keys used to validate the signed URL hashes. - :paramtype url_signing_keys: list[~azure.mgmt.cdn.models.UrlSigningKey] - :keyword delivery_policy: A policy that specifies the delivery rules to be used for an - endpoint. - :paramtype delivery_policy: - ~azure.mgmt.cdn.models.EndpointPropertiesUpdateParametersDeliveryPolicy - :keyword web_application_firewall_policy_link: Defines the Web Application Firewall policy for - the endpoint (if applicable). - :paramtype web_application_firewall_policy_link: - ~azure.mgmt.cdn.models.EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink - :keyword origins: The source of the content being delivered via CDN. Required. - :paramtype origins: list[~azure.mgmt.cdn.models.DeepCreatedOrigin] - :keyword origin_groups: The origin groups comprising of origins that are used for load - balancing the traffic based on availability. - :paramtype origin_groups: list[~azure.mgmt.cdn.models.DeepCreatedOriginGroup] - """ - super().__init__( - origin_path=origin_path, - content_types_to_compress=content_types_to_compress, - origin_host_header=origin_host_header, - is_compression_enabled=is_compression_enabled, - is_http_allowed=is_http_allowed, - is_https_allowed=is_https_allowed, - query_string_caching_behavior=query_string_caching_behavior, - optimization_type=optimization_type, - probe_path=probe_path, - geo_filters=geo_filters, - default_origin_group=default_origin_group, - url_signing_keys=url_signing_keys, - delivery_policy=delivery_policy, - web_application_firewall_policy_link=web_application_firewall_policy_link, - **kwargs - ) - self.host_name: Optional[str] = None - self.origins = origins - self.origin_groups = origin_groups - self.custom_domains: Optional[list["_models.DeepCreatedCustomDomain"]] = None - self.resource_state: Optional[Union[str, "_models.EndpointResourceState"]] = None - self.provisioning_state: Optional[Union[str, "_models.EndpointProvisioningState"]] = None - - -class EndpointPropertiesUpdateParametersDeliveryPolicy(_serialization.Model): # pylint: disable=name-too-long - """A policy that specifies the delivery rules to be used for an endpoint. - - All required parameters must be populated in order to send to server. - - :ivar description: User-friendly description of the policy. - :vartype description: str - :ivar rules: A list of the delivery rules. Required. - :vartype rules: list[~azure.mgmt.cdn.models.DeliveryRule] - """ - - _validation = { - "rules": {"required": True}, - } - - _attribute_map = { - "description": {"key": "description", "type": "str"}, - "rules": {"key": "rules", "type": "[DeliveryRule]"}, - } - - def __init__( - self, *, rules: list["_models.DeliveryRule"], description: Optional[str] = None, **kwargs: Any - ) -> None: - """ - :keyword description: User-friendly description of the policy. - :paramtype description: str - :keyword rules: A list of the delivery rules. Required. - :paramtype rules: list[~azure.mgmt.cdn.models.DeliveryRule] - """ - super().__init__(**kwargs) - self.description = description - self.rules = rules - - -class EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink( - _serialization.Model -): # pylint: disable=name-too-long - """Defines the Web Application Firewall policy for the endpoint (if applicable). - - :ivar id: Resource ID. - :vartype id: str - """ - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - } - - def __init__(self, *, id: Optional[str] = None, **kwargs: Any) -> None: # pylint: disable=redefined-builtin - """ - :keyword id: Resource ID. - :paramtype id: str - """ - super().__init__(**kwargs) - self.id = id - - -class EndpointUpdateParameters(_serialization.Model): - """Properties required to create or update an endpoint. - - :ivar tags: Endpoint tags. - :vartype tags: dict[str, str] - :ivar origin_path: A directory path on the origin that CDN can use to retrieve content from, - e.g. contoso.cloudapp.net/originpath. - :vartype origin_path: str - :ivar content_types_to_compress: List of content types on which compression applies. The value - should be a valid MIME type. - :vartype content_types_to_compress: list[str] - :ivar origin_host_header: The host header value sent to the origin with each request. This - property at Endpoint is only allowed when endpoint uses single origin and can be overridden by - the same property specified at origin.If you leave this blank, the request hostname determines - this value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this - host header value to match the origin hostname by default. - :vartype origin_host_header: str - :ivar is_compression_enabled: Indicates whether content compression is enabled on CDN. Default - value is false. If compression is enabled, content will be served as compressed if user - requests for a compressed version. Content won't be compressed on CDN when requested content is - smaller than 1 byte or larger than 1 MB. - :vartype is_compression_enabled: bool - :ivar is_http_allowed: Indicates whether HTTP traffic is allowed on the endpoint. Default value - is true. At least one protocol (HTTP or HTTPS) must be allowed. - :vartype is_http_allowed: bool - :ivar is_https_allowed: Indicates whether HTTPS traffic is allowed on the endpoint. Default - value is true. At least one protocol (HTTP or HTTPS) must be allowed. - :vartype is_https_allowed: bool - :ivar query_string_caching_behavior: Defines how CDN caches requests that include query - strings. You can ignore any query strings when caching, bypass caching to prevent requests that - contain query strings from being cached, or cache every request with a unique URL. Known values - are: "IgnoreQueryString", "BypassCaching", "UseQueryString", and "NotSet". - :vartype query_string_caching_behavior: str or - ~azure.mgmt.cdn.models.QueryStringCachingBehavior - :ivar optimization_type: Specifies what scenario the customer wants this CDN endpoint to - optimize for, e.g. Download, Media services. With this information, CDN can apply scenario - driven optimization. Known values are: "GeneralWebDelivery", "GeneralMediaStreaming", - "VideoOnDemandMediaStreaming", "LargeFileDownload", and "DynamicSiteAcceleration". - :vartype optimization_type: str or ~azure.mgmt.cdn.models.OptimizationType - :ivar probe_path: Path to a file hosted on the origin which helps accelerate delivery of the - dynamic content and calculate the most optimal routes for the CDN. This is relative to the - origin path. This property is only relevant when using a single origin. - :vartype probe_path: str - :ivar geo_filters: List of rules defining the user's geo access within a CDN endpoint. Each geo - filter defines an access rule to a specified path or content, e.g. block APAC for path - /pictures/. - :vartype geo_filters: list[~azure.mgmt.cdn.models.GeoFilter] - :ivar default_origin_group: A reference to the origin group. - :vartype default_origin_group: ~azure.mgmt.cdn.models.ResourceReference - :ivar url_signing_keys: List of keys used to validate the signed URL hashes. - :vartype url_signing_keys: list[~azure.mgmt.cdn.models.UrlSigningKey] - :ivar delivery_policy: A policy that specifies the delivery rules to be used for an endpoint. - :vartype delivery_policy: - ~azure.mgmt.cdn.models.EndpointPropertiesUpdateParametersDeliveryPolicy - :ivar web_application_firewall_policy_link: Defines the Web Application Firewall policy for the - endpoint (if applicable). - :vartype web_application_firewall_policy_link: - ~azure.mgmt.cdn.models.EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink - """ - - _attribute_map = { - "tags": {"key": "tags", "type": "{str}"}, - "origin_path": {"key": "properties.originPath", "type": "str"}, - "content_types_to_compress": {"key": "properties.contentTypesToCompress", "type": "[str]"}, - "origin_host_header": {"key": "properties.originHostHeader", "type": "str"}, - "is_compression_enabled": {"key": "properties.isCompressionEnabled", "type": "bool"}, - "is_http_allowed": {"key": "properties.isHttpAllowed", "type": "bool"}, - "is_https_allowed": {"key": "properties.isHttpsAllowed", "type": "bool"}, - "query_string_caching_behavior": {"key": "properties.queryStringCachingBehavior", "type": "str"}, - "optimization_type": {"key": "properties.optimizationType", "type": "str"}, - "probe_path": {"key": "properties.probePath", "type": "str"}, - "geo_filters": {"key": "properties.geoFilters", "type": "[GeoFilter]"}, - "default_origin_group": {"key": "properties.defaultOriginGroup", "type": "ResourceReference"}, - "url_signing_keys": {"key": "properties.urlSigningKeys", "type": "[UrlSigningKey]"}, - "delivery_policy": { - "key": "properties.deliveryPolicy", - "type": "EndpointPropertiesUpdateParametersDeliveryPolicy", - }, - "web_application_firewall_policy_link": { - "key": "properties.webApplicationFirewallPolicyLink", - "type": "EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink", - }, - } - - def __init__( - self, - *, - tags: Optional[dict[str, str]] = None, - origin_path: Optional[str] = None, - content_types_to_compress: Optional[list[str]] = None, - origin_host_header: Optional[str] = None, - is_compression_enabled: Optional[bool] = None, - is_http_allowed: bool = True, - is_https_allowed: bool = True, - query_string_caching_behavior: Optional[Union[str, "_models.QueryStringCachingBehavior"]] = None, - optimization_type: Optional[Union[str, "_models.OptimizationType"]] = None, - probe_path: Optional[str] = None, - geo_filters: Optional[list["_models.GeoFilter"]] = None, - default_origin_group: Optional["_models.ResourceReference"] = None, - url_signing_keys: Optional[list["_models.UrlSigningKey"]] = None, - delivery_policy: Optional["_models.EndpointPropertiesUpdateParametersDeliveryPolicy"] = None, - web_application_firewall_policy_link: Optional[ - "_models.EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink" - ] = None, - **kwargs: Any - ) -> None: - """ - :keyword tags: Endpoint tags. - :paramtype tags: dict[str, str] - :keyword origin_path: A directory path on the origin that CDN can use to retrieve content from, - e.g. contoso.cloudapp.net/originpath. - :paramtype origin_path: str - :keyword content_types_to_compress: List of content types on which compression applies. The - value should be a valid MIME type. - :paramtype content_types_to_compress: list[str] - :keyword origin_host_header: The host header value sent to the origin with each request. This - property at Endpoint is only allowed when endpoint uses single origin and can be overridden by - the same property specified at origin.If you leave this blank, the request hostname determines - this value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this - host header value to match the origin hostname by default. - :paramtype origin_host_header: str - :keyword is_compression_enabled: Indicates whether content compression is enabled on CDN. - Default value is false. If compression is enabled, content will be served as compressed if user - requests for a compressed version. Content won't be compressed on CDN when requested content is - smaller than 1 byte or larger than 1 MB. - :paramtype is_compression_enabled: bool - :keyword is_http_allowed: Indicates whether HTTP traffic is allowed on the endpoint. Default - value is true. At least one protocol (HTTP or HTTPS) must be allowed. - :paramtype is_http_allowed: bool - :keyword is_https_allowed: Indicates whether HTTPS traffic is allowed on the endpoint. Default - value is true. At least one protocol (HTTP or HTTPS) must be allowed. - :paramtype is_https_allowed: bool - :keyword query_string_caching_behavior: Defines how CDN caches requests that include query - strings. You can ignore any query strings when caching, bypass caching to prevent requests that - contain query strings from being cached, or cache every request with a unique URL. Known values - are: "IgnoreQueryString", "BypassCaching", "UseQueryString", and "NotSet". - :paramtype query_string_caching_behavior: str or - ~azure.mgmt.cdn.models.QueryStringCachingBehavior - :keyword optimization_type: Specifies what scenario the customer wants this CDN endpoint to - optimize for, e.g. Download, Media services. With this information, CDN can apply scenario - driven optimization. Known values are: "GeneralWebDelivery", "GeneralMediaStreaming", - "VideoOnDemandMediaStreaming", "LargeFileDownload", and "DynamicSiteAcceleration". - :paramtype optimization_type: str or ~azure.mgmt.cdn.models.OptimizationType - :keyword probe_path: Path to a file hosted on the origin which helps accelerate delivery of the - dynamic content and calculate the most optimal routes for the CDN. This is relative to the - origin path. This property is only relevant when using a single origin. - :paramtype probe_path: str - :keyword geo_filters: List of rules defining the user's geo access within a CDN endpoint. Each - geo filter defines an access rule to a specified path or content, e.g. block APAC for path - /pictures/. - :paramtype geo_filters: list[~azure.mgmt.cdn.models.GeoFilter] - :keyword default_origin_group: A reference to the origin group. - :paramtype default_origin_group: ~azure.mgmt.cdn.models.ResourceReference - :keyword url_signing_keys: List of keys used to validate the signed URL hashes. - :paramtype url_signing_keys: list[~azure.mgmt.cdn.models.UrlSigningKey] - :keyword delivery_policy: A policy that specifies the delivery rules to be used for an - endpoint. - :paramtype delivery_policy: - ~azure.mgmt.cdn.models.EndpointPropertiesUpdateParametersDeliveryPolicy - :keyword web_application_firewall_policy_link: Defines the Web Application Firewall policy for - the endpoint (if applicable). - :paramtype web_application_firewall_policy_link: - ~azure.mgmt.cdn.models.EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink - """ - super().__init__(**kwargs) - self.tags = tags - self.origin_path = origin_path - self.content_types_to_compress = content_types_to_compress - self.origin_host_header = origin_host_header - self.is_compression_enabled = is_compression_enabled - self.is_http_allowed = is_http_allowed - self.is_https_allowed = is_https_allowed - self.query_string_caching_behavior = query_string_caching_behavior - self.optimization_type = optimization_type - self.probe_path = probe_path - self.geo_filters = geo_filters - self.default_origin_group = default_origin_group - self.url_signing_keys = url_signing_keys - self.delivery_policy = delivery_policy - self.web_application_firewall_policy_link = web_application_firewall_policy_link - - -class ErrorAdditionalInfo(_serialization.Model): - """The resource management error additional info. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar type: The additional info type. - :vartype type: str - :ivar info: The additional info. - :vartype info: JSON - """ - - _validation = { - "type": {"readonly": True}, - "info": {"readonly": True}, - } - - _attribute_map = { - "type": {"key": "type", "type": "str"}, - "info": {"key": "info", "type": "object"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.type: Optional[str] = None - self.info: Optional[JSON] = None - - -class ErrorDetail(_serialization.Model): - """The error detail. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar code: The error code. - :vartype code: str - :ivar message: The error message. - :vartype message: str - :ivar target: The error target. - :vartype target: str - :ivar details: The error details. - :vartype details: list[~azure.mgmt.cdn.models.ErrorDetail] - :ivar additional_info: The error additional info. - :vartype additional_info: list[~azure.mgmt.cdn.models.ErrorAdditionalInfo] - """ - - _validation = { - "code": {"readonly": True}, - "message": {"readonly": True}, - "target": {"readonly": True}, - "details": {"readonly": True}, - "additional_info": {"readonly": True}, - } - - _attribute_map = { - "code": {"key": "code", "type": "str"}, - "message": {"key": "message", "type": "str"}, - "target": {"key": "target", "type": "str"}, - "details": {"key": "details", "type": "[ErrorDetail]"}, - "additional_info": {"key": "additionalInfo", "type": "[ErrorAdditionalInfo]"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.code: Optional[str] = None - self.message: Optional[str] = None - self.target: Optional[str] = None - self.details: Optional[list["_models.ErrorDetail"]] = None - self.additional_info: Optional[list["_models.ErrorAdditionalInfo"]] = None - - -class ErrorResponse(_serialization.Model): - """Common error response for all Azure Resource Manager APIs to return error details for failed - operations. (This also follows the OData error response format.). - - :ivar error: The error object. - :vartype error: ~azure.mgmt.cdn.models.ErrorDetail - """ - - _attribute_map = { - "error": {"key": "error", "type": "ErrorDetail"}, - } - - def __init__(self, *, error: Optional["_models.ErrorDetail"] = None, **kwargs: Any) -> None: - """ - :keyword error: The error object. - :paramtype error: ~azure.mgmt.cdn.models.ErrorDetail - """ - super().__init__(**kwargs) - self.error = error - - -class GeoFilter(_serialization.Model): - """Rules defining user's geo access within a CDN endpoint. - - All required parameters must be populated in order to send to server. - - :ivar relative_path: Relative path applicable to geo filter. (e.g. '/mypictures', - '/mypicture/kitty.jpg', and etc.). Required. - :vartype relative_path: str - :ivar action: Action of the geo filter, i.e. allow or block access. Required. Known values are: - "Block" and "Allow". - :vartype action: str or ~azure.mgmt.cdn.models.GeoFilterActions - :ivar country_codes: Two letter country or region codes defining user country or region access - in a geo filter, e.g. AU, MX, US. Required. - :vartype country_codes: list[str] - """ - - _validation = { - "relative_path": {"required": True}, - "action": {"required": True}, - "country_codes": {"required": True}, - } - - _attribute_map = { - "relative_path": {"key": "relativePath", "type": "str"}, - "action": {"key": "action", "type": "str"}, - "country_codes": {"key": "countryCodes", "type": "[str]"}, - } - - def __init__( - self, - *, - relative_path: str, - action: Union[str, "_models.GeoFilterActions"], - country_codes: list[str], - **kwargs: Any - ) -> None: - """ - :keyword relative_path: Relative path applicable to geo filter. (e.g. '/mypictures', - '/mypicture/kitty.jpg', and etc.). Required. - :paramtype relative_path: str - :keyword action: Action of the geo filter, i.e. allow or block access. Required. Known values - are: "Block" and "Allow". - :paramtype action: str or ~azure.mgmt.cdn.models.GeoFilterActions - :keyword country_codes: Two letter country or region codes defining user country or region - access in a geo filter, e.g. AU, MX, US. Required. - :paramtype country_codes: list[str] - """ - super().__init__(**kwargs) - self.relative_path = relative_path - self.action = action - self.country_codes = country_codes - - -class HeaderActionParameters(DeliveryRuleActionParameters): - """Defines the parameters for the request header action. - - All required parameters must be populated in order to send to server. - - :ivar type_name: Required. Known values are: "DeliveryRuleUrlRedirectActionParameters", - "DeliveryRuleUrlSigningActionParameters", "DeliveryRuleOriginGroupOverrideActionParameters", - "DeliveryRuleUrlRewriteActionParameters", "DeliveryRuleHeaderActionParameters", - "DeliveryRuleCacheExpirationActionParameters", - "DeliveryRuleCacheKeyQueryStringBehaviorActionParameters", and - "DeliveryRuleRouteConfigurationOverrideActionParameters". - :vartype type_name: str or ~azure.mgmt.cdn.models.DeliveryRuleActionParametersType - :ivar header_action: Action to perform. Required. Known values are: "Append", "Overwrite", and - "Delete". - :vartype header_action: str or ~azure.mgmt.cdn.models.HeaderAction - :ivar header_name: Name of the header to modify. Required. - :vartype header_name: str - :ivar value: Value for the specified action. - :vartype value: str - """ - - _validation = { - "type_name": {"required": True}, - "header_action": {"required": True}, - "header_name": {"required": True}, - } - - _attribute_map = { - "type_name": {"key": "typeName", "type": "str"}, - "header_action": {"key": "headerAction", "type": "str"}, - "header_name": {"key": "headerName", "type": "str"}, - "value": {"key": "value", "type": "str"}, - } - - def __init__( - self, - *, - header_action: Union[str, "_models.HeaderAction"], - header_name: str, - value: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword header_action: Action to perform. Required. Known values are: "Append", "Overwrite", - and "Delete". - :paramtype header_action: str or ~azure.mgmt.cdn.models.HeaderAction - :keyword header_name: Name of the header to modify. Required. - :paramtype header_name: str - :keyword value: Value for the specified action. - :paramtype value: str - """ - super().__init__(**kwargs) - self.type_name: str = "DeliveryRuleHeaderActionParameters" - self.header_action = header_action - self.header_name = header_name - self.value = value - - -class HealthProbeParameters(_serialization.Model): - """The JSON object that contains the properties to send health probes to origin. - - :ivar probe_path: The path relative to the origin that is used to determine the health of the - origin. - :vartype probe_path: str - :ivar probe_request_type: The type of health probe request that is made. Known values are: - "NotSet", "GET", and "HEAD". - :vartype probe_request_type: str or ~azure.mgmt.cdn.models.HealthProbeRequestType - :ivar probe_protocol: Protocol to use for health probe. Known values are: "NotSet", "Http", and - "Https". - :vartype probe_protocol: str or ~azure.mgmt.cdn.models.ProbeProtocol - :ivar probe_interval_in_seconds: The number of seconds between health probes.Default is 240sec. - :vartype probe_interval_in_seconds: int - """ - - _validation = { - "probe_interval_in_seconds": {"maximum": 255, "minimum": 1}, - } - - _attribute_map = { - "probe_path": {"key": "probePath", "type": "str"}, - "probe_request_type": {"key": "probeRequestType", "type": "str"}, - "probe_protocol": {"key": "probeProtocol", "type": "str"}, - "probe_interval_in_seconds": {"key": "probeIntervalInSeconds", "type": "int"}, - } - - def __init__( - self, - *, - probe_path: Optional[str] = None, - probe_request_type: Optional[Union[str, "_models.HealthProbeRequestType"]] = None, - probe_protocol: Optional[Union[str, "_models.ProbeProtocol"]] = None, - probe_interval_in_seconds: Optional[int] = None, - **kwargs: Any - ) -> None: - """ - :keyword probe_path: The path relative to the origin that is used to determine the health of - the origin. - :paramtype probe_path: str - :keyword probe_request_type: The type of health probe request that is made. Known values are: - "NotSet", "GET", and "HEAD". - :paramtype probe_request_type: str or ~azure.mgmt.cdn.models.HealthProbeRequestType - :keyword probe_protocol: Protocol to use for health probe. Known values are: "NotSet", "Http", - and "Https". - :paramtype probe_protocol: str or ~azure.mgmt.cdn.models.ProbeProtocol - :keyword probe_interval_in_seconds: The number of seconds between health probes.Default is - 240sec. - :paramtype probe_interval_in_seconds: int - """ - super().__init__(**kwargs) - self.probe_path = probe_path - self.probe_request_type = probe_request_type - self.probe_protocol = probe_protocol - self.probe_interval_in_seconds = probe_interval_in_seconds - - -class HostNameMatchConditionParameters(DeliveryRuleConditionParameters): - """Defines the parameters for HostName match conditions. - - All required parameters must be populated in order to send to server. - - :ivar type_name: Required. Known values are: "DeliveryRuleRemoteAddressConditionParameters", - "DeliveryRuleRequestMethodConditionParameters", "DeliveryRuleQueryStringConditionParameters", - "DeliveryRulePostArgsConditionParameters", "DeliveryRuleRequestUriConditionParameters", - "DeliveryRuleRequestHeaderConditionParameters", "DeliveryRuleRequestBodyConditionParameters", - "DeliveryRuleRequestSchemeConditionParameters", "DeliveryRuleUrlPathMatchConditionParameters", - "DeliveryRuleUrlFileExtensionMatchConditionParameters", - "DeliveryRuleUrlFilenameConditionParameters", "DeliveryRuleHttpVersionConditionParameters", - "DeliveryRuleCookiesConditionParameters", "DeliveryRuleIsDeviceConditionParameters", - "DeliveryRuleSocketAddrConditionParameters", "DeliveryRuleClientPortConditionParameters", - "DeliveryRuleServerPortConditionParameters", "DeliveryRuleHostNameConditionParameters", and - "DeliveryRuleSslProtocolConditionParameters". - :vartype type_name: str or ~azure.mgmt.cdn.models.DeliveryRuleConditionParametersType - :ivar operator: Describes operator to be matched. Required. Known values are: "Any", "Equal", - "Contains", "BeginsWith", "EndsWith", "LessThan", "LessThanOrEqual", "GreaterThan", - "GreaterThanOrEqual", and "RegEx". - :vartype operator: str or ~azure.mgmt.cdn.models.HostNameOperator - :ivar negate_condition: Describes if this is negate condition or not. - :vartype negate_condition: bool - :ivar match_values: The match value for the condition of the delivery rule. - :vartype match_values: list[str] - :ivar transforms: List of transforms. - :vartype transforms: list[str or ~azure.mgmt.cdn.models.Transform] - """ - - _validation = { - "type_name": {"required": True}, - "operator": {"required": True}, - } - - _attribute_map = { - "type_name": {"key": "typeName", "type": "str"}, - "operator": {"key": "operator", "type": "str"}, - "negate_condition": {"key": "negateCondition", "type": "bool"}, - "match_values": {"key": "matchValues", "type": "[str]"}, - "transforms": {"key": "transforms", "type": "[str]"}, - } - - def __init__( - self, - *, - operator: Union[str, "_models.HostNameOperator"], - negate_condition: bool = False, - match_values: Optional[list[str]] = None, - transforms: Optional[list[Union[str, "_models.Transform"]]] = None, - **kwargs: Any - ) -> None: - """ - :keyword operator: Describes operator to be matched. Required. Known values are: "Any", - "Equal", "Contains", "BeginsWith", "EndsWith", "LessThan", "LessThanOrEqual", "GreaterThan", - "GreaterThanOrEqual", and "RegEx". - :paramtype operator: str or ~azure.mgmt.cdn.models.HostNameOperator - :keyword negate_condition: Describes if this is negate condition or not. - :paramtype negate_condition: bool - :keyword match_values: The match value for the condition of the delivery rule. - :paramtype match_values: list[str] - :keyword transforms: List of transforms. - :paramtype transforms: list[str or ~azure.mgmt.cdn.models.Transform] - """ - super().__init__(**kwargs) - self.type_name: str = "DeliveryRuleHostNameConditionParameters" - self.operator = operator - self.negate_condition = negate_condition - self.match_values = match_values - self.transforms = transforms - - -class HttpErrorRangeParameters(_serialization.Model): - """The JSON object that represents the range for http status codes. - - :ivar begin: The inclusive start of the http status code range. - :vartype begin: int - :ivar end: The inclusive end of the http status code range. - :vartype end: int - """ - - _validation = { - "begin": {"maximum": 999, "minimum": 100}, - "end": {"maximum": 999, "minimum": 100}, - } - - _attribute_map = { - "begin": {"key": "begin", "type": "int"}, - "end": {"key": "end", "type": "int"}, - } - - def __init__(self, *, begin: Optional[int] = None, end: Optional[int] = None, **kwargs: Any) -> None: - """ - :keyword begin: The inclusive start of the http status code range. - :paramtype begin: int - :keyword end: The inclusive end of the http status code range. - :paramtype end: int - """ - super().__init__(**kwargs) - self.begin = begin - self.end = end - - -class HttpVersionMatchConditionParameters(DeliveryRuleConditionParameters): - """Defines the parameters for HttpVersion match conditions. - - All required parameters must be populated in order to send to server. - - :ivar type_name: Required. Known values are: "DeliveryRuleRemoteAddressConditionParameters", - "DeliveryRuleRequestMethodConditionParameters", "DeliveryRuleQueryStringConditionParameters", - "DeliveryRulePostArgsConditionParameters", "DeliveryRuleRequestUriConditionParameters", - "DeliveryRuleRequestHeaderConditionParameters", "DeliveryRuleRequestBodyConditionParameters", - "DeliveryRuleRequestSchemeConditionParameters", "DeliveryRuleUrlPathMatchConditionParameters", - "DeliveryRuleUrlFileExtensionMatchConditionParameters", - "DeliveryRuleUrlFilenameConditionParameters", "DeliveryRuleHttpVersionConditionParameters", - "DeliveryRuleCookiesConditionParameters", "DeliveryRuleIsDeviceConditionParameters", - "DeliveryRuleSocketAddrConditionParameters", "DeliveryRuleClientPortConditionParameters", - "DeliveryRuleServerPortConditionParameters", "DeliveryRuleHostNameConditionParameters", and - "DeliveryRuleSslProtocolConditionParameters". - :vartype type_name: str or ~azure.mgmt.cdn.models.DeliveryRuleConditionParametersType - :ivar operator: Describes operator to be matched. Required. "Equal" - :vartype operator: str or ~azure.mgmt.cdn.models.HttpVersionOperator - :ivar negate_condition: Describes if this is negate condition or not. - :vartype negate_condition: bool - :ivar match_values: The match value for the condition of the delivery rule. - :vartype match_values: list[str] - :ivar transforms: List of transforms. - :vartype transforms: list[str or ~azure.mgmt.cdn.models.Transform] - """ - - _validation = { - "type_name": {"required": True}, - "operator": {"required": True}, - } - - _attribute_map = { - "type_name": {"key": "typeName", "type": "str"}, - "operator": {"key": "operator", "type": "str"}, - "negate_condition": {"key": "negateCondition", "type": "bool"}, - "match_values": {"key": "matchValues", "type": "[str]"}, - "transforms": {"key": "transforms", "type": "[str]"}, - } - - def __init__( - self, - *, - operator: Union[str, "_models.HttpVersionOperator"], - negate_condition: bool = False, - match_values: Optional[list[str]] = None, - transforms: Optional[list[Union[str, "_models.Transform"]]] = None, - **kwargs: Any - ) -> None: - """ - :keyword operator: Describes operator to be matched. Required. "Equal" - :paramtype operator: str or ~azure.mgmt.cdn.models.HttpVersionOperator - :keyword negate_condition: Describes if this is negate condition or not. - :paramtype negate_condition: bool - :keyword match_values: The match value for the condition of the delivery rule. - :paramtype match_values: list[str] - :keyword transforms: List of transforms. - :paramtype transforms: list[str or ~azure.mgmt.cdn.models.Transform] - """ - super().__init__(**kwargs) - self.type_name: str = "DeliveryRuleHttpVersionConditionParameters" - self.operator = operator - self.negate_condition = negate_condition - self.match_values = match_values - self.transforms = transforms - - -class IpAddressGroup(_serialization.Model): - """CDN Ip address group. - - :ivar delivery_region: The delivery region of the ip address group. - :vartype delivery_region: str - :ivar ipv4_addresses: The list of ip v4 addresses. - :vartype ipv4_addresses: list[~azure.mgmt.cdn.models.CidrIpAddress] - :ivar ipv6_addresses: The list of ip v6 addresses. - :vartype ipv6_addresses: list[~azure.mgmt.cdn.models.CidrIpAddress] - """ - - _attribute_map = { - "delivery_region": {"key": "deliveryRegion", "type": "str"}, - "ipv4_addresses": {"key": "ipv4Addresses", "type": "[CidrIpAddress]"}, - "ipv6_addresses": {"key": "ipv6Addresses", "type": "[CidrIpAddress]"}, - } - - def __init__( - self, - *, - delivery_region: Optional[str] = None, - ipv4_addresses: Optional[list["_models.CidrIpAddress"]] = None, - ipv6_addresses: Optional[list["_models.CidrIpAddress"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword delivery_region: The delivery region of the ip address group. - :paramtype delivery_region: str - :keyword ipv4_addresses: The list of ip v4 addresses. - :paramtype ipv4_addresses: list[~azure.mgmt.cdn.models.CidrIpAddress] - :keyword ipv6_addresses: The list of ip v6 addresses. - :paramtype ipv6_addresses: list[~azure.mgmt.cdn.models.CidrIpAddress] - """ - super().__init__(**kwargs) - self.delivery_region = delivery_region - self.ipv4_addresses = ipv4_addresses - self.ipv6_addresses = ipv6_addresses - - -class IsDeviceMatchConditionParameters(DeliveryRuleConditionParameters): - """Defines the parameters for IsDevice match conditions. - - All required parameters must be populated in order to send to server. - - :ivar type_name: Required. Known values are: "DeliveryRuleRemoteAddressConditionParameters", - "DeliveryRuleRequestMethodConditionParameters", "DeliveryRuleQueryStringConditionParameters", - "DeliveryRulePostArgsConditionParameters", "DeliveryRuleRequestUriConditionParameters", - "DeliveryRuleRequestHeaderConditionParameters", "DeliveryRuleRequestBodyConditionParameters", - "DeliveryRuleRequestSchemeConditionParameters", "DeliveryRuleUrlPathMatchConditionParameters", - "DeliveryRuleUrlFileExtensionMatchConditionParameters", - "DeliveryRuleUrlFilenameConditionParameters", "DeliveryRuleHttpVersionConditionParameters", - "DeliveryRuleCookiesConditionParameters", "DeliveryRuleIsDeviceConditionParameters", - "DeliveryRuleSocketAddrConditionParameters", "DeliveryRuleClientPortConditionParameters", - "DeliveryRuleServerPortConditionParameters", "DeliveryRuleHostNameConditionParameters", and - "DeliveryRuleSslProtocolConditionParameters". - :vartype type_name: str or ~azure.mgmt.cdn.models.DeliveryRuleConditionParametersType - :ivar operator: Describes operator to be matched. Required. "Equal" - :vartype operator: str or ~azure.mgmt.cdn.models.IsDeviceOperator - :ivar negate_condition: Describes if this is negate condition or not. - :vartype negate_condition: bool - :ivar match_values: The match value for the condition of the delivery rule. - :vartype match_values: list[str or ~azure.mgmt.cdn.models.IsDeviceMatchValue] - :ivar transforms: List of transforms. - :vartype transforms: list[str or ~azure.mgmt.cdn.models.Transform] - """ - - _validation = { - "type_name": {"required": True}, - "operator": {"required": True}, - } - - _attribute_map = { - "type_name": {"key": "typeName", "type": "str"}, - "operator": {"key": "operator", "type": "str"}, - "negate_condition": {"key": "negateCondition", "type": "bool"}, - "match_values": {"key": "matchValues", "type": "[str]"}, - "transforms": {"key": "transforms", "type": "[str]"}, - } - - def __init__( - self, - *, - operator: Union[str, "_models.IsDeviceOperator"], - negate_condition: bool = False, - match_values: Optional[list[Union[str, "_models.IsDeviceMatchValue"]]] = None, - transforms: Optional[list[Union[str, "_models.Transform"]]] = None, - **kwargs: Any - ) -> None: - """ - :keyword operator: Describes operator to be matched. Required. "Equal" - :paramtype operator: str or ~azure.mgmt.cdn.models.IsDeviceOperator - :keyword negate_condition: Describes if this is negate condition or not. - :paramtype negate_condition: bool - :keyword match_values: The match value for the condition of the delivery rule. - :paramtype match_values: list[str or ~azure.mgmt.cdn.models.IsDeviceMatchValue] - :keyword transforms: List of transforms. - :paramtype transforms: list[str or ~azure.mgmt.cdn.models.Transform] - """ - super().__init__(**kwargs) - self.type_name: str = "DeliveryRuleIsDeviceConditionParameters" - self.operator = operator - self.negate_condition = negate_condition - self.match_values = match_values - self.transforms = transforms - - -class KeyVaultCertificateSourceParameters(CertificateSourceParameters): - """Describes the parameters for using a user's KeyVault certificate for securing custom domain. - - All required parameters must be populated in order to send to server. - - :ivar type_name: Required. Known values are: "CdnCertificateSourceParameters" and - "KeyVaultCertificateSourceParameters". - :vartype type_name: str or ~azure.mgmt.cdn.models.CertificateSourceParametersType - :ivar subscription_id: Subscription Id of the user's Key Vault containing the SSL certificate. - Required. - :vartype subscription_id: str - :ivar resource_group_name: Resource group of the user's Key Vault containing the SSL - certificate. Required. - :vartype resource_group_name: str - :ivar vault_name: The name of the user's Key Vault containing the SSL certificate. Required. - :vartype vault_name: str - :ivar secret_name: The name of Key Vault Secret (representing the full certificate PFX) in Key - Vault. Required. - :vartype secret_name: str - :ivar secret_version: The version(GUID) of Key Vault Secret in Key Vault. - :vartype secret_version: str - :ivar update_rule: Describes the action that shall be taken when the certificate is updated in - Key Vault. Required. "NoAction" - :vartype update_rule: str or ~azure.mgmt.cdn.models.UpdateRule - :ivar delete_rule: Describes the action that shall be taken when the certificate is removed - from Key Vault. Required. "NoAction" - :vartype delete_rule: str or ~azure.mgmt.cdn.models.DeleteRule - """ - - _validation = { - "type_name": {"required": True}, - "subscription_id": {"required": True}, - "resource_group_name": {"required": True}, - "vault_name": {"required": True}, - "secret_name": {"required": True}, - "update_rule": {"required": True}, - "delete_rule": {"required": True}, - } - - _attribute_map = { - "type_name": {"key": "typeName", "type": "str"}, - "subscription_id": {"key": "subscriptionId", "type": "str"}, - "resource_group_name": {"key": "resourceGroupName", "type": "str"}, - "vault_name": {"key": "vaultName", "type": "str"}, - "secret_name": {"key": "secretName", "type": "str"}, - "secret_version": {"key": "secretVersion", "type": "str"}, - "update_rule": {"key": "updateRule", "type": "str"}, - "delete_rule": {"key": "deleteRule", "type": "str"}, - } - - def __init__( - self, - *, - subscription_id: str, - resource_group_name: str, - vault_name: str, - secret_name: str, - update_rule: Union[str, "_models.UpdateRule"], - delete_rule: Union[str, "_models.DeleteRule"], - secret_version: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword subscription_id: Subscription Id of the user's Key Vault containing the SSL - certificate. Required. - :paramtype subscription_id: str - :keyword resource_group_name: Resource group of the user's Key Vault containing the SSL - certificate. Required. - :paramtype resource_group_name: str - :keyword vault_name: The name of the user's Key Vault containing the SSL certificate. Required. - :paramtype vault_name: str - :keyword secret_name: The name of Key Vault Secret (representing the full certificate PFX) in - Key Vault. Required. - :paramtype secret_name: str - :keyword secret_version: The version(GUID) of Key Vault Secret in Key Vault. - :paramtype secret_version: str - :keyword update_rule: Describes the action that shall be taken when the certificate is updated - in Key Vault. Required. "NoAction" - :paramtype update_rule: str or ~azure.mgmt.cdn.models.UpdateRule - :keyword delete_rule: Describes the action that shall be taken when the certificate is removed - from Key Vault. Required. "NoAction" - :paramtype delete_rule: str or ~azure.mgmt.cdn.models.DeleteRule - """ - super().__init__(**kwargs) - self.type_name: str = "KeyVaultCertificateSourceParameters" - self.subscription_id = subscription_id - self.resource_group_name = resource_group_name - self.vault_name = vault_name - self.secret_name = secret_name - self.secret_version = secret_version - self.update_rule = update_rule - self.delete_rule = delete_rule - - -class KeyVaultSigningKeyParameters(_serialization.Model): - """Describes the parameters for using a user's KeyVault for URL Signing Key. - - All required parameters must be populated in order to send to server. - - :ivar type_name: Required. "KeyVaultSigningKeyParameters" - :vartype type_name: str or ~azure.mgmt.cdn.models.KeyVaultSigningKeyParametersType - :ivar subscription_id: Subscription Id of the user's Key Vault containing the secret. Required. - :vartype subscription_id: str - :ivar resource_group_name: Resource group of the user's Key Vault containing the secret. - Required. - :vartype resource_group_name: str - :ivar vault_name: The name of the user's Key Vault containing the secret. Required. - :vartype vault_name: str - :ivar secret_name: The name of secret in Key Vault. Required. - :vartype secret_name: str - :ivar secret_version: The version(GUID) of secret in Key Vault. Required. - :vartype secret_version: str - """ - - _validation = { - "type_name": {"required": True}, - "subscription_id": {"required": True}, - "resource_group_name": {"required": True}, - "vault_name": {"required": True}, - "secret_name": {"required": True}, - "secret_version": {"required": True}, - } - - _attribute_map = { - "type_name": {"key": "typeName", "type": "str"}, - "subscription_id": {"key": "subscriptionId", "type": "str"}, - "resource_group_name": {"key": "resourceGroupName", "type": "str"}, - "vault_name": {"key": "vaultName", "type": "str"}, - "secret_name": {"key": "secretName", "type": "str"}, - "secret_version": {"key": "secretVersion", "type": "str"}, - } - - def __init__( - self, - *, - type_name: Union[str, "_models.KeyVaultSigningKeyParametersType"], - subscription_id: str, - resource_group_name: str, - vault_name: str, - secret_name: str, - secret_version: str, - **kwargs: Any - ) -> None: - """ - :keyword type_name: Required. "KeyVaultSigningKeyParameters" - :paramtype type_name: str or ~azure.mgmt.cdn.models.KeyVaultSigningKeyParametersType - :keyword subscription_id: Subscription Id of the user's Key Vault containing the secret. - Required. - :paramtype subscription_id: str - :keyword resource_group_name: Resource group of the user's Key Vault containing the secret. - Required. - :paramtype resource_group_name: str - :keyword vault_name: The name of the user's Key Vault containing the secret. Required. - :paramtype vault_name: str - :keyword secret_name: The name of secret in Key Vault. Required. - :paramtype secret_name: str - :keyword secret_version: The version(GUID) of secret in Key Vault. Required. - :paramtype secret_version: str - """ - super().__init__(**kwargs) - self.type_name = type_name - self.subscription_id = subscription_id - self.resource_group_name = resource_group_name - self.vault_name = vault_name - self.secret_name = secret_name - self.secret_version = secret_version - - -class LoadBalancingSettingsParameters(_serialization.Model): - """Round-Robin load balancing settings for a backend pool. - - :ivar sample_size: The number of samples to consider for load balancing decisions. - :vartype sample_size: int - :ivar successful_samples_required: The number of samples within the sample period that must - succeed. - :vartype successful_samples_required: int - :ivar additional_latency_in_milliseconds: The additional latency in milliseconds for probes to - fall into the lowest latency bucket. - :vartype additional_latency_in_milliseconds: int - """ - - _attribute_map = { - "sample_size": {"key": "sampleSize", "type": "int"}, - "successful_samples_required": {"key": "successfulSamplesRequired", "type": "int"}, - "additional_latency_in_milliseconds": {"key": "additionalLatencyInMilliseconds", "type": "int"}, - } - - def __init__( - self, - *, - sample_size: Optional[int] = None, - successful_samples_required: Optional[int] = None, - additional_latency_in_milliseconds: Optional[int] = None, - **kwargs: Any - ) -> None: - """ - :keyword sample_size: The number of samples to consider for load balancing decisions. - :paramtype sample_size: int - :keyword successful_samples_required: The number of samples within the sample period that must - succeed. - :paramtype successful_samples_required: int - :keyword additional_latency_in_milliseconds: The additional latency in milliseconds for probes - to fall into the lowest latency bucket. - :paramtype additional_latency_in_milliseconds: int - """ - super().__init__(**kwargs) - self.sample_size = sample_size - self.successful_samples_required = successful_samples_required - self.additional_latency_in_milliseconds = additional_latency_in_milliseconds - - -class LoadParameters(_serialization.Model): - """Parameters required for content load. - - All required parameters must be populated in order to send to server. - - :ivar content_paths: The path to the content to be loaded. Path should be a relative file URL - of the origin. Required. - :vartype content_paths: list[str] - """ - - _validation = { - "content_paths": {"required": True}, - } - - _attribute_map = { - "content_paths": {"key": "contentPaths", "type": "[str]"}, - } - - def __init__(self, *, content_paths: list[str], **kwargs: Any) -> None: - """ - :keyword content_paths: The path to the content to be loaded. Path should be a relative file - URL of the origin. Required. - :paramtype content_paths: list[str] - """ - super().__init__(**kwargs) - self.content_paths = content_paths - - -class LogSpecification(_serialization.Model): - """Log specification of operation. - - :ivar name: Name of log specification. - :vartype name: str - :ivar display_name: Display name of log specification. - :vartype display_name: str - :ivar blob_duration: Blob duration of specification. - :vartype blob_duration: str - :ivar log_filter_pattern: Pattern to filter based on name. - :vartype log_filter_pattern: str - """ - - _attribute_map = { - "name": {"key": "name", "type": "str"}, - "display_name": {"key": "displayName", "type": "str"}, - "blob_duration": {"key": "blobDuration", "type": "str"}, - "log_filter_pattern": {"key": "logFilterPattern", "type": "str"}, - } - - def __init__( - self, - *, - name: Optional[str] = None, - display_name: Optional[str] = None, - blob_duration: Optional[str] = None, - log_filter_pattern: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword name: Name of log specification. - :paramtype name: str - :keyword display_name: Display name of log specification. - :paramtype display_name: str - :keyword blob_duration: Blob duration of specification. - :paramtype blob_duration: str - :keyword log_filter_pattern: Pattern to filter based on name. - :paramtype log_filter_pattern: str - """ - super().__init__(**kwargs) - self.name = name - self.display_name = display_name - self.blob_duration = blob_duration - self.log_filter_pattern = log_filter_pattern - - -class ManagedCertificate(Certificate): - """Managed Certificate used for https. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar type: The type of the secret resource. Known values are: "UrlSigningKey", - "CustomerCertificate", "ManagedCertificate", and "AzureFirstPartyManagedCertificate". - :vartype type: str or ~azure.mgmt.cdn.models.SecretType - :ivar subject: Subject name in the certificate. - :vartype subject: str - :ivar expiration_date: Certificate expiration date. - :vartype expiration_date: str - """ - - -class ManagedCertificateParameters(SecretParameters): - """Managed Certificate used for https. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to server. - - :ivar type: The type of the secret resource. Required. Known values are: "UrlSigningKey", - "CustomerCertificate", "ManagedCertificate", and "AzureFirstPartyManagedCertificate". - :vartype type: str or ~azure.mgmt.cdn.models.SecretType - :ivar subject: Subject name in the certificate. - :vartype subject: str - :ivar expiration_date: Certificate expiration date. - :vartype expiration_date: str - """ - - _validation = { - "type": {"required": True}, - "subject": {"readonly": True}, - "expiration_date": {"readonly": True}, - } - - _attribute_map = { - "type": {"key": "type", "type": "str"}, - "subject": {"key": "subject", "type": "str"}, - "expiration_date": {"key": "expirationDate", "type": "str"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.type: str = "ManagedCertificate" - self.subject: Optional[str] = None - self.expiration_date: Optional[str] = None - - -class ManagedRuleDefinition(_serialization.Model): - """Describes a managed rule definition. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar rule_id: Identifier for the managed rule. - :vartype rule_id: str - :ivar description: Describes the functionality of the managed rule. - :vartype description: str - """ - - _validation = { - "rule_id": {"readonly": True}, - "description": {"readonly": True}, - } - - _attribute_map = { - "rule_id": {"key": "ruleId", "type": "str"}, - "description": {"key": "description", "type": "str"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.rule_id: Optional[str] = None - self.description: Optional[str] = None - - -class ManagedRuleGroupDefinition(_serialization.Model): - """Describes a managed rule group. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar rule_group_name: Name of the managed rule group. - :vartype rule_group_name: str - :ivar description: Description of the managed rule group. - :vartype description: str - :ivar rules: List of rules within the managed rule group. - :vartype rules: list[~azure.mgmt.cdn.models.ManagedRuleDefinition] - """ - - _validation = { - "rule_group_name": {"readonly": True}, - "description": {"readonly": True}, - "rules": {"readonly": True}, - } - - _attribute_map = { - "rule_group_name": {"key": "ruleGroupName", "type": "str"}, - "description": {"key": "description", "type": "str"}, - "rules": {"key": "rules", "type": "[ManagedRuleDefinition]"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.rule_group_name: Optional[str] = None - self.description: Optional[str] = None - self.rules: Optional[list["_models.ManagedRuleDefinition"]] = None - - -class ManagedRuleGroupOverride(_serialization.Model): - """Defines a managed rule group override setting. - - All required parameters must be populated in order to send to server. - - :ivar rule_group_name: Describes the managed rule group within the rule set to override. - Required. - :vartype rule_group_name: str - :ivar rules: List of rules that will be enabled. If none specified, all rules in the group will - be disabled. - :vartype rules: list[~azure.mgmt.cdn.models.ManagedRuleOverride] - """ - - _validation = { - "rule_group_name": {"required": True}, - } - - _attribute_map = { - "rule_group_name": {"key": "ruleGroupName", "type": "str"}, - "rules": {"key": "rules", "type": "[ManagedRuleOverride]"}, - } - - def __init__( - self, *, rule_group_name: str, rules: Optional[list["_models.ManagedRuleOverride"]] = None, **kwargs: Any - ) -> None: - """ - :keyword rule_group_name: Describes the managed rule group within the rule set to override. - Required. - :paramtype rule_group_name: str - :keyword rules: List of rules that will be enabled. If none specified, all rules in the group - will be disabled. - :paramtype rules: list[~azure.mgmt.cdn.models.ManagedRuleOverride] - """ - super().__init__(**kwargs) - self.rule_group_name = rule_group_name - self.rules = rules - - -class ManagedRuleOverride(_serialization.Model): - """Defines a managed rule group override setting. - - All required parameters must be populated in order to send to server. - - :ivar rule_id: Identifier for the managed rule. Required. - :vartype rule_id: str - :ivar enabled_state: Describes if the managed rule is in enabled or disabled state. Defaults to - Disabled if not specified. Known values are: "Disabled" and "Enabled". - :vartype enabled_state: str or ~azure.mgmt.cdn.models.ManagedRuleEnabledState - :ivar action: Describes the override action to be applied when rule matches. Known values are: - "Allow", "Block", "Log", and "Redirect". - :vartype action: str or ~azure.mgmt.cdn.models.ActionType - """ - - _validation = { - "rule_id": {"required": True}, - } - - _attribute_map = { - "rule_id": {"key": "ruleId", "type": "str"}, - "enabled_state": {"key": "enabledState", "type": "str"}, - "action": {"key": "action", "type": "str"}, - } - - def __init__( - self, - *, - rule_id: str, - enabled_state: Optional[Union[str, "_models.ManagedRuleEnabledState"]] = None, - action: Optional[Union[str, "_models.ActionType"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword rule_id: Identifier for the managed rule. Required. - :paramtype rule_id: str - :keyword enabled_state: Describes if the managed rule is in enabled or disabled state. Defaults - to Disabled if not specified. Known values are: "Disabled" and "Enabled". - :paramtype enabled_state: str or ~azure.mgmt.cdn.models.ManagedRuleEnabledState - :keyword action: Describes the override action to be applied when rule matches. Known values - are: "Allow", "Block", "Log", and "Redirect". - :paramtype action: str or ~azure.mgmt.cdn.models.ActionType - """ - super().__init__(**kwargs) - self.rule_id = rule_id - self.enabled_state = enabled_state - self.action = action - - -class ManagedRuleSet(_serialization.Model): - """Defines a managed rule set. - - All required parameters must be populated in order to send to server. - - :ivar rule_set_type: Defines the rule set type to use. Required. - :vartype rule_set_type: str - :ivar rule_set_version: Defines the version of the rule set to use. Required. - :vartype rule_set_version: str - :ivar anomaly_score: Verizon only : If the rule set supports anomaly detection mode, this - describes the threshold for blocking requests. - :vartype anomaly_score: int - :ivar rule_group_overrides: Defines the rule overrides to apply to the rule set. - :vartype rule_group_overrides: list[~azure.mgmt.cdn.models.ManagedRuleGroupOverride] - """ - - _validation = { - "rule_set_type": {"required": True}, - "rule_set_version": {"required": True}, - "anomaly_score": {"maximum": 20, "minimum": 0}, - } - - _attribute_map = { - "rule_set_type": {"key": "ruleSetType", "type": "str"}, - "rule_set_version": {"key": "ruleSetVersion", "type": "str"}, - "anomaly_score": {"key": "anomalyScore", "type": "int"}, - "rule_group_overrides": {"key": "ruleGroupOverrides", "type": "[ManagedRuleGroupOverride]"}, - } - - def __init__( - self, - *, - rule_set_type: str, - rule_set_version: str, - anomaly_score: Optional[int] = None, - rule_group_overrides: Optional[list["_models.ManagedRuleGroupOverride"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword rule_set_type: Defines the rule set type to use. Required. - :paramtype rule_set_type: str - :keyword rule_set_version: Defines the version of the rule set to use. Required. - :paramtype rule_set_version: str - :keyword anomaly_score: Verizon only : If the rule set supports anomaly detection mode, this - describes the threshold for blocking requests. - :paramtype anomaly_score: int - :keyword rule_group_overrides: Defines the rule overrides to apply to the rule set. - :paramtype rule_group_overrides: list[~azure.mgmt.cdn.models.ManagedRuleGroupOverride] - """ - super().__init__(**kwargs) - self.rule_set_type = rule_set_type - self.rule_set_version = rule_set_version - self.anomaly_score = anomaly_score - self.rule_group_overrides = rule_group_overrides - - -class ManagedRuleSetDefinition(Resource): - """Describes a managed rule set definition. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. E.g. - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy - information. - :vartype system_data: ~azure.mgmt.cdn.models.SystemData - :ivar sku: The pricing tier (defines a CDN provider, feature list and rate) of the - CdnWebApplicationFirewallPolicy. - :vartype sku: ~azure.mgmt.cdn.models.Sku - :ivar provisioning_state: Provisioning state of the managed rule set. - :vartype provisioning_state: str - :ivar rule_set_type: Type of the managed rule set. - :vartype rule_set_type: str - :ivar rule_set_version: Version of the managed rule set type. - :vartype rule_set_version: str - :ivar rule_groups: Rule groups of the managed rule set. - :vartype rule_groups: list[~azure.mgmt.cdn.models.ManagedRuleGroupDefinition] - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "system_data": {"readonly": True}, - "provisioning_state": {"readonly": True}, - "rule_set_type": {"readonly": True}, - "rule_set_version": {"readonly": True}, - "rule_groups": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "system_data": {"key": "systemData", "type": "SystemData"}, - "sku": {"key": "sku", "type": "Sku"}, - "provisioning_state": {"key": "properties.provisioningState", "type": "str"}, - "rule_set_type": {"key": "properties.ruleSetType", "type": "str"}, - "rule_set_version": {"key": "properties.ruleSetVersion", "type": "str"}, - "rule_groups": {"key": "properties.ruleGroups", "type": "[ManagedRuleGroupDefinition]"}, - } - - def __init__(self, *, sku: Optional["_models.Sku"] = None, **kwargs: Any) -> None: - """ - :keyword sku: The pricing tier (defines a CDN provider, feature list and rate) of the - CdnWebApplicationFirewallPolicy. - :paramtype sku: ~azure.mgmt.cdn.models.Sku - """ - super().__init__(**kwargs) - self.sku = sku - self.provisioning_state: Optional[str] = None - self.rule_set_type: Optional[str] = None - self.rule_set_version: Optional[str] = None - self.rule_groups: Optional[list["_models.ManagedRuleGroupDefinition"]] = None - - -class ManagedRuleSetDefinitionList(_serialization.Model): - """List of managed rule set definitions available for use in a policy. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: List of managed rule set definitions. - :vartype value: list[~azure.mgmt.cdn.models.ManagedRuleSetDefinition] - :ivar next_link: URL to retrieve next set of managed rule set definitions. - :vartype next_link: str - """ - - _validation = { - "value": {"readonly": True}, - } - - _attribute_map = { - "value": {"key": "value", "type": "[ManagedRuleSetDefinition]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__(self, *, next_link: Optional[str] = None, **kwargs: Any) -> None: - """ - :keyword next_link: URL to retrieve next set of managed rule set definitions. - :paramtype next_link: str - """ - super().__init__(**kwargs) - self.value: Optional[list["_models.ManagedRuleSetDefinition"]] = None - self.next_link = next_link - - -class ManagedRuleSetList(_serialization.Model): - """Defines the list of managed rule sets for the policy. - - :ivar managed_rule_sets: List of rule sets. - :vartype managed_rule_sets: list[~azure.mgmt.cdn.models.ManagedRuleSet] - """ - - _attribute_map = { - "managed_rule_sets": {"key": "managedRuleSets", "type": "[ManagedRuleSet]"}, - } - - def __init__(self, *, managed_rule_sets: Optional[list["_models.ManagedRuleSet"]] = None, **kwargs: Any) -> None: - """ - :keyword managed_rule_sets: List of rule sets. - :paramtype managed_rule_sets: list[~azure.mgmt.cdn.models.ManagedRuleSet] - """ - super().__init__(**kwargs) - self.managed_rule_sets = managed_rule_sets - - -class ManagedServiceIdentity(_serialization.Model): - """Managed service identity (system assigned and/or user assigned identities). - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to server. - - :ivar principal_id: The service principal ID of the system assigned identity. This property - will only be provided for a system assigned identity. - :vartype principal_id: str - :ivar tenant_id: The tenant ID of the system assigned identity. This property will only be - provided for a system assigned identity. - :vartype tenant_id: str - :ivar type: Type of managed service identity (where both SystemAssigned and UserAssigned types - are allowed). Required. Known values are: "None", "SystemAssigned", "UserAssigned", and - "SystemAssigned,UserAssigned". - :vartype type: str or ~azure.mgmt.cdn.models.ManagedServiceIdentityType - :ivar user_assigned_identities: The set of user assigned identities associated with the - resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. - The dictionary values can be empty objects ({}) in requests. - :vartype user_assigned_identities: dict[str, ~azure.mgmt.cdn.models.UserAssignedIdentity] - """ - - _validation = { - "principal_id": {"readonly": True}, - "tenant_id": {"readonly": True}, - "type": {"required": True}, - } - - _attribute_map = { - "principal_id": {"key": "principalId", "type": "str"}, - "tenant_id": {"key": "tenantId", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "user_assigned_identities": {"key": "userAssignedIdentities", "type": "{UserAssignedIdentity}"}, - } - - def __init__( - self, - *, - type: Union[str, "_models.ManagedServiceIdentityType"], - user_assigned_identities: Optional[dict[str, "_models.UserAssignedIdentity"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword type: Type of managed service identity (where both SystemAssigned and UserAssigned - types are allowed). Required. Known values are: "None", "SystemAssigned", "UserAssigned", and - "SystemAssigned,UserAssigned". - :paramtype type: str or ~azure.mgmt.cdn.models.ManagedServiceIdentityType - :keyword user_assigned_identities: The set of user assigned identities associated with the - resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. - The dictionary values can be empty objects ({}) in requests. - :paramtype user_assigned_identities: dict[str, ~azure.mgmt.cdn.models.UserAssignedIdentity] - """ - super().__init__(**kwargs) - self.principal_id: Optional[str] = None - self.tenant_id: Optional[str] = None - self.type = type - self.user_assigned_identities = user_assigned_identities - - -class MatchCondition(_serialization.Model): - """Define match conditions. - - All required parameters must be populated in order to send to server. - - :ivar match_variable: Match variable to compare against. Required. Known values are: - "RemoteAddr", "SocketAddr", "RequestMethod", "RequestHeader", "RequestUri", "QueryString", - "RequestBody", "Cookies", and "PostArgs". - :vartype match_variable: str or ~azure.mgmt.cdn.models.WafMatchVariable - :ivar selector: Selector can used to match a specific key for QueryString, Cookies, - RequestHeader or PostArgs. - :vartype selector: str - :ivar operator: Describes operator to be matched. Required. Known values are: "Any", "IPMatch", - "GeoMatch", "Equal", "Contains", "LessThan", "GreaterThan", "LessThanOrEqual", - "GreaterThanOrEqual", "BeginsWith", "EndsWith", and "RegEx". - :vartype operator: str or ~azure.mgmt.cdn.models.Operator - :ivar negate_condition: Describes if the result of this condition should be negated. - :vartype negate_condition: bool - :ivar match_value: List of possible match values. Required. - :vartype match_value: list[str] - :ivar transforms: List of transforms. - :vartype transforms: list[str or ~azure.mgmt.cdn.models.TransformType] - """ - - _validation = { - "match_variable": {"required": True}, - "operator": {"required": True}, - "match_value": {"required": True}, - } - - _attribute_map = { - "match_variable": {"key": "matchVariable", "type": "str"}, - "selector": {"key": "selector", "type": "str"}, - "operator": {"key": "operator", "type": "str"}, - "negate_condition": {"key": "negateCondition", "type": "bool"}, - "match_value": {"key": "matchValue", "type": "[str]"}, - "transforms": {"key": "transforms", "type": "[str]"}, - } - - def __init__( - self, - *, - match_variable: Union[str, "_models.WafMatchVariable"], - operator: Union[str, "_models.Operator"], - match_value: list[str], - selector: Optional[str] = None, - negate_condition: Optional[bool] = None, - transforms: Optional[list[Union[str, "_models.TransformType"]]] = None, - **kwargs: Any - ) -> None: - """ - :keyword match_variable: Match variable to compare against. Required. Known values are: - "RemoteAddr", "SocketAddr", "RequestMethod", "RequestHeader", "RequestUri", "QueryString", - "RequestBody", "Cookies", and "PostArgs". - :paramtype match_variable: str or ~azure.mgmt.cdn.models.WafMatchVariable - :keyword selector: Selector can used to match a specific key for QueryString, Cookies, - RequestHeader or PostArgs. - :paramtype selector: str - :keyword operator: Describes operator to be matched. Required. Known values are: "Any", - "IPMatch", "GeoMatch", "Equal", "Contains", "LessThan", "GreaterThan", "LessThanOrEqual", - "GreaterThanOrEqual", "BeginsWith", "EndsWith", and "RegEx". - :paramtype operator: str or ~azure.mgmt.cdn.models.Operator - :keyword negate_condition: Describes if the result of this condition should be negated. - :paramtype negate_condition: bool - :keyword match_value: List of possible match values. Required. - :paramtype match_value: list[str] - :keyword transforms: List of transforms. - :paramtype transforms: list[str or ~azure.mgmt.cdn.models.TransformType] - """ - super().__init__(**kwargs) - self.match_variable = match_variable - self.selector = selector - self.operator = operator - self.negate_condition = negate_condition - self.match_value = match_value - self.transforms = transforms - - -class MetricAvailability(_serialization.Model): - """Retention policy of a resource metric. - - :ivar time_grain: - :vartype time_grain: str - :ivar blob_duration: - :vartype blob_duration: str - """ - - _attribute_map = { - "time_grain": {"key": "timeGrain", "type": "str"}, - "blob_duration": {"key": "blobDuration", "type": "str"}, - } - - def __init__(self, *, time_grain: Optional[str] = None, blob_duration: Optional[str] = None, **kwargs: Any) -> None: - """ - :keyword time_grain: - :paramtype time_grain: str - :keyword blob_duration: - :paramtype blob_duration: str - """ - super().__init__(**kwargs) - self.time_grain = time_grain - self.blob_duration = blob_duration - - -class MetricSpecification(_serialization.Model): - """Metric specification of operation. - - :ivar name: Name of metric specification. - :vartype name: str - :ivar display_name: Display name of metric specification. - :vartype display_name: str - :ivar display_description: Display description of metric specification. - :vartype display_description: str - :ivar unit: The metric unit. Possible values include: 'Bytes', 'Count', 'Milliseconds'. - :vartype unit: str - :ivar aggregation_type: The metric aggregation type. Possible values include: 'Average', - 'Count', 'Total'. - :vartype aggregation_type: str - :ivar availabilities: Retention policies of a resource metric. - :vartype availabilities: list[~azure.mgmt.cdn.models.MetricAvailability] - :ivar supported_time_grain_types: The supported time grain types for the metrics. - :vartype supported_time_grain_types: list[str] - :ivar dimensions: The dimensions of metric. - :vartype dimensions: list[~azure.mgmt.cdn.models.DimensionProperties] - :ivar fill_gap_with_zero: Property to specify whether to fill gap with zero. - :vartype fill_gap_with_zero: bool - :ivar metric_filter_pattern: Pattern to filter based on name. - :vartype metric_filter_pattern: str - :ivar is_internal: Property to specify metric is internal or not. - :vartype is_internal: bool - """ - - _attribute_map = { - "name": {"key": "name", "type": "str"}, - "display_name": {"key": "displayName", "type": "str"}, - "display_description": {"key": "displayDescription", "type": "str"}, - "unit": {"key": "unit", "type": "str"}, - "aggregation_type": {"key": "aggregationType", "type": "str"}, - "availabilities": {"key": "availabilities", "type": "[MetricAvailability]"}, - "supported_time_grain_types": {"key": "supportedTimeGrainTypes", "type": "[str]"}, - "dimensions": {"key": "dimensions", "type": "[DimensionProperties]"}, - "fill_gap_with_zero": {"key": "fillGapWithZero", "type": "bool"}, - "metric_filter_pattern": {"key": "metricFilterPattern", "type": "str"}, - "is_internal": {"key": "isInternal", "type": "bool"}, - } - - def __init__( - self, - *, - name: Optional[str] = None, - display_name: Optional[str] = None, - display_description: Optional[str] = None, - unit: Optional[str] = None, - aggregation_type: Optional[str] = None, - availabilities: Optional[list["_models.MetricAvailability"]] = None, - supported_time_grain_types: Optional[list[str]] = None, - dimensions: Optional[list["_models.DimensionProperties"]] = None, - fill_gap_with_zero: Optional[bool] = None, - metric_filter_pattern: Optional[str] = None, - is_internal: Optional[bool] = None, - **kwargs: Any - ) -> None: - """ - :keyword name: Name of metric specification. - :paramtype name: str - :keyword display_name: Display name of metric specification. - :paramtype display_name: str - :keyword display_description: Display description of metric specification. - :paramtype display_description: str - :keyword unit: The metric unit. Possible values include: 'Bytes', 'Count', 'Milliseconds'. - :paramtype unit: str - :keyword aggregation_type: The metric aggregation type. Possible values include: 'Average', - 'Count', 'Total'. - :paramtype aggregation_type: str - :keyword availabilities: Retention policies of a resource metric. - :paramtype availabilities: list[~azure.mgmt.cdn.models.MetricAvailability] - :keyword supported_time_grain_types: The supported time grain types for the metrics. - :paramtype supported_time_grain_types: list[str] - :keyword dimensions: The dimensions of metric. - :paramtype dimensions: list[~azure.mgmt.cdn.models.DimensionProperties] - :keyword fill_gap_with_zero: Property to specify whether to fill gap with zero. - :paramtype fill_gap_with_zero: bool - :keyword metric_filter_pattern: Pattern to filter based on name. - :paramtype metric_filter_pattern: str - :keyword is_internal: Property to specify metric is internal or not. - :paramtype is_internal: bool - """ - super().__init__(**kwargs) - self.name = name - self.display_name = display_name - self.display_description = display_description - self.unit = unit - self.aggregation_type = aggregation_type - self.availabilities = availabilities - self.supported_time_grain_types = supported_time_grain_types - self.dimensions = dimensions - self.fill_gap_with_zero = fill_gap_with_zero - self.metric_filter_pattern = metric_filter_pattern - self.is_internal = is_internal - - -class MetricsResponse(_serialization.Model): - """Metrics Response. - - :ivar date_time_begin: - :vartype date_time_begin: ~datetime.datetime - :ivar date_time_end: - :vartype date_time_end: ~datetime.datetime - :ivar granularity: Known values are: "PT5M", "PT1H", and "P1D". - :vartype granularity: str or ~azure.mgmt.cdn.models.MetricsGranularity - :ivar series: - :vartype series: list[~azure.mgmt.cdn.models.MetricsResponseSeriesItem] - """ - - _attribute_map = { - "date_time_begin": {"key": "dateTimeBegin", "type": "iso-8601"}, - "date_time_end": {"key": "dateTimeEnd", "type": "iso-8601"}, - "granularity": {"key": "granularity", "type": "str"}, - "series": {"key": "series", "type": "[MetricsResponseSeriesItem]"}, - } - - def __init__( - self, - *, - date_time_begin: Optional[datetime.datetime] = None, - date_time_end: Optional[datetime.datetime] = None, - granularity: Optional[Union[str, "_models.MetricsGranularity"]] = None, - series: Optional[list["_models.MetricsResponseSeriesItem"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword date_time_begin: - :paramtype date_time_begin: ~datetime.datetime - :keyword date_time_end: - :paramtype date_time_end: ~datetime.datetime - :keyword granularity: Known values are: "PT5M", "PT1H", and "P1D". - :paramtype granularity: str or ~azure.mgmt.cdn.models.MetricsGranularity - :keyword series: - :paramtype series: list[~azure.mgmt.cdn.models.MetricsResponseSeriesItem] - """ - super().__init__(**kwargs) - self.date_time_begin = date_time_begin - self.date_time_end = date_time_end - self.granularity = granularity - self.series = series - - -class MetricsResponseSeriesItem(_serialization.Model): - """MetricsResponseSeriesItem. - - :ivar metric: - :vartype metric: str - :ivar unit: Known values are: "count", "bytes", "bitsPerSecond", and "milliSeconds". - :vartype unit: str or ~azure.mgmt.cdn.models.MetricsSeriesUnit - :ivar groups: - :vartype groups: list[~azure.mgmt.cdn.models.MetricsResponseSeriesPropertiesItemsItem] - :ivar data: - :vartype data: - list[~azure.mgmt.cdn.models.Components1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsPropertiesDataItems] - """ - - _attribute_map = { - "metric": {"key": "metric", "type": "str"}, - "unit": {"key": "unit", "type": "str"}, - "groups": {"key": "groups", "type": "[MetricsResponseSeriesPropertiesItemsItem]"}, - "data": { - "key": "data", - "type": "[Components1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsPropertiesDataItems]", - }, - } - - def __init__( - self, - *, - metric: Optional[str] = None, - unit: Optional[Union[str, "_models.MetricsSeriesUnit"]] = None, - groups: Optional[list["_models.MetricsResponseSeriesPropertiesItemsItem"]] = None, - data: Optional[ - list["_models.Components1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsPropertiesDataItems"] - ] = None, - **kwargs: Any - ) -> None: - """ - :keyword metric: - :paramtype metric: str - :keyword unit: Known values are: "count", "bytes", "bitsPerSecond", and "milliSeconds". - :paramtype unit: str or ~azure.mgmt.cdn.models.MetricsSeriesUnit - :keyword groups: - :paramtype groups: list[~azure.mgmt.cdn.models.MetricsResponseSeriesPropertiesItemsItem] - :keyword data: - :paramtype data: - list[~azure.mgmt.cdn.models.Components1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsPropertiesDataItems] - """ - super().__init__(**kwargs) - self.metric = metric - self.unit = unit - self.groups = groups - self.data = data - - -class MetricsResponseSeriesPropertiesItemsItem(_serialization.Model): - """MetricsResponseSeriesPropertiesItemsItem. - - :ivar name: - :vartype name: str - :ivar value: - :vartype value: str - """ - - _attribute_map = { - "name": {"key": "name", "type": "str"}, - "value": {"key": "value", "type": "str"}, - } - - def __init__(self, *, name: Optional[str] = None, value: Optional[str] = None, **kwargs: Any) -> None: - """ - :keyword name: - :paramtype name: str - :keyword value: - :paramtype value: str - """ - super().__init__(**kwargs) - self.name = name - self.value = value - - -class MigrateResult(_serialization.Model): - """Result for migrate operation. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar type: Resource type. - :vartype type: str - :ivar migrated_profile_resource_id: Arm resource id of the migrated profile. - :vartype migrated_profile_resource_id: ~azure.mgmt.cdn.models.ResourceReference - """ - - _validation = { - "id": {"readonly": True}, - "type": {"readonly": True}, - "migrated_profile_resource_id": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "migrated_profile_resource_id": {"key": "properties.migratedProfileResourceId", "type": "ResourceReference"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.id: Optional[str] = None - self.type: Optional[str] = None - self.migrated_profile_resource_id: Optional["_models.ResourceReference"] = None - - -class MigrationEndpointMapping(_serialization.Model): - """CDN Endpoint Mapping. - - :ivar migrated_from: Name of the classic CDN profile endpoint. - :vartype migrated_from: str - :ivar migrated_to: Name of the newly created migrated Azure Frontdoor Standard/Premium profile - endpoint. This name will replace the name of the classic CDN endpoint resource. - :vartype migrated_to: str - """ - - _attribute_map = { - "migrated_from": {"key": "migratedFrom", "type": "str"}, - "migrated_to": {"key": "migratedTo", "type": "str"}, - } - - def __init__( - self, *, migrated_from: Optional[str] = None, migrated_to: Optional[str] = None, **kwargs: Any - ) -> None: - """ - :keyword migrated_from: Name of the classic CDN profile endpoint. - :paramtype migrated_from: str - :keyword migrated_to: Name of the newly created migrated Azure Frontdoor Standard/Premium - profile endpoint. This name will replace the name of the classic CDN endpoint resource. - :paramtype migrated_to: str - """ - super().__init__(**kwargs) - self.migrated_from = migrated_from - self.migrated_to = migrated_to - - -class MigrationErrorType(_serialization.Model): - """Error response indicates CDN service is not able to process the incoming request. The reason is - provided in the error message. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar code: Error code. - :vartype code: str - :ivar resource_name: Resource which has the problem. - :vartype resource_name: str - :ivar error_message: Error message indicating why the operation failed. - :vartype error_message: str - :ivar next_steps: Describes what needs to be done to fix the problem. - :vartype next_steps: str - """ - - _validation = { - "code": {"readonly": True}, - "resource_name": {"readonly": True}, - "error_message": {"readonly": True}, - "next_steps": {"readonly": True}, - } - - _attribute_map = { - "code": {"key": "code", "type": "str"}, - "resource_name": {"key": "resourceName", "type": "str"}, - "error_message": {"key": "errorMessage", "type": "str"}, - "next_steps": {"key": "nextSteps", "type": "str"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.code: Optional[str] = None - self.resource_name: Optional[str] = None - self.error_message: Optional[str] = None - self.next_steps: Optional[str] = None - - -class MigrationParameters(_serialization.Model): - """Request body for Migrate operation. - - All required parameters must be populated in order to send to server. - - :ivar sku: Sku for the migration. Required. - :vartype sku: ~azure.mgmt.cdn.models.Sku - :ivar classic_resource_reference: Resource reference of the classic cdn profile or classic - frontdoor that need to be migrated. Required. - :vartype classic_resource_reference: ~azure.mgmt.cdn.models.ResourceReference - :ivar profile_name: Name of the new profile that need to be created. Required. - :vartype profile_name: str - :ivar migration_web_application_firewall_mappings: Waf mapping for the migrated profile. - :vartype migration_web_application_firewall_mappings: - list[~azure.mgmt.cdn.models.MigrationWebApplicationFirewallMapping] - """ - - _validation = { - "sku": {"required": True}, - "classic_resource_reference": {"required": True}, - "profile_name": {"required": True}, - } - - _attribute_map = { - "sku": {"key": "sku", "type": "Sku"}, - "classic_resource_reference": {"key": "classicResourceReference", "type": "ResourceReference"}, - "profile_name": {"key": "profileName", "type": "str"}, - "migration_web_application_firewall_mappings": { - "key": "migrationWebApplicationFirewallMappings", - "type": "[MigrationWebApplicationFirewallMapping]", - }, - } - - def __init__( - self, - *, - sku: "_models.Sku", - classic_resource_reference: "_models.ResourceReference", - profile_name: str, - migration_web_application_firewall_mappings: Optional[ - list["_models.MigrationWebApplicationFirewallMapping"] - ] = None, - **kwargs: Any - ) -> None: - """ - :keyword sku: Sku for the migration. Required. - :paramtype sku: ~azure.mgmt.cdn.models.Sku - :keyword classic_resource_reference: Resource reference of the classic cdn profile or classic - frontdoor that need to be migrated. Required. - :paramtype classic_resource_reference: ~azure.mgmt.cdn.models.ResourceReference - :keyword profile_name: Name of the new profile that need to be created. Required. - :paramtype profile_name: str - :keyword migration_web_application_firewall_mappings: Waf mapping for the migrated profile. - :paramtype migration_web_application_firewall_mappings: - list[~azure.mgmt.cdn.models.MigrationWebApplicationFirewallMapping] - """ - super().__init__(**kwargs) - self.sku = sku - self.classic_resource_reference = classic_resource_reference - self.profile_name = profile_name - self.migration_web_application_firewall_mappings = migration_web_application_firewall_mappings - - -class MigrationWebApplicationFirewallMapping(_serialization.Model): - """Web Application Firewall Mapping. - - :ivar migrated_from: Migration From Waf policy. - :vartype migrated_from: ~azure.mgmt.cdn.models.ResourceReference - :ivar migrated_to: Migration to Waf policy. - :vartype migrated_to: ~azure.mgmt.cdn.models.ResourceReference - """ - - _attribute_map = { - "migrated_from": {"key": "migratedFrom", "type": "ResourceReference"}, - "migrated_to": {"key": "migratedTo", "type": "ResourceReference"}, - } - - def __init__( - self, - *, - migrated_from: Optional["_models.ResourceReference"] = None, - migrated_to: Optional["_models.ResourceReference"] = None, - **kwargs: Any - ) -> None: - """ - :keyword migrated_from: Migration From Waf policy. - :paramtype migrated_from: ~azure.mgmt.cdn.models.ResourceReference - :keyword migrated_to: Migration to Waf policy. - :paramtype migrated_to: ~azure.mgmt.cdn.models.ResourceReference - """ - super().__init__(**kwargs) - self.migrated_from = migrated_from - self.migrated_to = migrated_to - - -class Operation(_serialization.Model): - """CDN REST API operation. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar name: Operation name: {provider}/{resource}/{operation}. - :vartype name: str - :ivar is_data_action: Indicates whether the operation is a data action. - :vartype is_data_action: bool - :ivar display: The object that represents the operation. - :vartype display: ~azure.mgmt.cdn.models.OperationDisplay - :ivar origin: The origin of operations. - :vartype origin: str - :ivar service_specification: One property of operation, include metric specifications. - :vartype service_specification: ~azure.mgmt.cdn.models.ServiceSpecification - """ - - _validation = { - "name": {"readonly": True}, - "origin": {"readonly": True}, - } - - _attribute_map = { - "name": {"key": "name", "type": "str"}, - "is_data_action": {"key": "isDataAction", "type": "bool"}, - "display": {"key": "display", "type": "OperationDisplay"}, - "origin": {"key": "origin", "type": "str"}, - "service_specification": {"key": "properties.serviceSpecification", "type": "ServiceSpecification"}, - } - - def __init__( - self, - *, - is_data_action: Optional[bool] = None, - display: Optional["_models.OperationDisplay"] = None, - service_specification: Optional["_models.ServiceSpecification"] = None, - **kwargs: Any - ) -> None: - """ - :keyword is_data_action: Indicates whether the operation is a data action. - :paramtype is_data_action: bool - :keyword display: The object that represents the operation. - :paramtype display: ~azure.mgmt.cdn.models.OperationDisplay - :keyword service_specification: One property of operation, include metric specifications. - :paramtype service_specification: ~azure.mgmt.cdn.models.ServiceSpecification - """ - super().__init__(**kwargs) - self.name: Optional[str] = None - self.is_data_action = is_data_action - self.display = display - self.origin: Optional[str] = None - self.service_specification = service_specification - - -class OperationDisplay(_serialization.Model): - """The object that represents the operation. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar provider: Service provider: Microsoft.Cdn. - :vartype provider: str - :ivar resource: Resource on which the operation is performed: Profile, endpoint, etc. - :vartype resource: str - :ivar operation: Operation type: Read, write, delete, etc. - :vartype operation: str - :ivar description: Description of operation. - :vartype description: str - """ - - _validation = { - "provider": {"readonly": True}, - "resource": {"readonly": True}, - "operation": {"readonly": True}, - "description": {"readonly": True}, - } - - _attribute_map = { - "provider": {"key": "provider", "type": "str"}, - "resource": {"key": "resource", "type": "str"}, - "operation": {"key": "operation", "type": "str"}, - "description": {"key": "description", "type": "str"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.provider: Optional[str] = None - self.resource: Optional[str] = None - self.operation: Optional[str] = None - self.description: Optional[str] = None - - -class OperationsListResult(_serialization.Model): - """Result of the request to list CDN operations. It contains a list of operations and a URL link - to get the next set of results. - - :ivar value: List of CDN operations supported by the CDN resource provider. - :vartype value: list[~azure.mgmt.cdn.models.Operation] - :ivar next_link: URL to get the next set of operation list results if there are any. - :vartype next_link: str - """ - - _attribute_map = { - "value": {"key": "value", "type": "[Operation]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__( - self, *, value: Optional[list["_models.Operation"]] = None, next_link: Optional[str] = None, **kwargs: Any - ) -> None: - """ - :keyword value: List of CDN operations supported by the CDN resource provider. - :paramtype value: list[~azure.mgmt.cdn.models.Operation] - :keyword next_link: URL to get the next set of operation list results if there are any. - :paramtype next_link: str - """ - super().__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class Origin(ProxyResource): - """CDN origin is the source of the content being delivered via CDN. When the edge nodes - represented by an endpoint do not have the requested content cached, they attempt to fetch it - from one or more of the configured origins. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. E.g. - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy - information. - :vartype system_data: ~azure.mgmt.cdn.models.SystemData - :ivar host_name: The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses - are supported.This should be unique across all origins in an endpoint. - :vartype host_name: str - :ivar http_port: The value of the HTTP port. Must be between 1 and 65535. - :vartype http_port: int - :ivar https_port: The value of the HTTPS port. Must be between 1 and 65535. - :vartype https_port: int - :ivar origin_host_header: The host header value sent to the origin with each request. If you - leave this blank, the request hostname determines this value. Azure CDN origins, such as Web - Apps, Blob Storage, and Cloud Services require this host header value to match the origin - hostname by default. This overrides the host header defined at Endpoint. - :vartype origin_host_header: str - :ivar priority: Priority of origin in given origin group for load balancing. Higher priorities - will not be used for load balancing if any lower priority origin is healthy.Must be between 1 - and 5. - :vartype priority: int - :ivar weight: Weight of the origin in given origin group for load balancing. Must be between 1 - and 1000. - :vartype weight: int - :ivar enabled: Origin is enabled for load balancing or not. - :vartype enabled: bool - :ivar private_link_alias: The Alias of the Private Link resource. Populating this optional - field indicates that this origin is 'Private'. - :vartype private_link_alias: str - :ivar private_link_resource_id: The Resource Id of the Private Link resource. Populating this - optional field indicates that this backend is 'Private'. - :vartype private_link_resource_id: str - :ivar private_link_location: The location of the Private Link resource. Required only if - 'privateLinkResourceId' is populated. - :vartype private_link_location: str - :ivar private_link_approval_message: A custom message to be included in the approval request to - connect to the Private Link. - :vartype private_link_approval_message: str - :ivar resource_state: Resource status of the origin. Known values are: "Creating", "Active", - and "Deleting". - :vartype resource_state: str or ~azure.mgmt.cdn.models.OriginResourceState - :ivar provisioning_state: Provisioning status of the origin. Known values are: "Succeeded", - "Failed", "Updating", "Deleting", and "Creating". - :vartype provisioning_state: str or ~azure.mgmt.cdn.models.OriginProvisioningState - :ivar private_endpoint_status: The approval status for the connection to the Private Link. - Known values are: "Pending", "Approved", "Rejected", "Disconnected", and "Timeout". - :vartype private_endpoint_status: str or ~azure.mgmt.cdn.models.PrivateEndpointStatus - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "system_data": {"readonly": True}, - "http_port": {"maximum": 65535, "minimum": 1}, - "https_port": {"maximum": 65535, "minimum": 1}, - "priority": {"maximum": 5, "minimum": 1}, - "weight": {"maximum": 1000, "minimum": 1}, - "resource_state": {"readonly": True}, - "provisioning_state": {"readonly": True}, - "private_endpoint_status": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "system_data": {"key": "systemData", "type": "SystemData"}, - "host_name": {"key": "properties.hostName", "type": "str"}, - "http_port": {"key": "properties.httpPort", "type": "int"}, - "https_port": {"key": "properties.httpsPort", "type": "int"}, - "origin_host_header": {"key": "properties.originHostHeader", "type": "str"}, - "priority": {"key": "properties.priority", "type": "int"}, - "weight": {"key": "properties.weight", "type": "int"}, - "enabled": {"key": "properties.enabled", "type": "bool"}, - "private_link_alias": {"key": "properties.privateLinkAlias", "type": "str"}, - "private_link_resource_id": {"key": "properties.privateLinkResourceId", "type": "str"}, - "private_link_location": {"key": "properties.privateLinkLocation", "type": "str"}, - "private_link_approval_message": {"key": "properties.privateLinkApprovalMessage", "type": "str"}, - "resource_state": {"key": "properties.resourceState", "type": "str"}, - "provisioning_state": {"key": "properties.provisioningState", "type": "str"}, - "private_endpoint_status": {"key": "properties.privateEndpointStatus", "type": "str"}, - } - - def __init__( - self, - *, - host_name: Optional[str] = None, - http_port: Optional[int] = None, - https_port: Optional[int] = None, - origin_host_header: Optional[str] = None, - priority: Optional[int] = None, - weight: Optional[int] = None, - enabled: Optional[bool] = None, - private_link_alias: Optional[str] = None, - private_link_resource_id: Optional[str] = None, - private_link_location: Optional[str] = None, - private_link_approval_message: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword host_name: The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses - are supported.This should be unique across all origins in an endpoint. - :paramtype host_name: str - :keyword http_port: The value of the HTTP port. Must be between 1 and 65535. - :paramtype http_port: int - :keyword https_port: The value of the HTTPS port. Must be between 1 and 65535. - :paramtype https_port: int - :keyword origin_host_header: The host header value sent to the origin with each request. If you - leave this blank, the request hostname determines this value. Azure CDN origins, such as Web - Apps, Blob Storage, and Cloud Services require this host header value to match the origin - hostname by default. This overrides the host header defined at Endpoint. - :paramtype origin_host_header: str - :keyword priority: Priority of origin in given origin group for load balancing. Higher - priorities will not be used for load balancing if any lower priority origin is healthy.Must be - between 1 and 5. - :paramtype priority: int - :keyword weight: Weight of the origin in given origin group for load balancing. Must be between - 1 and 1000. - :paramtype weight: int - :keyword enabled: Origin is enabled for load balancing or not. - :paramtype enabled: bool - :keyword private_link_alias: The Alias of the Private Link resource. Populating this optional - field indicates that this origin is 'Private'. - :paramtype private_link_alias: str - :keyword private_link_resource_id: The Resource Id of the Private Link resource. Populating - this optional field indicates that this backend is 'Private'. - :paramtype private_link_resource_id: str - :keyword private_link_location: The location of the Private Link resource. Required only if - 'privateLinkResourceId' is populated. - :paramtype private_link_location: str - :keyword private_link_approval_message: A custom message to be included in the approval request - to connect to the Private Link. - :paramtype private_link_approval_message: str - """ - super().__init__(**kwargs) - self.host_name = host_name - self.http_port = http_port - self.https_port = https_port - self.origin_host_header = origin_host_header - self.priority = priority - self.weight = weight - self.enabled = enabled - self.private_link_alias = private_link_alias - self.private_link_resource_id = private_link_resource_id - self.private_link_location = private_link_location - self.private_link_approval_message = private_link_approval_message - self.resource_state: Optional[Union[str, "_models.OriginResourceState"]] = None - self.provisioning_state: Optional[Union[str, "_models.OriginProvisioningState"]] = None - self.private_endpoint_status: Optional[Union[str, "_models.PrivateEndpointStatus"]] = None - - -class OriginAuthenticationProperties(_serialization.Model): - """The JSON object that contains the properties of the origin authentication settings. - - :ivar type: The type of the authentication for the origin. Known values are: - "SystemAssignedIdentity" and "UserAssignedIdentity". - :vartype type: str or ~azure.mgmt.cdn.models.OriginAuthenticationType - :ivar user_assigned_identity: The user assigned managed identity to use for the origin - authentication if type is UserAssignedIdentity. - :vartype user_assigned_identity: ~azure.mgmt.cdn.models.ResourceReference - :ivar scope: The scope used when requesting token from Microsoft Entra. For example, for Azure - Blob Storage, scope could be "https://storage.azure.com/.default". - :vartype scope: str - """ - - _attribute_map = { - "type": {"key": "type", "type": "str"}, - "user_assigned_identity": {"key": "userAssignedIdentity", "type": "ResourceReference"}, - "scope": {"key": "scope", "type": "str"}, - } - - def __init__( - self, - *, - type: Optional[Union[str, "_models.OriginAuthenticationType"]] = None, - user_assigned_identity: Optional["_models.ResourceReference"] = None, - scope: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword type: The type of the authentication for the origin. Known values are: - "SystemAssignedIdentity" and "UserAssignedIdentity". - :paramtype type: str or ~azure.mgmt.cdn.models.OriginAuthenticationType - :keyword user_assigned_identity: The user assigned managed identity to use for the origin - authentication if type is UserAssignedIdentity. - :paramtype user_assigned_identity: ~azure.mgmt.cdn.models.ResourceReference - :keyword scope: The scope used when requesting token from Microsoft Entra. For example, for - Azure Blob Storage, scope could be "https://storage.azure.com/.default". - :paramtype scope: str - """ - super().__init__(**kwargs) - self.type = type - self.user_assigned_identity = user_assigned_identity - self.scope = scope - - -class OriginGroup(ProxyResource): - """Origin group comprising of origins is used for load balancing to origins when the content - cannot be served from CDN. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. E.g. - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy - information. - :vartype system_data: ~azure.mgmt.cdn.models.SystemData - :ivar health_probe_settings: Health probe settings to the origin that is used to determine the - health of the origin. - :vartype health_probe_settings: ~azure.mgmt.cdn.models.HealthProbeParameters - :ivar origins: The source of the content being delivered via CDN within given origin group. - :vartype origins: list[~azure.mgmt.cdn.models.ResourceReference] - :ivar traffic_restoration_time_to_healed_or_new_endpoints_in_minutes: Time in minutes to shift - the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new - endpoint is added. Default is 10 mins. This property is currently not supported. - :vartype traffic_restoration_time_to_healed_or_new_endpoints_in_minutes: int - :ivar response_based_origin_error_detection_settings: The JSON object that contains the - properties to determine origin health using real requests/responses. This property is currently - not supported. - :vartype response_based_origin_error_detection_settings: - ~azure.mgmt.cdn.models.ResponseBasedOriginErrorDetectionParameters - :ivar resource_state: Resource status of the origin group. Known values are: "Creating", - "Active", and "Deleting". - :vartype resource_state: str or ~azure.mgmt.cdn.models.OriginGroupResourceState - :ivar provisioning_state: Provisioning status of the origin group. Known values are: - "Succeeded", "Failed", "Updating", "Deleting", and "Creating". - :vartype provisioning_state: str or ~azure.mgmt.cdn.models.OriginGroupProvisioningState - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "system_data": {"readonly": True}, - "traffic_restoration_time_to_healed_or_new_endpoints_in_minutes": {"maximum": 50, "minimum": 0}, - "resource_state": {"readonly": True}, - "provisioning_state": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "system_data": {"key": "systemData", "type": "SystemData"}, - "health_probe_settings": {"key": "properties.healthProbeSettings", "type": "HealthProbeParameters"}, - "origins": {"key": "properties.origins", "type": "[ResourceReference]"}, - "traffic_restoration_time_to_healed_or_new_endpoints_in_minutes": { - "key": "properties.trafficRestorationTimeToHealedOrNewEndpointsInMinutes", - "type": "int", - }, - "response_based_origin_error_detection_settings": { - "key": "properties.responseBasedOriginErrorDetectionSettings", - "type": "ResponseBasedOriginErrorDetectionParameters", - }, - "resource_state": {"key": "properties.resourceState", "type": "str"}, - "provisioning_state": {"key": "properties.provisioningState", "type": "str"}, - } - - def __init__( - self, - *, - health_probe_settings: Optional["_models.HealthProbeParameters"] = None, - origins: Optional[list["_models.ResourceReference"]] = None, - traffic_restoration_time_to_healed_or_new_endpoints_in_minutes: Optional[int] = None, - response_based_origin_error_detection_settings: Optional[ - "_models.ResponseBasedOriginErrorDetectionParameters" - ] = None, - **kwargs: Any - ) -> None: - """ - :keyword health_probe_settings: Health probe settings to the origin that is used to determine - the health of the origin. - :paramtype health_probe_settings: ~azure.mgmt.cdn.models.HealthProbeParameters - :keyword origins: The source of the content being delivered via CDN within given origin group. - :paramtype origins: list[~azure.mgmt.cdn.models.ResourceReference] - :keyword traffic_restoration_time_to_healed_or_new_endpoints_in_minutes: Time in minutes to - shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new - endpoint is added. Default is 10 mins. This property is currently not supported. - :paramtype traffic_restoration_time_to_healed_or_new_endpoints_in_minutes: int - :keyword response_based_origin_error_detection_settings: The JSON object that contains the - properties to determine origin health using real requests/responses. This property is currently - not supported. - :paramtype response_based_origin_error_detection_settings: - ~azure.mgmt.cdn.models.ResponseBasedOriginErrorDetectionParameters - """ - super().__init__(**kwargs) - self.health_probe_settings = health_probe_settings - self.origins = origins - self.traffic_restoration_time_to_healed_or_new_endpoints_in_minutes = ( - traffic_restoration_time_to_healed_or_new_endpoints_in_minutes - ) - self.response_based_origin_error_detection_settings = response_based_origin_error_detection_settings - self.resource_state: Optional[Union[str, "_models.OriginGroupResourceState"]] = None - self.provisioning_state: Optional[Union[str, "_models.OriginGroupProvisioningState"]] = None - - -class OriginGroupListResult(_serialization.Model): - """Result of the request to list origin groups. It contains a list of origin groups objects and a - URL link to get the next set of results. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: List of CDN origin groups within an endpoint. - :vartype value: list[~azure.mgmt.cdn.models.OriginGroup] - :ivar next_link: URL to get the next set of origin objects if there are any. - :vartype next_link: str - """ - - _validation = { - "value": {"readonly": True}, - } - - _attribute_map = { - "value": {"key": "value", "type": "[OriginGroup]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__(self, *, next_link: Optional[str] = None, **kwargs: Any) -> None: - """ - :keyword next_link: URL to get the next set of origin objects if there are any. - :paramtype next_link: str - """ - super().__init__(**kwargs) - self.value: Optional[list["_models.OriginGroup"]] = None - self.next_link = next_link - - -class OriginGroupOverride(_serialization.Model): - """Defines the parameters for the origin group override configuration. - - :ivar origin_group: defines the OriginGroup that would override the DefaultOriginGroup on - route. - :vartype origin_group: ~azure.mgmt.cdn.models.ResourceReference - :ivar forwarding_protocol: Protocol this rule will use when forwarding traffic to backends. - Known values are: "HttpOnly", "HttpsOnly", and "MatchRequest". - :vartype forwarding_protocol: str or ~azure.mgmt.cdn.models.ForwardingProtocol - """ - - _attribute_map = { - "origin_group": {"key": "originGroup", "type": "ResourceReference"}, - "forwarding_protocol": {"key": "forwardingProtocol", "type": "str"}, - } - - def __init__( - self, - *, - origin_group: Optional["_models.ResourceReference"] = None, - forwarding_protocol: Optional[Union[str, "_models.ForwardingProtocol"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword origin_group: defines the OriginGroup that would override the DefaultOriginGroup on - route. - :paramtype origin_group: ~azure.mgmt.cdn.models.ResourceReference - :keyword forwarding_protocol: Protocol this rule will use when forwarding traffic to backends. - Known values are: "HttpOnly", "HttpsOnly", and "MatchRequest". - :paramtype forwarding_protocol: str or ~azure.mgmt.cdn.models.ForwardingProtocol - """ - super().__init__(**kwargs) - self.origin_group = origin_group - self.forwarding_protocol = forwarding_protocol - - -class OriginGroupOverrideAction(DeliveryRuleAction): - """Defines the origin group override action for the delivery rule. - - All required parameters must be populated in order to send to server. - - :ivar name: The name of the action for the delivery rule. Required. Known values are: - "CacheExpiration", "CacheKeyQueryString", "ModifyRequestHeader", "ModifyResponseHeader", - "UrlRedirect", "UrlRewrite", "UrlSigning", "OriginGroupOverride", and - "RouteConfigurationOverride". - :vartype name: str or ~azure.mgmt.cdn.models.DeliveryRuleActionEnum - :ivar parameters: Defines the parameters for the action. Required. - :vartype parameters: ~azure.mgmt.cdn.models.OriginGroupOverrideActionParameters - """ - - _validation = { - "name": {"required": True}, - "parameters": {"required": True}, - } - - _attribute_map = { - "name": {"key": "name", "type": "str"}, - "parameters": {"key": "parameters", "type": "OriginGroupOverrideActionParameters"}, - } - - def __init__(self, *, parameters: "_models.OriginGroupOverrideActionParameters", **kwargs: Any) -> None: - """ - :keyword parameters: Defines the parameters for the action. Required. - :paramtype parameters: ~azure.mgmt.cdn.models.OriginGroupOverrideActionParameters - """ - super().__init__(**kwargs) - self.name: str = "OriginGroupOverride" - self.parameters = parameters - - -class OriginGroupOverrideActionParameters(DeliveryRuleActionParameters): - """Defines the parameters for the origin group override action. - - All required parameters must be populated in order to send to server. - - :ivar type_name: Required. Known values are: "DeliveryRuleUrlRedirectActionParameters", - "DeliveryRuleUrlSigningActionParameters", "DeliveryRuleOriginGroupOverrideActionParameters", - "DeliveryRuleUrlRewriteActionParameters", "DeliveryRuleHeaderActionParameters", - "DeliveryRuleCacheExpirationActionParameters", - "DeliveryRuleCacheKeyQueryStringBehaviorActionParameters", and - "DeliveryRuleRouteConfigurationOverrideActionParameters". - :vartype type_name: str or ~azure.mgmt.cdn.models.DeliveryRuleActionParametersType - :ivar origin_group: defines the OriginGroup that would override the DefaultOriginGroup. - Required. - :vartype origin_group: ~azure.mgmt.cdn.models.ResourceReference - """ - - _validation = { - "type_name": {"required": True}, - "origin_group": {"required": True}, - } - - _attribute_map = { - "type_name": {"key": "typeName", "type": "str"}, - "origin_group": {"key": "originGroup", "type": "ResourceReference"}, - } - - def __init__(self, *, origin_group: "_models.ResourceReference", **kwargs: Any) -> None: - """ - :keyword origin_group: defines the OriginGroup that would override the DefaultOriginGroup. - Required. - :paramtype origin_group: ~azure.mgmt.cdn.models.ResourceReference - """ - super().__init__(**kwargs) - self.type_name: str = "DeliveryRuleOriginGroupOverrideActionParameters" - self.origin_group = origin_group - - -class OriginGroupUpdatePropertiesParameters(_serialization.Model): - """The JSON object that contains the properties of the origin group. - - :ivar health_probe_settings: Health probe settings to the origin that is used to determine the - health of the origin. - :vartype health_probe_settings: ~azure.mgmt.cdn.models.HealthProbeParameters - :ivar origins: The source of the content being delivered via CDN within given origin group. - :vartype origins: list[~azure.mgmt.cdn.models.ResourceReference] - :ivar traffic_restoration_time_to_healed_or_new_endpoints_in_minutes: Time in minutes to shift - the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new - endpoint is added. Default is 10 mins. This property is currently not supported. - :vartype traffic_restoration_time_to_healed_or_new_endpoints_in_minutes: int - :ivar response_based_origin_error_detection_settings: The JSON object that contains the - properties to determine origin health using real requests/responses. This property is currently - not supported. - :vartype response_based_origin_error_detection_settings: - ~azure.mgmt.cdn.models.ResponseBasedOriginErrorDetectionParameters - """ - - _validation = { - "traffic_restoration_time_to_healed_or_new_endpoints_in_minutes": {"maximum": 50, "minimum": 0}, - } - - _attribute_map = { - "health_probe_settings": {"key": "healthProbeSettings", "type": "HealthProbeParameters"}, - "origins": {"key": "origins", "type": "[ResourceReference]"}, - "traffic_restoration_time_to_healed_or_new_endpoints_in_minutes": { - "key": "trafficRestorationTimeToHealedOrNewEndpointsInMinutes", - "type": "int", - }, - "response_based_origin_error_detection_settings": { - "key": "responseBasedOriginErrorDetectionSettings", - "type": "ResponseBasedOriginErrorDetectionParameters", - }, - } - - def __init__( - self, - *, - health_probe_settings: Optional["_models.HealthProbeParameters"] = None, - origins: Optional[list["_models.ResourceReference"]] = None, - traffic_restoration_time_to_healed_or_new_endpoints_in_minutes: Optional[int] = None, - response_based_origin_error_detection_settings: Optional[ - "_models.ResponseBasedOriginErrorDetectionParameters" - ] = None, - **kwargs: Any - ) -> None: - """ - :keyword health_probe_settings: Health probe settings to the origin that is used to determine - the health of the origin. - :paramtype health_probe_settings: ~azure.mgmt.cdn.models.HealthProbeParameters - :keyword origins: The source of the content being delivered via CDN within given origin group. - :paramtype origins: list[~azure.mgmt.cdn.models.ResourceReference] - :keyword traffic_restoration_time_to_healed_or_new_endpoints_in_minutes: Time in minutes to - shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new - endpoint is added. Default is 10 mins. This property is currently not supported. - :paramtype traffic_restoration_time_to_healed_or_new_endpoints_in_minutes: int - :keyword response_based_origin_error_detection_settings: The JSON object that contains the - properties to determine origin health using real requests/responses. This property is currently - not supported. - :paramtype response_based_origin_error_detection_settings: - ~azure.mgmt.cdn.models.ResponseBasedOriginErrorDetectionParameters - """ - super().__init__(**kwargs) - self.health_probe_settings = health_probe_settings - self.origins = origins - self.traffic_restoration_time_to_healed_or_new_endpoints_in_minutes = ( - traffic_restoration_time_to_healed_or_new_endpoints_in_minutes - ) - self.response_based_origin_error_detection_settings = response_based_origin_error_detection_settings - - -class OriginGroupProperties(OriginGroupUpdatePropertiesParameters): - """The JSON object that contains the properties of the origin group. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar health_probe_settings: Health probe settings to the origin that is used to determine the - health of the origin. - :vartype health_probe_settings: ~azure.mgmt.cdn.models.HealthProbeParameters - :ivar origins: The source of the content being delivered via CDN within given origin group. - :vartype origins: list[~azure.mgmt.cdn.models.ResourceReference] - :ivar traffic_restoration_time_to_healed_or_new_endpoints_in_minutes: Time in minutes to shift - the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new - endpoint is added. Default is 10 mins. This property is currently not supported. - :vartype traffic_restoration_time_to_healed_or_new_endpoints_in_minutes: int - :ivar response_based_origin_error_detection_settings: The JSON object that contains the - properties to determine origin health using real requests/responses. This property is currently - not supported. - :vartype response_based_origin_error_detection_settings: - ~azure.mgmt.cdn.models.ResponseBasedOriginErrorDetectionParameters - :ivar resource_state: Resource status of the origin group. Known values are: "Creating", - "Active", and "Deleting". - :vartype resource_state: str or ~azure.mgmt.cdn.models.OriginGroupResourceState - :ivar provisioning_state: Provisioning status of the origin group. Known values are: - "Succeeded", "Failed", "Updating", "Deleting", and "Creating". - :vartype provisioning_state: str or ~azure.mgmt.cdn.models.OriginGroupProvisioningState - """ - - _validation = { - "traffic_restoration_time_to_healed_or_new_endpoints_in_minutes": {"maximum": 50, "minimum": 0}, - "resource_state": {"readonly": True}, - "provisioning_state": {"readonly": True}, - } - - _attribute_map = { - "health_probe_settings": {"key": "healthProbeSettings", "type": "HealthProbeParameters"}, - "origins": {"key": "origins", "type": "[ResourceReference]"}, - "traffic_restoration_time_to_healed_or_new_endpoints_in_minutes": { - "key": "trafficRestorationTimeToHealedOrNewEndpointsInMinutes", - "type": "int", - }, - "response_based_origin_error_detection_settings": { - "key": "responseBasedOriginErrorDetectionSettings", - "type": "ResponseBasedOriginErrorDetectionParameters", - }, - "resource_state": {"key": "resourceState", "type": "str"}, - "provisioning_state": {"key": "provisioningState", "type": "str"}, - } - - def __init__( - self, - *, - health_probe_settings: Optional["_models.HealthProbeParameters"] = None, - origins: Optional[list["_models.ResourceReference"]] = None, - traffic_restoration_time_to_healed_or_new_endpoints_in_minutes: Optional[int] = None, - response_based_origin_error_detection_settings: Optional[ - "_models.ResponseBasedOriginErrorDetectionParameters" - ] = None, - **kwargs: Any - ) -> None: - """ - :keyword health_probe_settings: Health probe settings to the origin that is used to determine - the health of the origin. - :paramtype health_probe_settings: ~azure.mgmt.cdn.models.HealthProbeParameters - :keyword origins: The source of the content being delivered via CDN within given origin group. - :paramtype origins: list[~azure.mgmt.cdn.models.ResourceReference] - :keyword traffic_restoration_time_to_healed_or_new_endpoints_in_minutes: Time in minutes to - shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new - endpoint is added. Default is 10 mins. This property is currently not supported. - :paramtype traffic_restoration_time_to_healed_or_new_endpoints_in_minutes: int - :keyword response_based_origin_error_detection_settings: The JSON object that contains the - properties to determine origin health using real requests/responses. This property is currently - not supported. - :paramtype response_based_origin_error_detection_settings: - ~azure.mgmt.cdn.models.ResponseBasedOriginErrorDetectionParameters - """ - super().__init__( - health_probe_settings=health_probe_settings, - origins=origins, - traffic_restoration_time_to_healed_or_new_endpoints_in_minutes=traffic_restoration_time_to_healed_or_new_endpoints_in_minutes, - response_based_origin_error_detection_settings=response_based_origin_error_detection_settings, - **kwargs - ) - self.resource_state: Optional[Union[str, "_models.OriginGroupResourceState"]] = None - self.provisioning_state: Optional[Union[str, "_models.OriginGroupProvisioningState"]] = None - - -class OriginGroupUpdateParameters(_serialization.Model): - """Origin group properties needed for origin group creation or update. - - :ivar health_probe_settings: Health probe settings to the origin that is used to determine the - health of the origin. - :vartype health_probe_settings: ~azure.mgmt.cdn.models.HealthProbeParameters - :ivar origins: The source of the content being delivered via CDN within given origin group. - :vartype origins: list[~azure.mgmt.cdn.models.ResourceReference] - :ivar traffic_restoration_time_to_healed_or_new_endpoints_in_minutes: Time in minutes to shift - the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new - endpoint is added. Default is 10 mins. This property is currently not supported. - :vartype traffic_restoration_time_to_healed_or_new_endpoints_in_minutes: int - :ivar response_based_origin_error_detection_settings: The JSON object that contains the - properties to determine origin health using real requests/responses. This property is currently - not supported. - :vartype response_based_origin_error_detection_settings: - ~azure.mgmt.cdn.models.ResponseBasedOriginErrorDetectionParameters - """ - - _validation = { - "traffic_restoration_time_to_healed_or_new_endpoints_in_minutes": {"maximum": 50, "minimum": 0}, - } - - _attribute_map = { - "health_probe_settings": {"key": "properties.healthProbeSettings", "type": "HealthProbeParameters"}, - "origins": {"key": "properties.origins", "type": "[ResourceReference]"}, - "traffic_restoration_time_to_healed_or_new_endpoints_in_minutes": { - "key": "properties.trafficRestorationTimeToHealedOrNewEndpointsInMinutes", - "type": "int", - }, - "response_based_origin_error_detection_settings": { - "key": "properties.responseBasedOriginErrorDetectionSettings", - "type": "ResponseBasedOriginErrorDetectionParameters", - }, - } - - def __init__( - self, - *, - health_probe_settings: Optional["_models.HealthProbeParameters"] = None, - origins: Optional[list["_models.ResourceReference"]] = None, - traffic_restoration_time_to_healed_or_new_endpoints_in_minutes: Optional[int] = None, - response_based_origin_error_detection_settings: Optional[ - "_models.ResponseBasedOriginErrorDetectionParameters" - ] = None, - **kwargs: Any - ) -> None: - """ - :keyword health_probe_settings: Health probe settings to the origin that is used to determine - the health of the origin. - :paramtype health_probe_settings: ~azure.mgmt.cdn.models.HealthProbeParameters - :keyword origins: The source of the content being delivered via CDN within given origin group. - :paramtype origins: list[~azure.mgmt.cdn.models.ResourceReference] - :keyword traffic_restoration_time_to_healed_or_new_endpoints_in_minutes: Time in minutes to - shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new - endpoint is added. Default is 10 mins. This property is currently not supported. - :paramtype traffic_restoration_time_to_healed_or_new_endpoints_in_minutes: int - :keyword response_based_origin_error_detection_settings: The JSON object that contains the - properties to determine origin health using real requests/responses. This property is currently - not supported. - :paramtype response_based_origin_error_detection_settings: - ~azure.mgmt.cdn.models.ResponseBasedOriginErrorDetectionParameters - """ - super().__init__(**kwargs) - self.health_probe_settings = health_probe_settings - self.origins = origins - self.traffic_restoration_time_to_healed_or_new_endpoints_in_minutes = ( - traffic_restoration_time_to_healed_or_new_endpoints_in_minutes - ) - self.response_based_origin_error_detection_settings = response_based_origin_error_detection_settings - - -class OriginListResult(_serialization.Model): - """Result of the request to list origins. It contains a list of origin objects and a URL link to - get the next set of results. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: List of CDN origins within an endpoint. - :vartype value: list[~azure.mgmt.cdn.models.Origin] - :ivar next_link: URL to get the next set of origin objects if there are any. - :vartype next_link: str - """ - - _validation = { - "value": {"readonly": True}, - } - - _attribute_map = { - "value": {"key": "value", "type": "[Origin]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__(self, *, next_link: Optional[str] = None, **kwargs: Any) -> None: - """ - :keyword next_link: URL to get the next set of origin objects if there are any. - :paramtype next_link: str - """ - super().__init__(**kwargs) - self.value: Optional[list["_models.Origin"]] = None - self.next_link = next_link - - -class OriginUpdatePropertiesParameters(_serialization.Model): - """The JSON object that contains the properties of the origin. - - :ivar host_name: The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses - are supported.This should be unique across all origins in an endpoint. - :vartype host_name: str - :ivar http_port: The value of the HTTP port. Must be between 1 and 65535. - :vartype http_port: int - :ivar https_port: The value of the HTTPS port. Must be between 1 and 65535. - :vartype https_port: int - :ivar origin_host_header: The host header value sent to the origin with each request. If you - leave this blank, the request hostname determines this value. Azure CDN origins, such as Web - Apps, Blob Storage, and Cloud Services require this host header value to match the origin - hostname by default. This overrides the host header defined at Endpoint. - :vartype origin_host_header: str - :ivar priority: Priority of origin in given origin group for load balancing. Higher priorities - will not be used for load balancing if any lower priority origin is healthy.Must be between 1 - and 5. - :vartype priority: int - :ivar weight: Weight of the origin in given origin group for load balancing. Must be between 1 - and 1000. - :vartype weight: int - :ivar enabled: Origin is enabled for load balancing or not. - :vartype enabled: bool - :ivar private_link_alias: The Alias of the Private Link resource. Populating this optional - field indicates that this origin is 'Private'. - :vartype private_link_alias: str - :ivar private_link_resource_id: The Resource Id of the Private Link resource. Populating this - optional field indicates that this backend is 'Private'. - :vartype private_link_resource_id: str - :ivar private_link_location: The location of the Private Link resource. Required only if - 'privateLinkResourceId' is populated. - :vartype private_link_location: str - :ivar private_link_approval_message: A custom message to be included in the approval request to - connect to the Private Link. - :vartype private_link_approval_message: str - """ - - _validation = { - "http_port": {"maximum": 65535, "minimum": 1}, - "https_port": {"maximum": 65535, "minimum": 1}, - "priority": {"maximum": 5, "minimum": 1}, - "weight": {"maximum": 1000, "minimum": 1}, - } - - _attribute_map = { - "host_name": {"key": "hostName", "type": "str"}, - "http_port": {"key": "httpPort", "type": "int"}, - "https_port": {"key": "httpsPort", "type": "int"}, - "origin_host_header": {"key": "originHostHeader", "type": "str"}, - "priority": {"key": "priority", "type": "int"}, - "weight": {"key": "weight", "type": "int"}, - "enabled": {"key": "enabled", "type": "bool"}, - "private_link_alias": {"key": "privateLinkAlias", "type": "str"}, - "private_link_resource_id": {"key": "privateLinkResourceId", "type": "str"}, - "private_link_location": {"key": "privateLinkLocation", "type": "str"}, - "private_link_approval_message": {"key": "privateLinkApprovalMessage", "type": "str"}, - } - - def __init__( - self, - *, - host_name: Optional[str] = None, - http_port: Optional[int] = None, - https_port: Optional[int] = None, - origin_host_header: Optional[str] = None, - priority: Optional[int] = None, - weight: Optional[int] = None, - enabled: Optional[bool] = None, - private_link_alias: Optional[str] = None, - private_link_resource_id: Optional[str] = None, - private_link_location: Optional[str] = None, - private_link_approval_message: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword host_name: The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses - are supported.This should be unique across all origins in an endpoint. - :paramtype host_name: str - :keyword http_port: The value of the HTTP port. Must be between 1 and 65535. - :paramtype http_port: int - :keyword https_port: The value of the HTTPS port. Must be between 1 and 65535. - :paramtype https_port: int - :keyword origin_host_header: The host header value sent to the origin with each request. If you - leave this blank, the request hostname determines this value. Azure CDN origins, such as Web - Apps, Blob Storage, and Cloud Services require this host header value to match the origin - hostname by default. This overrides the host header defined at Endpoint. - :paramtype origin_host_header: str - :keyword priority: Priority of origin in given origin group for load balancing. Higher - priorities will not be used for load balancing if any lower priority origin is healthy.Must be - between 1 and 5. - :paramtype priority: int - :keyword weight: Weight of the origin in given origin group for load balancing. Must be between - 1 and 1000. - :paramtype weight: int - :keyword enabled: Origin is enabled for load balancing or not. - :paramtype enabled: bool - :keyword private_link_alias: The Alias of the Private Link resource. Populating this optional - field indicates that this origin is 'Private'. - :paramtype private_link_alias: str - :keyword private_link_resource_id: The Resource Id of the Private Link resource. Populating - this optional field indicates that this backend is 'Private'. - :paramtype private_link_resource_id: str - :keyword private_link_location: The location of the Private Link resource. Required only if - 'privateLinkResourceId' is populated. - :paramtype private_link_location: str - :keyword private_link_approval_message: A custom message to be included in the approval request - to connect to the Private Link. - :paramtype private_link_approval_message: str - """ - super().__init__(**kwargs) - self.host_name = host_name - self.http_port = http_port - self.https_port = https_port - self.origin_host_header = origin_host_header - self.priority = priority - self.weight = weight - self.enabled = enabled - self.private_link_alias = private_link_alias - self.private_link_resource_id = private_link_resource_id - self.private_link_location = private_link_location - self.private_link_approval_message = private_link_approval_message - - -class OriginProperties(OriginUpdatePropertiesParameters): - """The JSON object that contains the properties of the origin. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar host_name: The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses - are supported.This should be unique across all origins in an endpoint. - :vartype host_name: str - :ivar http_port: The value of the HTTP port. Must be between 1 and 65535. - :vartype http_port: int - :ivar https_port: The value of the HTTPS port. Must be between 1 and 65535. - :vartype https_port: int - :ivar origin_host_header: The host header value sent to the origin with each request. If you - leave this blank, the request hostname determines this value. Azure CDN origins, such as Web - Apps, Blob Storage, and Cloud Services require this host header value to match the origin - hostname by default. This overrides the host header defined at Endpoint. - :vartype origin_host_header: str - :ivar priority: Priority of origin in given origin group for load balancing. Higher priorities - will not be used for load balancing if any lower priority origin is healthy.Must be between 1 - and 5. - :vartype priority: int - :ivar weight: Weight of the origin in given origin group for load balancing. Must be between 1 - and 1000. - :vartype weight: int - :ivar enabled: Origin is enabled for load balancing or not. - :vartype enabled: bool - :ivar private_link_alias: The Alias of the Private Link resource. Populating this optional - field indicates that this origin is 'Private'. - :vartype private_link_alias: str - :ivar private_link_resource_id: The Resource Id of the Private Link resource. Populating this - optional field indicates that this backend is 'Private'. - :vartype private_link_resource_id: str - :ivar private_link_location: The location of the Private Link resource. Required only if - 'privateLinkResourceId' is populated. - :vartype private_link_location: str - :ivar private_link_approval_message: A custom message to be included in the approval request to - connect to the Private Link. - :vartype private_link_approval_message: str - :ivar resource_state: Resource status of the origin. Known values are: "Creating", "Active", - and "Deleting". - :vartype resource_state: str or ~azure.mgmt.cdn.models.OriginResourceState - :ivar provisioning_state: Provisioning status of the origin. Known values are: "Succeeded", - "Failed", "Updating", "Deleting", and "Creating". - :vartype provisioning_state: str or ~azure.mgmt.cdn.models.OriginProvisioningState - :ivar private_endpoint_status: The approval status for the connection to the Private Link. - Known values are: "Pending", "Approved", "Rejected", "Disconnected", and "Timeout". - :vartype private_endpoint_status: str or ~azure.mgmt.cdn.models.PrivateEndpointStatus - """ - - _validation = { - "http_port": {"maximum": 65535, "minimum": 1}, - "https_port": {"maximum": 65535, "minimum": 1}, - "priority": {"maximum": 5, "minimum": 1}, - "weight": {"maximum": 1000, "minimum": 1}, - "resource_state": {"readonly": True}, - "provisioning_state": {"readonly": True}, - "private_endpoint_status": {"readonly": True}, - } - - _attribute_map = { - "host_name": {"key": "hostName", "type": "str"}, - "http_port": {"key": "httpPort", "type": "int"}, - "https_port": {"key": "httpsPort", "type": "int"}, - "origin_host_header": {"key": "originHostHeader", "type": "str"}, - "priority": {"key": "priority", "type": "int"}, - "weight": {"key": "weight", "type": "int"}, - "enabled": {"key": "enabled", "type": "bool"}, - "private_link_alias": {"key": "privateLinkAlias", "type": "str"}, - "private_link_resource_id": {"key": "privateLinkResourceId", "type": "str"}, - "private_link_location": {"key": "privateLinkLocation", "type": "str"}, - "private_link_approval_message": {"key": "privateLinkApprovalMessage", "type": "str"}, - "resource_state": {"key": "resourceState", "type": "str"}, - "provisioning_state": {"key": "provisioningState", "type": "str"}, - "private_endpoint_status": {"key": "privateEndpointStatus", "type": "str"}, - } - - def __init__( - self, - *, - host_name: Optional[str] = None, - http_port: Optional[int] = None, - https_port: Optional[int] = None, - origin_host_header: Optional[str] = None, - priority: Optional[int] = None, - weight: Optional[int] = None, - enabled: Optional[bool] = None, - private_link_alias: Optional[str] = None, - private_link_resource_id: Optional[str] = None, - private_link_location: Optional[str] = None, - private_link_approval_message: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword host_name: The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses - are supported.This should be unique across all origins in an endpoint. - :paramtype host_name: str - :keyword http_port: The value of the HTTP port. Must be between 1 and 65535. - :paramtype http_port: int - :keyword https_port: The value of the HTTPS port. Must be between 1 and 65535. - :paramtype https_port: int - :keyword origin_host_header: The host header value sent to the origin with each request. If you - leave this blank, the request hostname determines this value. Azure CDN origins, such as Web - Apps, Blob Storage, and Cloud Services require this host header value to match the origin - hostname by default. This overrides the host header defined at Endpoint. - :paramtype origin_host_header: str - :keyword priority: Priority of origin in given origin group for load balancing. Higher - priorities will not be used for load balancing if any lower priority origin is healthy.Must be - between 1 and 5. - :paramtype priority: int - :keyword weight: Weight of the origin in given origin group for load balancing. Must be between - 1 and 1000. - :paramtype weight: int - :keyword enabled: Origin is enabled for load balancing or not. - :paramtype enabled: bool - :keyword private_link_alias: The Alias of the Private Link resource. Populating this optional - field indicates that this origin is 'Private'. - :paramtype private_link_alias: str - :keyword private_link_resource_id: The Resource Id of the Private Link resource. Populating - this optional field indicates that this backend is 'Private'. - :paramtype private_link_resource_id: str - :keyword private_link_location: The location of the Private Link resource. Required only if - 'privateLinkResourceId' is populated. - :paramtype private_link_location: str - :keyword private_link_approval_message: A custom message to be included in the approval request - to connect to the Private Link. - :paramtype private_link_approval_message: str - """ - super().__init__( - host_name=host_name, - http_port=http_port, - https_port=https_port, - origin_host_header=origin_host_header, - priority=priority, - weight=weight, - enabled=enabled, - private_link_alias=private_link_alias, - private_link_resource_id=private_link_resource_id, - private_link_location=private_link_location, - private_link_approval_message=private_link_approval_message, - **kwargs - ) - self.resource_state: Optional[Union[str, "_models.OriginResourceState"]] = None - self.provisioning_state: Optional[Union[str, "_models.OriginProvisioningState"]] = None - self.private_endpoint_status: Optional[Union[str, "_models.PrivateEndpointStatus"]] = None - - -class OriginUpdateParameters(_serialization.Model): - """Origin properties needed for origin update. - - :ivar host_name: The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses - are supported.This should be unique across all origins in an endpoint. - :vartype host_name: str - :ivar http_port: The value of the HTTP port. Must be between 1 and 65535. - :vartype http_port: int - :ivar https_port: The value of the HTTPS port. Must be between 1 and 65535. - :vartype https_port: int - :ivar origin_host_header: The host header value sent to the origin with each request. If you - leave this blank, the request hostname determines this value. Azure CDN origins, such as Web - Apps, Blob Storage, and Cloud Services require this host header value to match the origin - hostname by default. This overrides the host header defined at Endpoint. - :vartype origin_host_header: str - :ivar priority: Priority of origin in given origin group for load balancing. Higher priorities - will not be used for load balancing if any lower priority origin is healthy.Must be between 1 - and 5. - :vartype priority: int - :ivar weight: Weight of the origin in given origin group for load balancing. Must be between 1 - and 1000. - :vartype weight: int - :ivar enabled: Origin is enabled for load balancing or not. - :vartype enabled: bool - :ivar private_link_alias: The Alias of the Private Link resource. Populating this optional - field indicates that this origin is 'Private'. - :vartype private_link_alias: str - :ivar private_link_resource_id: The Resource Id of the Private Link resource. Populating this - optional field indicates that this backend is 'Private'. - :vartype private_link_resource_id: str - :ivar private_link_location: The location of the Private Link resource. Required only if - 'privateLinkResourceId' is populated. - :vartype private_link_location: str - :ivar private_link_approval_message: A custom message to be included in the approval request to - connect to the Private Link. - :vartype private_link_approval_message: str - """ - - _validation = { - "http_port": {"maximum": 65535, "minimum": 1}, - "https_port": {"maximum": 65535, "minimum": 1}, - "priority": {"maximum": 5, "minimum": 1}, - "weight": {"maximum": 1000, "minimum": 1}, - } - - _attribute_map = { - "host_name": {"key": "properties.hostName", "type": "str"}, - "http_port": {"key": "properties.httpPort", "type": "int"}, - "https_port": {"key": "properties.httpsPort", "type": "int"}, - "origin_host_header": {"key": "properties.originHostHeader", "type": "str"}, - "priority": {"key": "properties.priority", "type": "int"}, - "weight": {"key": "properties.weight", "type": "int"}, - "enabled": {"key": "properties.enabled", "type": "bool"}, - "private_link_alias": {"key": "properties.privateLinkAlias", "type": "str"}, - "private_link_resource_id": {"key": "properties.privateLinkResourceId", "type": "str"}, - "private_link_location": {"key": "properties.privateLinkLocation", "type": "str"}, - "private_link_approval_message": {"key": "properties.privateLinkApprovalMessage", "type": "str"}, - } - - def __init__( - self, - *, - host_name: Optional[str] = None, - http_port: Optional[int] = None, - https_port: Optional[int] = None, - origin_host_header: Optional[str] = None, - priority: Optional[int] = None, - weight: Optional[int] = None, - enabled: Optional[bool] = None, - private_link_alias: Optional[str] = None, - private_link_resource_id: Optional[str] = None, - private_link_location: Optional[str] = None, - private_link_approval_message: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword host_name: The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses - are supported.This should be unique across all origins in an endpoint. - :paramtype host_name: str - :keyword http_port: The value of the HTTP port. Must be between 1 and 65535. - :paramtype http_port: int - :keyword https_port: The value of the HTTPS port. Must be between 1 and 65535. - :paramtype https_port: int - :keyword origin_host_header: The host header value sent to the origin with each request. If you - leave this blank, the request hostname determines this value. Azure CDN origins, such as Web - Apps, Blob Storage, and Cloud Services require this host header value to match the origin - hostname by default. This overrides the host header defined at Endpoint. - :paramtype origin_host_header: str - :keyword priority: Priority of origin in given origin group for load balancing. Higher - priorities will not be used for load balancing if any lower priority origin is healthy.Must be - between 1 and 5. - :paramtype priority: int - :keyword weight: Weight of the origin in given origin group for load balancing. Must be between - 1 and 1000. - :paramtype weight: int - :keyword enabled: Origin is enabled for load balancing or not. - :paramtype enabled: bool - :keyword private_link_alias: The Alias of the Private Link resource. Populating this optional - field indicates that this origin is 'Private'. - :paramtype private_link_alias: str - :keyword private_link_resource_id: The Resource Id of the Private Link resource. Populating - this optional field indicates that this backend is 'Private'. - :paramtype private_link_resource_id: str - :keyword private_link_location: The location of the Private Link resource. Required only if - 'privateLinkResourceId' is populated. - :paramtype private_link_location: str - :keyword private_link_approval_message: A custom message to be included in the approval request - to connect to the Private Link. - :paramtype private_link_approval_message: str - """ - super().__init__(**kwargs) - self.host_name = host_name - self.http_port = http_port - self.https_port = https_port - self.origin_host_header = origin_host_header - self.priority = priority - self.weight = weight - self.enabled = enabled - self.private_link_alias = private_link_alias - self.private_link_resource_id = private_link_resource_id - self.private_link_location = private_link_location - self.private_link_approval_message = private_link_approval_message - - -class PolicySettings(_serialization.Model): - """Defines contents of a web application firewall global configuration. - - :ivar enabled_state: describes if the policy is in enabled state or disabled state. Known - values are: "Disabled" and "Enabled". - :vartype enabled_state: str or ~azure.mgmt.cdn.models.PolicyEnabledState - :ivar mode: Describes if it is in detection mode or prevention mode at policy level. Known - values are: "Prevention" and "Detection". - :vartype mode: str or ~azure.mgmt.cdn.models.PolicyMode - :ivar default_redirect_url: If action type is redirect, this field represents the default - redirect URL for the client. - :vartype default_redirect_url: str - :ivar default_custom_block_response_status_code: If the action type is block, this field - defines the default customer overridable http response status code. Known values are: 200, 403, - 405, 406, and 429. - :vartype default_custom_block_response_status_code: int or - ~azure.mgmt.cdn.models.PolicySettingsDefaultCustomBlockResponseStatusCode - :ivar default_custom_block_response_body: If the action type is block, customer can override - the response body. The body must be specified in base64 encoding. - :vartype default_custom_block_response_body: str - """ - - _validation = { - "default_custom_block_response_body": { - "pattern": r"^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{4})$" - }, - } - - _attribute_map = { - "enabled_state": {"key": "enabledState", "type": "str"}, - "mode": {"key": "mode", "type": "str"}, - "default_redirect_url": {"key": "defaultRedirectUrl", "type": "str"}, - "default_custom_block_response_status_code": {"key": "defaultCustomBlockResponseStatusCode", "type": "int"}, - "default_custom_block_response_body": {"key": "defaultCustomBlockResponseBody", "type": "str"}, - } - - def __init__( - self, - *, - enabled_state: Optional[Union[str, "_models.PolicyEnabledState"]] = None, - mode: Optional[Union[str, "_models.PolicyMode"]] = None, - default_redirect_url: Optional[str] = None, - default_custom_block_response_status_code: Optional[ - Union[int, "_models.PolicySettingsDefaultCustomBlockResponseStatusCode"] - ] = None, - default_custom_block_response_body: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword enabled_state: describes if the policy is in enabled state or disabled state. Known - values are: "Disabled" and "Enabled". - :paramtype enabled_state: str or ~azure.mgmt.cdn.models.PolicyEnabledState - :keyword mode: Describes if it is in detection mode or prevention mode at policy level. Known - values are: "Prevention" and "Detection". - :paramtype mode: str or ~azure.mgmt.cdn.models.PolicyMode - :keyword default_redirect_url: If action type is redirect, this field represents the default - redirect URL for the client. - :paramtype default_redirect_url: str - :keyword default_custom_block_response_status_code: If the action type is block, this field - defines the default customer overridable http response status code. Known values are: 200, 403, - 405, 406, and 429. - :paramtype default_custom_block_response_status_code: int or - ~azure.mgmt.cdn.models.PolicySettingsDefaultCustomBlockResponseStatusCode - :keyword default_custom_block_response_body: If the action type is block, customer can override - the response body. The body must be specified in base64 encoding. - :paramtype default_custom_block_response_body: str - """ - super().__init__(**kwargs) - self.enabled_state = enabled_state - self.mode = mode - self.default_redirect_url = default_redirect_url - self.default_custom_block_response_status_code = default_custom_block_response_status_code - self.default_custom_block_response_body = default_custom_block_response_body - - -class PostArgsMatchConditionParameters(DeliveryRuleConditionParameters): - """Defines the parameters for PostArgs match conditions. - - All required parameters must be populated in order to send to server. - - :ivar type_name: Required. Known values are: "DeliveryRuleRemoteAddressConditionParameters", - "DeliveryRuleRequestMethodConditionParameters", "DeliveryRuleQueryStringConditionParameters", - "DeliveryRulePostArgsConditionParameters", "DeliveryRuleRequestUriConditionParameters", - "DeliveryRuleRequestHeaderConditionParameters", "DeliveryRuleRequestBodyConditionParameters", - "DeliveryRuleRequestSchemeConditionParameters", "DeliveryRuleUrlPathMatchConditionParameters", - "DeliveryRuleUrlFileExtensionMatchConditionParameters", - "DeliveryRuleUrlFilenameConditionParameters", "DeliveryRuleHttpVersionConditionParameters", - "DeliveryRuleCookiesConditionParameters", "DeliveryRuleIsDeviceConditionParameters", - "DeliveryRuleSocketAddrConditionParameters", "DeliveryRuleClientPortConditionParameters", - "DeliveryRuleServerPortConditionParameters", "DeliveryRuleHostNameConditionParameters", and - "DeliveryRuleSslProtocolConditionParameters". - :vartype type_name: str or ~azure.mgmt.cdn.models.DeliveryRuleConditionParametersType - :ivar selector: Name of PostArg to be matched. - :vartype selector: str - :ivar operator: Describes operator to be matched. Required. Known values are: "Any", "Equal", - "Contains", "BeginsWith", "EndsWith", "LessThan", "LessThanOrEqual", "GreaterThan", - "GreaterThanOrEqual", and "RegEx". - :vartype operator: str or ~azure.mgmt.cdn.models.PostArgsOperator - :ivar negate_condition: Describes if this is negate condition or not. - :vartype negate_condition: bool - :ivar match_values: The match value for the condition of the delivery rule. - :vartype match_values: list[str] - :ivar transforms: List of transforms. - :vartype transforms: list[str or ~azure.mgmt.cdn.models.Transform] - """ - - _validation = { - "type_name": {"required": True}, - "operator": {"required": True}, - } - - _attribute_map = { - "type_name": {"key": "typeName", "type": "str"}, - "selector": {"key": "selector", "type": "str"}, - "operator": {"key": "operator", "type": "str"}, - "negate_condition": {"key": "negateCondition", "type": "bool"}, - "match_values": {"key": "matchValues", "type": "[str]"}, - "transforms": {"key": "transforms", "type": "[str]"}, - } - - def __init__( - self, - *, - operator: Union[str, "_models.PostArgsOperator"], - selector: Optional[str] = None, - negate_condition: bool = False, - match_values: Optional[list[str]] = None, - transforms: Optional[list[Union[str, "_models.Transform"]]] = None, - **kwargs: Any - ) -> None: - """ - :keyword selector: Name of PostArg to be matched. - :paramtype selector: str - :keyword operator: Describes operator to be matched. Required. Known values are: "Any", - "Equal", "Contains", "BeginsWith", "EndsWith", "LessThan", "LessThanOrEqual", "GreaterThan", - "GreaterThanOrEqual", and "RegEx". - :paramtype operator: str or ~azure.mgmt.cdn.models.PostArgsOperator - :keyword negate_condition: Describes if this is negate condition or not. - :paramtype negate_condition: bool - :keyword match_values: The match value for the condition of the delivery rule. - :paramtype match_values: list[str] - :keyword transforms: List of transforms. - :paramtype transforms: list[str or ~azure.mgmt.cdn.models.Transform] - """ - super().__init__(**kwargs) - self.type_name: str = "DeliveryRulePostArgsConditionParameters" - self.selector = selector - self.operator = operator - self.negate_condition = negate_condition - self.match_values = match_values - self.transforms = transforms - - -class Profile(TrackedResource): - """A profile is a logical grouping of endpoints that share the same settings. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to server. - - :ivar id: Fully qualified resource ID for the resource. E.g. - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy - information. - :vartype system_data: ~azure.mgmt.cdn.models.SystemData - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - :ivar location: The geo-location where the resource lives. Required. - :vartype location: str - :ivar sku: The pricing tier (defines Azure Front Door Standard or Premium or a CDN provider, - feature list and rate) of the profile. Required. - :vartype sku: ~azure.mgmt.cdn.models.Sku - :ivar kind: Kind of the profile. Used by portal to differentiate traditional CDN profile and - new AFD profile. - :vartype kind: str - :ivar identity: Managed service identity (system assigned and/or user assigned identities). - :vartype identity: ~azure.mgmt.cdn.models.ManagedServiceIdentity - :ivar resource_state: Resource status of the profile. Known values are: "Creating", "Active", - "Deleting", "Disabled", "Migrating", "Migrated", "PendingMigrationCommit", - "CommittingMigration", and "AbortingMigration". - :vartype resource_state: str or ~azure.mgmt.cdn.models.ProfileResourceState - :ivar provisioning_state: Provisioning status of the profile. Known values are: "Succeeded", - "Failed", "Updating", "Deleting", and "Creating". - :vartype provisioning_state: str or ~azure.mgmt.cdn.models.ProfileProvisioningState - :ivar extended_properties: Key-Value pair representing additional properties for profiles. - :vartype extended_properties: dict[str, str] - :ivar front_door_id: The Id of the frontdoor. - :vartype front_door_id: str - :ivar origin_response_timeout_seconds: Send and receive timeout on forwarding request to the - origin. When timeout is reached, the request fails and returns. - :vartype origin_response_timeout_seconds: int - :ivar log_scrubbing: Defines rules that scrub sensitive fields in the Azure Front Door profile - logs. - :vartype log_scrubbing: ~azure.mgmt.cdn.models.ProfileLogScrubbing - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "system_data": {"readonly": True}, - "location": {"required": True}, - "sku": {"required": True}, - "kind": {"readonly": True}, - "resource_state": {"readonly": True}, - "provisioning_state": {"readonly": True}, - "extended_properties": {"readonly": True}, - "front_door_id": {"readonly": True}, - "origin_response_timeout_seconds": {"minimum": 16}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "system_data": {"key": "systemData", "type": "SystemData"}, - "tags": {"key": "tags", "type": "{str}"}, - "location": {"key": "location", "type": "str"}, - "sku": {"key": "sku", "type": "Sku"}, - "kind": {"key": "kind", "type": "str"}, - "identity": {"key": "identity", "type": "ManagedServiceIdentity"}, - "resource_state": {"key": "properties.resourceState", "type": "str"}, - "provisioning_state": {"key": "properties.provisioningState", "type": "str"}, - "extended_properties": {"key": "properties.extendedProperties", "type": "{str}"}, - "front_door_id": {"key": "properties.frontDoorId", "type": "str"}, - "origin_response_timeout_seconds": {"key": "properties.originResponseTimeoutSeconds", "type": "int"}, - "log_scrubbing": {"key": "properties.logScrubbing", "type": "ProfileLogScrubbing"}, - } - - def __init__( - self, - *, - location: str, - sku: "_models.Sku", - tags: Optional[dict[str, str]] = None, - identity: Optional["_models.ManagedServiceIdentity"] = None, - origin_response_timeout_seconds: Optional[int] = None, - log_scrubbing: Optional["_models.ProfileLogScrubbing"] = None, - **kwargs: Any - ) -> None: - """ - :keyword tags: Resource tags. - :paramtype tags: dict[str, str] - :keyword location: The geo-location where the resource lives. Required. - :paramtype location: str - :keyword sku: The pricing tier (defines Azure Front Door Standard or Premium or a CDN provider, - feature list and rate) of the profile. Required. - :paramtype sku: ~azure.mgmt.cdn.models.Sku - :keyword identity: Managed service identity (system assigned and/or user assigned identities). - :paramtype identity: ~azure.mgmt.cdn.models.ManagedServiceIdentity - :keyword origin_response_timeout_seconds: Send and receive timeout on forwarding request to the - origin. When timeout is reached, the request fails and returns. - :paramtype origin_response_timeout_seconds: int - :keyword log_scrubbing: Defines rules that scrub sensitive fields in the Azure Front Door - profile logs. - :paramtype log_scrubbing: ~azure.mgmt.cdn.models.ProfileLogScrubbing - """ - super().__init__(tags=tags, location=location, **kwargs) - self.sku = sku - self.kind: Optional[str] = None - self.identity = identity - self.resource_state: Optional[Union[str, "_models.ProfileResourceState"]] = None - self.provisioning_state: Optional[Union[str, "_models.ProfileProvisioningState"]] = None - self.extended_properties: Optional[dict[str, str]] = None - self.front_door_id: Optional[str] = None - self.origin_response_timeout_seconds = origin_response_timeout_seconds - self.log_scrubbing = log_scrubbing - - -class ProfileChangeSkuWafMapping(_serialization.Model): - """Parameters required for profile upgrade. - - All required parameters must be populated in order to send to server. - - :ivar security_policy_name: The security policy name. Required. - :vartype security_policy_name: str - :ivar change_to_waf_policy: The new waf resource for the security policy to use. Required. - :vartype change_to_waf_policy: ~azure.mgmt.cdn.models.ResourceReference - """ - - _validation = { - "security_policy_name": {"required": True}, - "change_to_waf_policy": {"required": True}, - } - - _attribute_map = { - "security_policy_name": {"key": "securityPolicyName", "type": "str"}, - "change_to_waf_policy": {"key": "changeToWafPolicy", "type": "ResourceReference"}, - } - - def __init__( - self, *, security_policy_name: str, change_to_waf_policy: "_models.ResourceReference", **kwargs: Any - ) -> None: - """ - :keyword security_policy_name: The security policy name. Required. - :paramtype security_policy_name: str - :keyword change_to_waf_policy: The new waf resource for the security policy to use. Required. - :paramtype change_to_waf_policy: ~azure.mgmt.cdn.models.ResourceReference - """ - super().__init__(**kwargs) - self.security_policy_name = security_policy_name - self.change_to_waf_policy = change_to_waf_policy - - -class ProfileListResult(_serialization.Model): - """Result of the request to list profiles. It contains a list of profile objects and a URL link to - get the next set of results. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: List of CDN profiles within a resource group. - :vartype value: list[~azure.mgmt.cdn.models.Profile] - :ivar next_link: URL to get the next set of profile objects if there are any. - :vartype next_link: str - """ - - _validation = { - "value": {"readonly": True}, - } - - _attribute_map = { - "value": {"key": "value", "type": "[Profile]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__(self, *, next_link: Optional[str] = None, **kwargs: Any) -> None: - """ - :keyword next_link: URL to get the next set of profile objects if there are any. - :paramtype next_link: str - """ - super().__init__(**kwargs) - self.value: Optional[list["_models.Profile"]] = None - self.next_link = next_link - - -class ProfileLogScrubbing(_serialization.Model): - """Defines rules that scrub sensitive fields in the Azure Front Door profile logs. - - :ivar state: State of the log scrubbing config. Default value is Enabled. Known values are: - "Enabled" and "Disabled". - :vartype state: str or ~azure.mgmt.cdn.models.ProfileScrubbingState - :ivar scrubbing_rules: List of log scrubbing rules applied to the Azure Front Door profile - logs. - :vartype scrubbing_rules: list[~azure.mgmt.cdn.models.ProfileScrubbingRules] - """ - - _attribute_map = { - "state": {"key": "state", "type": "str"}, - "scrubbing_rules": {"key": "scrubbingRules", "type": "[ProfileScrubbingRules]"}, - } - - def __init__( - self, - *, - state: Optional[Union[str, "_models.ProfileScrubbingState"]] = None, - scrubbing_rules: Optional[list["_models.ProfileScrubbingRules"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword state: State of the log scrubbing config. Default value is Enabled. Known values are: - "Enabled" and "Disabled". - :paramtype state: str or ~azure.mgmt.cdn.models.ProfileScrubbingState - :keyword scrubbing_rules: List of log scrubbing rules applied to the Azure Front Door profile - logs. - :paramtype scrubbing_rules: list[~azure.mgmt.cdn.models.ProfileScrubbingRules] - """ - super().__init__(**kwargs) - self.state = state - self.scrubbing_rules = scrubbing_rules - - -class ProfileScrubbingRules(_serialization.Model): - """Defines the contents of the log scrubbing rules. - - All required parameters must be populated in order to send to server. - - :ivar match_variable: The variable to be scrubbed from the logs. Required. Known values are: - "RequestIPAddress", "RequestUri", and "QueryStringArgNames". - :vartype match_variable: str or ~azure.mgmt.cdn.models.ScrubbingRuleEntryMatchVariable - :ivar selector_match_operator: When matchVariable is a collection, operate on the selector to - specify which elements in the collection this rule applies to. Required. "EqualsAny" - :vartype selector_match_operator: str or ~azure.mgmt.cdn.models.ScrubbingRuleEntryMatchOperator - :ivar selector: When matchVariable is a collection, operator used to specify which elements in - the collection this rule applies to. - :vartype selector: str - :ivar state: Defines the state of a log scrubbing rule. Default value is enabled. Known values - are: "Enabled" and "Disabled". - :vartype state: str or ~azure.mgmt.cdn.models.ScrubbingRuleEntryState - """ - - _validation = { - "match_variable": {"required": True}, - "selector_match_operator": {"required": True}, - } - - _attribute_map = { - "match_variable": {"key": "matchVariable", "type": "str"}, - "selector_match_operator": {"key": "selectorMatchOperator", "type": "str"}, - "selector": {"key": "selector", "type": "str"}, - "state": {"key": "state", "type": "str"}, - } - - def __init__( - self, - *, - match_variable: Union[str, "_models.ScrubbingRuleEntryMatchVariable"], - selector_match_operator: Union[str, "_models.ScrubbingRuleEntryMatchOperator"], - selector: Optional[str] = None, - state: Optional[Union[str, "_models.ScrubbingRuleEntryState"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword match_variable: The variable to be scrubbed from the logs. Required. Known values are: - "RequestIPAddress", "RequestUri", and "QueryStringArgNames". - :paramtype match_variable: str or ~azure.mgmt.cdn.models.ScrubbingRuleEntryMatchVariable - :keyword selector_match_operator: When matchVariable is a collection, operate on the selector - to specify which elements in the collection this rule applies to. Required. "EqualsAny" - :paramtype selector_match_operator: str or - ~azure.mgmt.cdn.models.ScrubbingRuleEntryMatchOperator - :keyword selector: When matchVariable is a collection, operator used to specify which elements - in the collection this rule applies to. - :paramtype selector: str - :keyword state: Defines the state of a log scrubbing rule. Default value is enabled. Known - values are: "Enabled" and "Disabled". - :paramtype state: str or ~azure.mgmt.cdn.models.ScrubbingRuleEntryState - """ - super().__init__(**kwargs) - self.match_variable = match_variable - self.selector_match_operator = selector_match_operator - self.selector = selector - self.state = state - - -class ProfileUpdateParameters(_serialization.Model): - """Properties required to update a profile. - - :ivar tags: Profile tags. - :vartype tags: dict[str, str] - :ivar identity: Managed service identity (system assigned and/or user assigned identities). - :vartype identity: ~azure.mgmt.cdn.models.ManagedServiceIdentity - :ivar origin_response_timeout_seconds: Send and receive timeout on forwarding request to the - origin. When timeout is reached, the request fails and returns. - :vartype origin_response_timeout_seconds: int - :ivar log_scrubbing: Defines rules to scrub sensitive fields in logs. - :vartype log_scrubbing: ~azure.mgmt.cdn.models.ProfileLogScrubbing - """ - - _validation = { - "origin_response_timeout_seconds": {"minimum": 16}, - } - - _attribute_map = { - "tags": {"key": "tags", "type": "{str}"}, - "identity": {"key": "identity", "type": "ManagedServiceIdentity"}, - "origin_response_timeout_seconds": {"key": "properties.originResponseTimeoutSeconds", "type": "int"}, - "log_scrubbing": {"key": "properties.logScrubbing", "type": "ProfileLogScrubbing"}, - } - - def __init__( - self, - *, - tags: Optional[dict[str, str]] = None, - identity: Optional["_models.ManagedServiceIdentity"] = None, - origin_response_timeout_seconds: Optional[int] = None, - log_scrubbing: Optional["_models.ProfileLogScrubbing"] = None, - **kwargs: Any - ) -> None: - """ - :keyword tags: Profile tags. - :paramtype tags: dict[str, str] - :keyword identity: Managed service identity (system assigned and/or user assigned identities). - :paramtype identity: ~azure.mgmt.cdn.models.ManagedServiceIdentity - :keyword origin_response_timeout_seconds: Send and receive timeout on forwarding request to the - origin. When timeout is reached, the request fails and returns. - :paramtype origin_response_timeout_seconds: int - :keyword log_scrubbing: Defines rules to scrub sensitive fields in logs. - :paramtype log_scrubbing: ~azure.mgmt.cdn.models.ProfileLogScrubbing - """ - super().__init__(**kwargs) - self.tags = tags - self.identity = identity - self.origin_response_timeout_seconds = origin_response_timeout_seconds - self.log_scrubbing = log_scrubbing - - -class ProfileUpgradeParameters(_serialization.Model): - """Parameters required for profile upgrade. - - All required parameters must be populated in order to send to server. - - :ivar waf_mapping_list: Web Application Firewall (WAF) and security policy mapping for the - profile upgrade. Required. - :vartype waf_mapping_list: list[~azure.mgmt.cdn.models.ProfileChangeSkuWafMapping] - """ - - _validation = { - "waf_mapping_list": {"required": True}, - } - - _attribute_map = { - "waf_mapping_list": {"key": "wafMappingList", "type": "[ProfileChangeSkuWafMapping]"}, - } - - def __init__(self, *, waf_mapping_list: list["_models.ProfileChangeSkuWafMapping"], **kwargs: Any) -> None: - """ - :keyword waf_mapping_list: Web Application Firewall (WAF) and security policy mapping for the - profile upgrade. Required. - :paramtype waf_mapping_list: list[~azure.mgmt.cdn.models.ProfileChangeSkuWafMapping] - """ - super().__init__(**kwargs) - self.waf_mapping_list = waf_mapping_list - - -class PurgeParameters(_serialization.Model): - """Parameters required for content purge. - - All required parameters must be populated in order to send to server. - - :ivar content_paths: The path to the content to be purged. Can describe a file path or a wild - card directory. Required. - :vartype content_paths: list[str] - """ - - _validation = { - "content_paths": {"required": True}, - } - - _attribute_map = { - "content_paths": {"key": "contentPaths", "type": "[str]"}, - } - - def __init__(self, *, content_paths: list[str], **kwargs: Any) -> None: - """ - :keyword content_paths: The path to the content to be purged. Can describe a file path or a - wild card directory. Required. - :paramtype content_paths: list[str] - """ - super().__init__(**kwargs) - self.content_paths = content_paths - - -class QueryStringMatchConditionParameters(DeliveryRuleConditionParameters): - """Defines the parameters for QueryString match conditions. - - All required parameters must be populated in order to send to server. - - :ivar type_name: Required. Known values are: "DeliveryRuleRemoteAddressConditionParameters", - "DeliveryRuleRequestMethodConditionParameters", "DeliveryRuleQueryStringConditionParameters", - "DeliveryRulePostArgsConditionParameters", "DeliveryRuleRequestUriConditionParameters", - "DeliveryRuleRequestHeaderConditionParameters", "DeliveryRuleRequestBodyConditionParameters", - "DeliveryRuleRequestSchemeConditionParameters", "DeliveryRuleUrlPathMatchConditionParameters", - "DeliveryRuleUrlFileExtensionMatchConditionParameters", - "DeliveryRuleUrlFilenameConditionParameters", "DeliveryRuleHttpVersionConditionParameters", - "DeliveryRuleCookiesConditionParameters", "DeliveryRuleIsDeviceConditionParameters", - "DeliveryRuleSocketAddrConditionParameters", "DeliveryRuleClientPortConditionParameters", - "DeliveryRuleServerPortConditionParameters", "DeliveryRuleHostNameConditionParameters", and - "DeliveryRuleSslProtocolConditionParameters". - :vartype type_name: str or ~azure.mgmt.cdn.models.DeliveryRuleConditionParametersType - :ivar operator: Describes operator to be matched. Required. Known values are: "Any", "Equal", - "Contains", "BeginsWith", "EndsWith", "LessThan", "LessThanOrEqual", "GreaterThan", - "GreaterThanOrEqual", and "RegEx". - :vartype operator: str or ~azure.mgmt.cdn.models.QueryStringOperator - :ivar negate_condition: Describes if this is negate condition or not. - :vartype negate_condition: bool - :ivar match_values: The match value for the condition of the delivery rule. - :vartype match_values: list[str] - :ivar transforms: List of transforms. - :vartype transforms: list[str or ~azure.mgmt.cdn.models.Transform] - """ - - _validation = { - "type_name": {"required": True}, - "operator": {"required": True}, - } - - _attribute_map = { - "type_name": {"key": "typeName", "type": "str"}, - "operator": {"key": "operator", "type": "str"}, - "negate_condition": {"key": "negateCondition", "type": "bool"}, - "match_values": {"key": "matchValues", "type": "[str]"}, - "transforms": {"key": "transforms", "type": "[str]"}, - } - - def __init__( - self, - *, - operator: Union[str, "_models.QueryStringOperator"], - negate_condition: bool = False, - match_values: Optional[list[str]] = None, - transforms: Optional[list[Union[str, "_models.Transform"]]] = None, - **kwargs: Any - ) -> None: - """ - :keyword operator: Describes operator to be matched. Required. Known values are: "Any", - "Equal", "Contains", "BeginsWith", "EndsWith", "LessThan", "LessThanOrEqual", "GreaterThan", - "GreaterThanOrEqual", and "RegEx". - :paramtype operator: str or ~azure.mgmt.cdn.models.QueryStringOperator - :keyword negate_condition: Describes if this is negate condition or not. - :paramtype negate_condition: bool - :keyword match_values: The match value for the condition of the delivery rule. - :paramtype match_values: list[str] - :keyword transforms: List of transforms. - :paramtype transforms: list[str or ~azure.mgmt.cdn.models.Transform] - """ - super().__init__(**kwargs) - self.type_name: str = "DeliveryRuleQueryStringConditionParameters" - self.operator = operator - self.negate_condition = negate_condition - self.match_values = match_values - self.transforms = transforms - - -class RankingsResponse(_serialization.Model): - """Rankings Response. - - :ivar date_time_begin: - :vartype date_time_begin: ~datetime.datetime - :ivar date_time_end: - :vartype date_time_end: ~datetime.datetime - :ivar tables: - :vartype tables: list[~azure.mgmt.cdn.models.RankingsResponseTablesItem] - """ - - _attribute_map = { - "date_time_begin": {"key": "dateTimeBegin", "type": "iso-8601"}, - "date_time_end": {"key": "dateTimeEnd", "type": "iso-8601"}, - "tables": {"key": "tables", "type": "[RankingsResponseTablesItem]"}, - } - - def __init__( - self, - *, - date_time_begin: Optional[datetime.datetime] = None, - date_time_end: Optional[datetime.datetime] = None, - tables: Optional[list["_models.RankingsResponseTablesItem"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword date_time_begin: - :paramtype date_time_begin: ~datetime.datetime - :keyword date_time_end: - :paramtype date_time_end: ~datetime.datetime - :keyword tables: - :paramtype tables: list[~azure.mgmt.cdn.models.RankingsResponseTablesItem] - """ - super().__init__(**kwargs) - self.date_time_begin = date_time_begin - self.date_time_end = date_time_end - self.tables = tables - - -class RankingsResponseTablesItem(_serialization.Model): - """RankingsResponseTablesItem. - - :ivar ranking: - :vartype ranking: str - :ivar data: - :vartype data: list[~azure.mgmt.cdn.models.RankingsResponseTablesPropertiesItemsItem] - """ - - _attribute_map = { - "ranking": {"key": "ranking", "type": "str"}, - "data": {"key": "data", "type": "[RankingsResponseTablesPropertiesItemsItem]"}, - } - - def __init__( - self, - *, - ranking: Optional[str] = None, - data: Optional[list["_models.RankingsResponseTablesPropertiesItemsItem"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword ranking: - :paramtype ranking: str - :keyword data: - :paramtype data: list[~azure.mgmt.cdn.models.RankingsResponseTablesPropertiesItemsItem] - """ - super().__init__(**kwargs) - self.ranking = ranking - self.data = data - - -class RankingsResponseTablesPropertiesItemsItem(_serialization.Model): # pylint: disable=name-too-long - """RankingsResponseTablesPropertiesItemsItem. - - :ivar name: - :vartype name: str - :ivar metrics: - :vartype metrics: list[~azure.mgmt.cdn.models.RankingsResponseTablesPropertiesItemsMetricsItem] - """ - - _attribute_map = { - "name": {"key": "name", "type": "str"}, - "metrics": {"key": "metrics", "type": "[RankingsResponseTablesPropertiesItemsMetricsItem]"}, - } - - def __init__( - self, - *, - name: Optional[str] = None, - metrics: Optional[list["_models.RankingsResponseTablesPropertiesItemsMetricsItem"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword name: - :paramtype name: str - :keyword metrics: - :paramtype metrics: - list[~azure.mgmt.cdn.models.RankingsResponseTablesPropertiesItemsMetricsItem] - """ - super().__init__(**kwargs) - self.name = name - self.metrics = metrics - - -class RankingsResponseTablesPropertiesItemsMetricsItem(_serialization.Model): # pylint: disable=name-too-long - """RankingsResponseTablesPropertiesItemsMetricsItem. - - :ivar metric: - :vartype metric: str - :ivar value: - :vartype value: int - :ivar percentage: - :vartype percentage: float - """ - - _attribute_map = { - "metric": {"key": "metric", "type": "str"}, - "value": {"key": "value", "type": "int"}, - "percentage": {"key": "percentage", "type": "float"}, - } - - def __init__( - self, - *, - metric: Optional[str] = None, - value: Optional[int] = None, - percentage: Optional[float] = None, - **kwargs: Any - ) -> None: - """ - :keyword metric: - :paramtype metric: str - :keyword value: - :paramtype value: int - :keyword percentage: - :paramtype percentage: float - """ - super().__init__(**kwargs) - self.metric = metric - self.value = value - self.percentage = percentage - - -class RateLimitRule(CustomRule): - """Defines a rate limiting rule that can be included in a waf policy. - - All required parameters must be populated in order to send to server. - - :ivar name: Defines the name of the custom rule. Required. - :vartype name: str - :ivar enabled_state: Describes if the custom rule is in enabled or disabled state. Defaults to - Enabled if not specified. Known values are: "Disabled" and "Enabled". - :vartype enabled_state: str or ~azure.mgmt.cdn.models.CustomRuleEnabledState - :ivar priority: Defines in what order this rule be evaluated in the overall list of custom - rules. Required. - :vartype priority: int - :ivar match_conditions: List of match conditions. Required. - :vartype match_conditions: list[~azure.mgmt.cdn.models.MatchCondition] - :ivar action: Describes what action to be applied when rule matches. Required. Known values - are: "Allow", "Block", "Log", and "Redirect". - :vartype action: str or ~azure.mgmt.cdn.models.ActionType - :ivar rate_limit_threshold: Defines rate limit threshold. Required. - :vartype rate_limit_threshold: int - :ivar rate_limit_duration_in_minutes: Defines rate limit duration. Default is 1 minute. - Required. - :vartype rate_limit_duration_in_minutes: int - """ - - _validation = { - "name": {"required": True}, - "priority": {"required": True, "maximum": 1000, "minimum": 0}, - "match_conditions": {"required": True}, - "action": {"required": True}, - "rate_limit_threshold": {"required": True, "minimum": 0}, - "rate_limit_duration_in_minutes": {"required": True, "maximum": 60, "minimum": 0}, - } - - _attribute_map = { - "name": {"key": "name", "type": "str"}, - "enabled_state": {"key": "enabledState", "type": "str"}, - "priority": {"key": "priority", "type": "int"}, - "match_conditions": {"key": "matchConditions", "type": "[MatchCondition]"}, - "action": {"key": "action", "type": "str"}, - "rate_limit_threshold": {"key": "rateLimitThreshold", "type": "int"}, - "rate_limit_duration_in_minutes": {"key": "rateLimitDurationInMinutes", "type": "int"}, - } - - def __init__( - self, - *, - name: str, - priority: int, - match_conditions: list["_models.MatchCondition"], - action: Union[str, "_models.ActionType"], - rate_limit_threshold: int, - rate_limit_duration_in_minutes: int, - enabled_state: Optional[Union[str, "_models.CustomRuleEnabledState"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword name: Defines the name of the custom rule. Required. - :paramtype name: str - :keyword enabled_state: Describes if the custom rule is in enabled or disabled state. Defaults - to Enabled if not specified. Known values are: "Disabled" and "Enabled". - :paramtype enabled_state: str or ~azure.mgmt.cdn.models.CustomRuleEnabledState - :keyword priority: Defines in what order this rule be evaluated in the overall list of custom - rules. Required. - :paramtype priority: int - :keyword match_conditions: List of match conditions. Required. - :paramtype match_conditions: list[~azure.mgmt.cdn.models.MatchCondition] - :keyword action: Describes what action to be applied when rule matches. Required. Known values - are: "Allow", "Block", "Log", and "Redirect". - :paramtype action: str or ~azure.mgmt.cdn.models.ActionType - :keyword rate_limit_threshold: Defines rate limit threshold. Required. - :paramtype rate_limit_threshold: int - :keyword rate_limit_duration_in_minutes: Defines rate limit duration. Default is 1 minute. - Required. - :paramtype rate_limit_duration_in_minutes: int - """ - super().__init__( - name=name, - enabled_state=enabled_state, - priority=priority, - match_conditions=match_conditions, - action=action, - **kwargs - ) - self.rate_limit_threshold = rate_limit_threshold - self.rate_limit_duration_in_minutes = rate_limit_duration_in_minutes - - -class RateLimitRuleList(_serialization.Model): - """Defines contents of rate limit rules. - - :ivar rules: List of rules. - :vartype rules: list[~azure.mgmt.cdn.models.RateLimitRule] - """ - - _attribute_map = { - "rules": {"key": "rules", "type": "[RateLimitRule]"}, - } - - def __init__(self, *, rules: Optional[list["_models.RateLimitRule"]] = None, **kwargs: Any) -> None: - """ - :keyword rules: List of rules. - :paramtype rules: list[~azure.mgmt.cdn.models.RateLimitRule] - """ - super().__init__(**kwargs) - self.rules = rules - - -class RemoteAddressMatchConditionParameters(DeliveryRuleConditionParameters): - """Defines the parameters for RemoteAddress match conditions. - - All required parameters must be populated in order to send to server. - - :ivar type_name: Required. Known values are: "DeliveryRuleRemoteAddressConditionParameters", - "DeliveryRuleRequestMethodConditionParameters", "DeliveryRuleQueryStringConditionParameters", - "DeliveryRulePostArgsConditionParameters", "DeliveryRuleRequestUriConditionParameters", - "DeliveryRuleRequestHeaderConditionParameters", "DeliveryRuleRequestBodyConditionParameters", - "DeliveryRuleRequestSchemeConditionParameters", "DeliveryRuleUrlPathMatchConditionParameters", - "DeliveryRuleUrlFileExtensionMatchConditionParameters", - "DeliveryRuleUrlFilenameConditionParameters", "DeliveryRuleHttpVersionConditionParameters", - "DeliveryRuleCookiesConditionParameters", "DeliveryRuleIsDeviceConditionParameters", - "DeliveryRuleSocketAddrConditionParameters", "DeliveryRuleClientPortConditionParameters", - "DeliveryRuleServerPortConditionParameters", "DeliveryRuleHostNameConditionParameters", and - "DeliveryRuleSslProtocolConditionParameters". - :vartype type_name: str or ~azure.mgmt.cdn.models.DeliveryRuleConditionParametersType - :ivar operator: Describes operator to be matched. Required. Known values are: "Any", "IPMatch", - and "GeoMatch". - :vartype operator: str or ~azure.mgmt.cdn.models.RemoteAddressOperator - :ivar negate_condition: Describes if this is negate condition or not. - :vartype negate_condition: bool - :ivar match_values: Match values to match against. The operator will apply to each value in - here with OR semantics. If any of them match the variable with the given operator this match - condition is considered a match. - :vartype match_values: list[str] - :ivar transforms: List of transforms. - :vartype transforms: list[str or ~azure.mgmt.cdn.models.Transform] - """ - - _validation = { - "type_name": {"required": True}, - "operator": {"required": True}, - } - - _attribute_map = { - "type_name": {"key": "typeName", "type": "str"}, - "operator": {"key": "operator", "type": "str"}, - "negate_condition": {"key": "negateCondition", "type": "bool"}, - "match_values": {"key": "matchValues", "type": "[str]"}, - "transforms": {"key": "transforms", "type": "[str]"}, - } - - def __init__( - self, - *, - operator: Union[str, "_models.RemoteAddressOperator"], - negate_condition: bool = False, - match_values: Optional[list[str]] = None, - transforms: Optional[list[Union[str, "_models.Transform"]]] = None, - **kwargs: Any - ) -> None: - """ - :keyword operator: Describes operator to be matched. Required. Known values are: "Any", - "IPMatch", and "GeoMatch". - :paramtype operator: str or ~azure.mgmt.cdn.models.RemoteAddressOperator - :keyword negate_condition: Describes if this is negate condition or not. - :paramtype negate_condition: bool - :keyword match_values: Match values to match against. The operator will apply to each value in - here with OR semantics. If any of them match the variable with the given operator this match - condition is considered a match. - :paramtype match_values: list[str] - :keyword transforms: List of transforms. - :paramtype transforms: list[str or ~azure.mgmt.cdn.models.Transform] - """ - super().__init__(**kwargs) - self.type_name: str = "DeliveryRuleRemoteAddressConditionParameters" - self.operator = operator - self.negate_condition = negate_condition - self.match_values = match_values - self.transforms = transforms - - -class RequestBodyMatchConditionParameters(DeliveryRuleConditionParameters): - """Defines the parameters for RequestBody match conditions. - - All required parameters must be populated in order to send to server. - - :ivar type_name: Required. Known values are: "DeliveryRuleRemoteAddressConditionParameters", - "DeliveryRuleRequestMethodConditionParameters", "DeliveryRuleQueryStringConditionParameters", - "DeliveryRulePostArgsConditionParameters", "DeliveryRuleRequestUriConditionParameters", - "DeliveryRuleRequestHeaderConditionParameters", "DeliveryRuleRequestBodyConditionParameters", - "DeliveryRuleRequestSchemeConditionParameters", "DeliveryRuleUrlPathMatchConditionParameters", - "DeliveryRuleUrlFileExtensionMatchConditionParameters", - "DeliveryRuleUrlFilenameConditionParameters", "DeliveryRuleHttpVersionConditionParameters", - "DeliveryRuleCookiesConditionParameters", "DeliveryRuleIsDeviceConditionParameters", - "DeliveryRuleSocketAddrConditionParameters", "DeliveryRuleClientPortConditionParameters", - "DeliveryRuleServerPortConditionParameters", "DeliveryRuleHostNameConditionParameters", and - "DeliveryRuleSslProtocolConditionParameters". - :vartype type_name: str or ~azure.mgmt.cdn.models.DeliveryRuleConditionParametersType - :ivar operator: Describes operator to be matched. Required. Known values are: "Any", "Equal", - "Contains", "BeginsWith", "EndsWith", "LessThan", "LessThanOrEqual", "GreaterThan", - "GreaterThanOrEqual", and "RegEx". - :vartype operator: str or ~azure.mgmt.cdn.models.RequestBodyOperator - :ivar negate_condition: Describes if this is negate condition or not. - :vartype negate_condition: bool - :ivar match_values: The match value for the condition of the delivery rule. - :vartype match_values: list[str] - :ivar transforms: List of transforms. - :vartype transforms: list[str or ~azure.mgmt.cdn.models.Transform] - """ - - _validation = { - "type_name": {"required": True}, - "operator": {"required": True}, - } - - _attribute_map = { - "type_name": {"key": "typeName", "type": "str"}, - "operator": {"key": "operator", "type": "str"}, - "negate_condition": {"key": "negateCondition", "type": "bool"}, - "match_values": {"key": "matchValues", "type": "[str]"}, - "transforms": {"key": "transforms", "type": "[str]"}, - } - - def __init__( - self, - *, - operator: Union[str, "_models.RequestBodyOperator"], - negate_condition: bool = False, - match_values: Optional[list[str]] = None, - transforms: Optional[list[Union[str, "_models.Transform"]]] = None, - **kwargs: Any - ) -> None: - """ - :keyword operator: Describes operator to be matched. Required. Known values are: "Any", - "Equal", "Contains", "BeginsWith", "EndsWith", "LessThan", "LessThanOrEqual", "GreaterThan", - "GreaterThanOrEqual", and "RegEx". - :paramtype operator: str or ~azure.mgmt.cdn.models.RequestBodyOperator - :keyword negate_condition: Describes if this is negate condition or not. - :paramtype negate_condition: bool - :keyword match_values: The match value for the condition of the delivery rule. - :paramtype match_values: list[str] - :keyword transforms: List of transforms. - :paramtype transforms: list[str or ~azure.mgmt.cdn.models.Transform] - """ - super().__init__(**kwargs) - self.type_name: str = "DeliveryRuleRequestBodyConditionParameters" - self.operator = operator - self.negate_condition = negate_condition - self.match_values = match_values - self.transforms = transforms - - -class RequestHeaderMatchConditionParameters(DeliveryRuleConditionParameters): - """Defines the parameters for RequestHeader match conditions. - - All required parameters must be populated in order to send to server. - - :ivar type_name: Required. Known values are: "DeliveryRuleRemoteAddressConditionParameters", - "DeliveryRuleRequestMethodConditionParameters", "DeliveryRuleQueryStringConditionParameters", - "DeliveryRulePostArgsConditionParameters", "DeliveryRuleRequestUriConditionParameters", - "DeliveryRuleRequestHeaderConditionParameters", "DeliveryRuleRequestBodyConditionParameters", - "DeliveryRuleRequestSchemeConditionParameters", "DeliveryRuleUrlPathMatchConditionParameters", - "DeliveryRuleUrlFileExtensionMatchConditionParameters", - "DeliveryRuleUrlFilenameConditionParameters", "DeliveryRuleHttpVersionConditionParameters", - "DeliveryRuleCookiesConditionParameters", "DeliveryRuleIsDeviceConditionParameters", - "DeliveryRuleSocketAddrConditionParameters", "DeliveryRuleClientPortConditionParameters", - "DeliveryRuleServerPortConditionParameters", "DeliveryRuleHostNameConditionParameters", and - "DeliveryRuleSslProtocolConditionParameters". - :vartype type_name: str or ~azure.mgmt.cdn.models.DeliveryRuleConditionParametersType - :ivar selector: Name of Header to be matched. - :vartype selector: str - :ivar operator: Describes operator to be matched. Required. Known values are: "Any", "Equal", - "Contains", "BeginsWith", "EndsWith", "LessThan", "LessThanOrEqual", "GreaterThan", - "GreaterThanOrEqual", and "RegEx". - :vartype operator: str or ~azure.mgmt.cdn.models.RequestHeaderOperator - :ivar negate_condition: Describes if this is negate condition or not. - :vartype negate_condition: bool - :ivar match_values: The match value for the condition of the delivery rule. - :vartype match_values: list[str] - :ivar transforms: List of transforms. - :vartype transforms: list[str or ~azure.mgmt.cdn.models.Transform] - """ - - _validation = { - "type_name": {"required": True}, - "operator": {"required": True}, - } - - _attribute_map = { - "type_name": {"key": "typeName", "type": "str"}, - "selector": {"key": "selector", "type": "str"}, - "operator": {"key": "operator", "type": "str"}, - "negate_condition": {"key": "negateCondition", "type": "bool"}, - "match_values": {"key": "matchValues", "type": "[str]"}, - "transforms": {"key": "transforms", "type": "[str]"}, - } - - def __init__( - self, - *, - operator: Union[str, "_models.RequestHeaderOperator"], - selector: Optional[str] = None, - negate_condition: bool = False, - match_values: Optional[list[str]] = None, - transforms: Optional[list[Union[str, "_models.Transform"]]] = None, - **kwargs: Any - ) -> None: - """ - :keyword selector: Name of Header to be matched. - :paramtype selector: str - :keyword operator: Describes operator to be matched. Required. Known values are: "Any", - "Equal", "Contains", "BeginsWith", "EndsWith", "LessThan", "LessThanOrEqual", "GreaterThan", - "GreaterThanOrEqual", and "RegEx". - :paramtype operator: str or ~azure.mgmt.cdn.models.RequestHeaderOperator - :keyword negate_condition: Describes if this is negate condition or not. - :paramtype negate_condition: bool - :keyword match_values: The match value for the condition of the delivery rule. - :paramtype match_values: list[str] - :keyword transforms: List of transforms. - :paramtype transforms: list[str or ~azure.mgmt.cdn.models.Transform] - """ - super().__init__(**kwargs) - self.type_name: str = "DeliveryRuleRequestHeaderConditionParameters" - self.selector = selector - self.operator = operator - self.negate_condition = negate_condition - self.match_values = match_values - self.transforms = transforms - - -class RequestMethodMatchConditionParameters(DeliveryRuleConditionParameters): - """Defines the parameters for RequestMethod match conditions. - - All required parameters must be populated in order to send to server. - - :ivar type_name: Required. Known values are: "DeliveryRuleRemoteAddressConditionParameters", - "DeliveryRuleRequestMethodConditionParameters", "DeliveryRuleQueryStringConditionParameters", - "DeliveryRulePostArgsConditionParameters", "DeliveryRuleRequestUriConditionParameters", - "DeliveryRuleRequestHeaderConditionParameters", "DeliveryRuleRequestBodyConditionParameters", - "DeliveryRuleRequestSchemeConditionParameters", "DeliveryRuleUrlPathMatchConditionParameters", - "DeliveryRuleUrlFileExtensionMatchConditionParameters", - "DeliveryRuleUrlFilenameConditionParameters", "DeliveryRuleHttpVersionConditionParameters", - "DeliveryRuleCookiesConditionParameters", "DeliveryRuleIsDeviceConditionParameters", - "DeliveryRuleSocketAddrConditionParameters", "DeliveryRuleClientPortConditionParameters", - "DeliveryRuleServerPortConditionParameters", "DeliveryRuleHostNameConditionParameters", and - "DeliveryRuleSslProtocolConditionParameters". - :vartype type_name: str or ~azure.mgmt.cdn.models.DeliveryRuleConditionParametersType - :ivar operator: Describes operator to be matched. Required. "Equal" - :vartype operator: str or ~azure.mgmt.cdn.models.RequestMethodOperator - :ivar negate_condition: Describes if this is negate condition or not. - :vartype negate_condition: bool - :ivar transforms: List of transforms. - :vartype transforms: list[str or ~azure.mgmt.cdn.models.Transform] - :ivar match_values: The match value for the condition of the delivery rule. - :vartype match_values: list[str or ~azure.mgmt.cdn.models.RequestMethodMatchValue] - """ - - _validation = { - "type_name": {"required": True}, - "operator": {"required": True}, - } - - _attribute_map = { - "type_name": {"key": "typeName", "type": "str"}, - "operator": {"key": "operator", "type": "str"}, - "negate_condition": {"key": "negateCondition", "type": "bool"}, - "transforms": {"key": "transforms", "type": "[str]"}, - "match_values": {"key": "matchValues", "type": "[str]"}, - } - - def __init__( - self, - *, - operator: Union[str, "_models.RequestMethodOperator"], - negate_condition: bool = False, - transforms: Optional[list[Union[str, "_models.Transform"]]] = None, - match_values: Optional[list[Union[str, "_models.RequestMethodMatchValue"]]] = None, - **kwargs: Any - ) -> None: - """ - :keyword operator: Describes operator to be matched. Required. "Equal" - :paramtype operator: str or ~azure.mgmt.cdn.models.RequestMethodOperator - :keyword negate_condition: Describes if this is negate condition or not. - :paramtype negate_condition: bool - :keyword transforms: List of transforms. - :paramtype transforms: list[str or ~azure.mgmt.cdn.models.Transform] - :keyword match_values: The match value for the condition of the delivery rule. - :paramtype match_values: list[str or ~azure.mgmt.cdn.models.RequestMethodMatchValue] - """ - super().__init__(**kwargs) - self.type_name: str = "DeliveryRuleRequestMethodConditionParameters" - self.operator = operator - self.negate_condition = negate_condition - self.transforms = transforms - self.match_values = match_values - - -class RequestSchemeMatchConditionParameters(DeliveryRuleConditionParameters): - """Defines the parameters for RequestScheme match conditions. - - All required parameters must be populated in order to send to server. - - :ivar type_name: Required. Known values are: "DeliveryRuleRemoteAddressConditionParameters", - "DeliveryRuleRequestMethodConditionParameters", "DeliveryRuleQueryStringConditionParameters", - "DeliveryRulePostArgsConditionParameters", "DeliveryRuleRequestUriConditionParameters", - "DeliveryRuleRequestHeaderConditionParameters", "DeliveryRuleRequestBodyConditionParameters", - "DeliveryRuleRequestSchemeConditionParameters", "DeliveryRuleUrlPathMatchConditionParameters", - "DeliveryRuleUrlFileExtensionMatchConditionParameters", - "DeliveryRuleUrlFilenameConditionParameters", "DeliveryRuleHttpVersionConditionParameters", - "DeliveryRuleCookiesConditionParameters", "DeliveryRuleIsDeviceConditionParameters", - "DeliveryRuleSocketAddrConditionParameters", "DeliveryRuleClientPortConditionParameters", - "DeliveryRuleServerPortConditionParameters", "DeliveryRuleHostNameConditionParameters", and - "DeliveryRuleSslProtocolConditionParameters". - :vartype type_name: str or ~azure.mgmt.cdn.models.DeliveryRuleConditionParametersType - :ivar operator: Describes operator to be matched. Required. "Equal" - :vartype operator: str or ~azure.mgmt.cdn.models.RequestSchemeMatchConditionParametersOperator - :ivar negate_condition: Describes if this is negate condition or not. - :vartype negate_condition: bool - :ivar transforms: List of transforms. - :vartype transforms: list[str or ~azure.mgmt.cdn.models.Transform] - :ivar match_values: The match value for the condition of the delivery rule. - :vartype match_values: list[str or ~azure.mgmt.cdn.models.RequestSchemeMatchValue] - """ - - _validation = { - "type_name": {"required": True}, - "operator": {"required": True}, - } - - _attribute_map = { - "type_name": {"key": "typeName", "type": "str"}, - "operator": {"key": "operator", "type": "str"}, - "negate_condition": {"key": "negateCondition", "type": "bool"}, - "transforms": {"key": "transforms", "type": "[str]"}, - "match_values": {"key": "matchValues", "type": "[str]"}, - } - - def __init__( - self, - *, - operator: Union[str, "_models.RequestSchemeMatchConditionParametersOperator"], - negate_condition: bool = False, - transforms: Optional[list[Union[str, "_models.Transform"]]] = None, - match_values: Optional[list[Union[str, "_models.RequestSchemeMatchValue"]]] = None, - **kwargs: Any - ) -> None: - """ - :keyword operator: Describes operator to be matched. Required. "Equal" - :paramtype operator: str or - ~azure.mgmt.cdn.models.RequestSchemeMatchConditionParametersOperator - :keyword negate_condition: Describes if this is negate condition or not. - :paramtype negate_condition: bool - :keyword transforms: List of transforms. - :paramtype transforms: list[str or ~azure.mgmt.cdn.models.Transform] - :keyword match_values: The match value for the condition of the delivery rule. - :paramtype match_values: list[str or ~azure.mgmt.cdn.models.RequestSchemeMatchValue] - """ - super().__init__(**kwargs) - self.type_name: str = "DeliveryRuleRequestSchemeConditionParameters" - self.operator = operator - self.negate_condition = negate_condition - self.transforms = transforms - self.match_values = match_values - - -class RequestUriMatchConditionParameters(DeliveryRuleConditionParameters): - """Defines the parameters for RequestUri match conditions. - - All required parameters must be populated in order to send to server. - - :ivar type_name: Required. Known values are: "DeliveryRuleRemoteAddressConditionParameters", - "DeliveryRuleRequestMethodConditionParameters", "DeliveryRuleQueryStringConditionParameters", - "DeliveryRulePostArgsConditionParameters", "DeliveryRuleRequestUriConditionParameters", - "DeliveryRuleRequestHeaderConditionParameters", "DeliveryRuleRequestBodyConditionParameters", - "DeliveryRuleRequestSchemeConditionParameters", "DeliveryRuleUrlPathMatchConditionParameters", - "DeliveryRuleUrlFileExtensionMatchConditionParameters", - "DeliveryRuleUrlFilenameConditionParameters", "DeliveryRuleHttpVersionConditionParameters", - "DeliveryRuleCookiesConditionParameters", "DeliveryRuleIsDeviceConditionParameters", - "DeliveryRuleSocketAddrConditionParameters", "DeliveryRuleClientPortConditionParameters", - "DeliveryRuleServerPortConditionParameters", "DeliveryRuleHostNameConditionParameters", and - "DeliveryRuleSslProtocolConditionParameters". - :vartype type_name: str or ~azure.mgmt.cdn.models.DeliveryRuleConditionParametersType - :ivar operator: Describes operator to be matched. Required. Known values are: "Any", "Equal", - "Contains", "BeginsWith", "EndsWith", "LessThan", "LessThanOrEqual", "GreaterThan", - "GreaterThanOrEqual", and "RegEx". - :vartype operator: str or ~azure.mgmt.cdn.models.RequestUriOperator - :ivar negate_condition: Describes if this is negate condition or not. - :vartype negate_condition: bool - :ivar match_values: The match value for the condition of the delivery rule. - :vartype match_values: list[str] - :ivar transforms: List of transforms. - :vartype transforms: list[str or ~azure.mgmt.cdn.models.Transform] - """ - - _validation = { - "type_name": {"required": True}, - "operator": {"required": True}, - } - - _attribute_map = { - "type_name": {"key": "typeName", "type": "str"}, - "operator": {"key": "operator", "type": "str"}, - "negate_condition": {"key": "negateCondition", "type": "bool"}, - "match_values": {"key": "matchValues", "type": "[str]"}, - "transforms": {"key": "transforms", "type": "[str]"}, - } - - def __init__( - self, - *, - operator: Union[str, "_models.RequestUriOperator"], - negate_condition: bool = False, - match_values: Optional[list[str]] = None, - transforms: Optional[list[Union[str, "_models.Transform"]]] = None, - **kwargs: Any - ) -> None: - """ - :keyword operator: Describes operator to be matched. Required. Known values are: "Any", - "Equal", "Contains", "BeginsWith", "EndsWith", "LessThan", "LessThanOrEqual", "GreaterThan", - "GreaterThanOrEqual", and "RegEx". - :paramtype operator: str or ~azure.mgmt.cdn.models.RequestUriOperator - :keyword negate_condition: Describes if this is negate condition or not. - :paramtype negate_condition: bool - :keyword match_values: The match value for the condition of the delivery rule. - :paramtype match_values: list[str] - :keyword transforms: List of transforms. - :paramtype transforms: list[str or ~azure.mgmt.cdn.models.Transform] - """ - super().__init__(**kwargs) - self.type_name: str = "DeliveryRuleRequestUriConditionParameters" - self.operator = operator - self.negate_condition = negate_condition - self.match_values = match_values - self.transforms = transforms - - -class ResourceReference(_serialization.Model): - """Reference to another resource. - - :ivar id: Resource ID. - :vartype id: str - """ - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - } - - def __init__(self, *, id: Optional[str] = None, **kwargs: Any) -> None: # pylint: disable=redefined-builtin - """ - :keyword id: Resource ID. - :paramtype id: str - """ - super().__init__(**kwargs) - self.id = id - - -class ResourcesResponse(_serialization.Model): - """Resources Response. - - :ivar endpoints: - :vartype endpoints: list[~azure.mgmt.cdn.models.ResourcesResponseEndpointsItem] - :ivar custom_domains: - :vartype custom_domains: list[~azure.mgmt.cdn.models.ResourcesResponseCustomDomainsItem] - """ - - _attribute_map = { - "endpoints": {"key": "endpoints", "type": "[ResourcesResponseEndpointsItem]"}, - "custom_domains": {"key": "customDomains", "type": "[ResourcesResponseCustomDomainsItem]"}, - } - - def __init__( - self, - *, - endpoints: Optional[list["_models.ResourcesResponseEndpointsItem"]] = None, - custom_domains: Optional[list["_models.ResourcesResponseCustomDomainsItem"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword endpoints: - :paramtype endpoints: list[~azure.mgmt.cdn.models.ResourcesResponseEndpointsItem] - :keyword custom_domains: - :paramtype custom_domains: list[~azure.mgmt.cdn.models.ResourcesResponseCustomDomainsItem] - """ - super().__init__(**kwargs) - self.endpoints = endpoints - self.custom_domains = custom_domains - - -class ResourcesResponseCustomDomainsItem(_serialization.Model): - """ResourcesResponseCustomDomainsItem. - - :ivar id: - :vartype id: str - :ivar name: - :vartype name: str - :ivar endpoint_id: - :vartype endpoint_id: str - :ivar history: - :vartype history: bool - """ - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "endpoint_id": {"key": "endpointId", "type": "str"}, - "history": {"key": "history", "type": "bool"}, - } - - def __init__( - self, - *, - id: Optional[str] = None, # pylint: disable=redefined-builtin - name: Optional[str] = None, - endpoint_id: Optional[str] = None, - history: Optional[bool] = None, - **kwargs: Any - ) -> None: - """ - :keyword id: - :paramtype id: str - :keyword name: - :paramtype name: str - :keyword endpoint_id: - :paramtype endpoint_id: str - :keyword history: - :paramtype history: bool - """ - super().__init__(**kwargs) - self.id = id - self.name = name - self.endpoint_id = endpoint_id - self.history = history - - -class ResourcesResponseEndpointsItem(_serialization.Model): - """ResourcesResponseEndpointsItem. - - :ivar id: - :vartype id: str - :ivar name: - :vartype name: str - :ivar history: - :vartype history: bool - :ivar custom_domains: - :vartype custom_domains: - list[~azure.mgmt.cdn.models.ResourcesResponseEndpointsPropertiesItemsItem] - """ - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "history": {"key": "history", "type": "bool"}, - "custom_domains": {"key": "customDomains", "type": "[ResourcesResponseEndpointsPropertiesItemsItem]"}, - } - - def __init__( - self, - *, - id: Optional[str] = None, # pylint: disable=redefined-builtin - name: Optional[str] = None, - history: Optional[bool] = None, - custom_domains: Optional[list["_models.ResourcesResponseEndpointsPropertiesItemsItem"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword id: - :paramtype id: str - :keyword name: - :paramtype name: str - :keyword history: - :paramtype history: bool - :keyword custom_domains: - :paramtype custom_domains: - list[~azure.mgmt.cdn.models.ResourcesResponseEndpointsPropertiesItemsItem] - """ - super().__init__(**kwargs) - self.id = id - self.name = name - self.history = history - self.custom_domains = custom_domains - - -class ResourcesResponseEndpointsPropertiesItemsItem(_serialization.Model): # pylint: disable=name-too-long - """ResourcesResponseEndpointsPropertiesItemsItem. - - :ivar id: - :vartype id: str - :ivar name: - :vartype name: str - :ivar endpoint_id: - :vartype endpoint_id: str - :ivar history: - :vartype history: bool - """ - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "endpoint_id": {"key": "endpointId", "type": "str"}, - "history": {"key": "history", "type": "bool"}, - } - - def __init__( - self, - *, - id: Optional[str] = None, # pylint: disable=redefined-builtin - name: Optional[str] = None, - endpoint_id: Optional[str] = None, - history: Optional[bool] = None, - **kwargs: Any - ) -> None: - """ - :keyword id: - :paramtype id: str - :keyword name: - :paramtype name: str - :keyword endpoint_id: - :paramtype endpoint_id: str - :keyword history: - :paramtype history: bool - """ - super().__init__(**kwargs) - self.id = id - self.name = name - self.endpoint_id = endpoint_id - self.history = history - - -class ResourceUsage(_serialization.Model): - """Output of check resource usage API. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar resource_type: Resource type for which the usage is provided. - :vartype resource_type: str - :ivar unit: Unit of the usage. e.g. count. "count" - :vartype unit: str or ~azure.mgmt.cdn.models.ResourceUsageUnit - :ivar current_value: Actual value of usage on the specified resource type. - :vartype current_value: int - :ivar limit: Quota of the specified resource type. - :vartype limit: int - """ - - _validation = { - "resource_type": {"readonly": True}, - "unit": {"readonly": True}, - "current_value": {"readonly": True}, - "limit": {"readonly": True}, - } - - _attribute_map = { - "resource_type": {"key": "resourceType", "type": "str"}, - "unit": {"key": "unit", "type": "str"}, - "current_value": {"key": "currentValue", "type": "int"}, - "limit": {"key": "limit", "type": "int"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.resource_type: Optional[str] = None - self.unit: Optional[Union[str, "_models.ResourceUsageUnit"]] = None - self.current_value: Optional[int] = None - self.limit: Optional[int] = None - - -class ResourceUsageListResult(_serialization.Model): - """Output of check resource usage API. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: List of resource usages. - :vartype value: list[~azure.mgmt.cdn.models.ResourceUsage] - :ivar next_link: URL to get the next set of custom domain objects if there are any. - :vartype next_link: str - """ - - _validation = { - "value": {"readonly": True}, - } - - _attribute_map = { - "value": {"key": "value", "type": "[ResourceUsage]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__(self, *, next_link: Optional[str] = None, **kwargs: Any) -> None: - """ - :keyword next_link: URL to get the next set of custom domain objects if there are any. - :paramtype next_link: str - """ - super().__init__(**kwargs) - self.value: Optional[list["_models.ResourceUsage"]] = None - self.next_link = next_link - - -class ResponseBasedOriginErrorDetectionParameters(_serialization.Model): # pylint: disable=name-too-long - """The JSON object that contains the properties to determine origin health using real - requests/responses. - - :ivar response_based_detected_error_types: Type of response errors for real user requests for - which origin will be deemed unhealthy. Known values are: "None", "TcpErrorsOnly", and - "TcpAndHttpErrors". - :vartype response_based_detected_error_types: str or - ~azure.mgmt.cdn.models.ResponseBasedDetectedErrorTypes - :ivar response_based_failover_threshold_percentage: The percentage of failed requests in the - sample where failover should trigger. - :vartype response_based_failover_threshold_percentage: int - :ivar http_error_ranges: The list of Http status code ranges that are considered as server - errors for origin and it is marked as unhealthy. - :vartype http_error_ranges: list[~azure.mgmt.cdn.models.HttpErrorRangeParameters] - """ - - _validation = { - "response_based_failover_threshold_percentage": {"maximum": 100, "minimum": 0}, - } - - _attribute_map = { - "response_based_detected_error_types": {"key": "responseBasedDetectedErrorTypes", "type": "str"}, - "response_based_failover_threshold_percentage": { - "key": "responseBasedFailoverThresholdPercentage", - "type": "int", - }, - "http_error_ranges": {"key": "httpErrorRanges", "type": "[HttpErrorRangeParameters]"}, - } - - def __init__( - self, - *, - response_based_detected_error_types: Optional[Union[str, "_models.ResponseBasedDetectedErrorTypes"]] = None, - response_based_failover_threshold_percentage: Optional[int] = None, - http_error_ranges: Optional[list["_models.HttpErrorRangeParameters"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword response_based_detected_error_types: Type of response errors for real user requests - for which origin will be deemed unhealthy. Known values are: "None", "TcpErrorsOnly", and - "TcpAndHttpErrors". - :paramtype response_based_detected_error_types: str or - ~azure.mgmt.cdn.models.ResponseBasedDetectedErrorTypes - :keyword response_based_failover_threshold_percentage: The percentage of failed requests in the - sample where failover should trigger. - :paramtype response_based_failover_threshold_percentage: int - :keyword http_error_ranges: The list of Http status code ranges that are considered as server - errors for origin and it is marked as unhealthy. - :paramtype http_error_ranges: list[~azure.mgmt.cdn.models.HttpErrorRangeParameters] - """ - super().__init__(**kwargs) - self.response_based_detected_error_types = response_based_detected_error_types - self.response_based_failover_threshold_percentage = response_based_failover_threshold_percentage - self.http_error_ranges = http_error_ranges - - -class Route(ProxyResource): - """Friendly Routes name mapping to the any Routes or secret related information. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. E.g. - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy - information. - :vartype system_data: ~azure.mgmt.cdn.models.SystemData - :ivar endpoint_name: The name of the endpoint which holds the route. - :vartype endpoint_name: str - :ivar custom_domains: Domains referenced by this endpoint. - :vartype custom_domains: list[~azure.mgmt.cdn.models.ActivatedResourceReference] - :ivar origin_group: A reference to the origin group. - :vartype origin_group: ~azure.mgmt.cdn.models.ResourceReference - :ivar origin_path: A directory path on the origin that AzureFrontDoor can use to retrieve - content from, e.g. contoso.cloudapp.net/originpath. - :vartype origin_path: str - :ivar rule_sets: rule sets referenced by this endpoint. - :vartype rule_sets: list[~azure.mgmt.cdn.models.ResourceReference] - :ivar supported_protocols: List of supported protocols for this route. - :vartype supported_protocols: list[str or ~azure.mgmt.cdn.models.AFDEndpointProtocols] - :ivar patterns_to_match: The route patterns of the rule. - :vartype patterns_to_match: list[str] - :ivar cache_configuration: The caching configuration for this route. To disable caching, do not - provide a cacheConfiguration object. - :vartype cache_configuration: ~azure.mgmt.cdn.models.AfdRouteCacheConfiguration - :ivar forwarding_protocol: Protocol this rule will use when forwarding traffic to backends. - Known values are: "HttpOnly", "HttpsOnly", and "MatchRequest". - :vartype forwarding_protocol: str or ~azure.mgmt.cdn.models.ForwardingProtocol - :ivar link_to_default_domain: whether this route will be linked to the default endpoint domain. - Known values are: "Enabled" and "Disabled". - :vartype link_to_default_domain: str or ~azure.mgmt.cdn.models.LinkToDefaultDomain - :ivar https_redirect: Whether to automatically redirect HTTP traffic to HTTPS traffic. Note - that this is a easy way to set up this rule and it will be the first rule that gets executed. - Known values are: "Enabled" and "Disabled". - :vartype https_redirect: str or ~azure.mgmt.cdn.models.HttpsRedirect - :ivar enabled_state: Whether to enable use of this rule. Permitted values are 'Enabled' or - 'Disabled'. Known values are: "Enabled" and "Disabled". - :vartype enabled_state: str or ~azure.mgmt.cdn.models.EnabledState - :ivar provisioning_state: Provisioning status. Known values are: "Succeeded", "Failed", - "Updating", "Deleting", and "Creating". - :vartype provisioning_state: str or ~azure.mgmt.cdn.models.AfdProvisioningState - :ivar deployment_status: Known values are: "NotStarted", "InProgress", "Succeeded", and - "Failed". - :vartype deployment_status: str or ~azure.mgmt.cdn.models.DeploymentStatus - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "system_data": {"readonly": True}, - "endpoint_name": {"readonly": True}, - "provisioning_state": {"readonly": True}, - "deployment_status": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "system_data": {"key": "systemData", "type": "SystemData"}, - "endpoint_name": {"key": "properties.endpointName", "type": "str"}, - "custom_domains": {"key": "properties.customDomains", "type": "[ActivatedResourceReference]"}, - "origin_group": {"key": "properties.originGroup", "type": "ResourceReference"}, - "origin_path": {"key": "properties.originPath", "type": "str"}, - "rule_sets": {"key": "properties.ruleSets", "type": "[ResourceReference]"}, - "supported_protocols": {"key": "properties.supportedProtocols", "type": "[str]"}, - "patterns_to_match": {"key": "properties.patternsToMatch", "type": "[str]"}, - "cache_configuration": {"key": "properties.cacheConfiguration", "type": "AfdRouteCacheConfiguration"}, - "forwarding_protocol": {"key": "properties.forwardingProtocol", "type": "str"}, - "link_to_default_domain": {"key": "properties.linkToDefaultDomain", "type": "str"}, - "https_redirect": {"key": "properties.httpsRedirect", "type": "str"}, - "enabled_state": {"key": "properties.enabledState", "type": "str"}, - "provisioning_state": {"key": "properties.provisioningState", "type": "str"}, - "deployment_status": {"key": "properties.deploymentStatus", "type": "str"}, - } - - def __init__( - self, - *, - custom_domains: Optional[list["_models.ActivatedResourceReference"]] = None, - origin_group: Optional["_models.ResourceReference"] = None, - origin_path: Optional[str] = None, - rule_sets: Optional[list["_models.ResourceReference"]] = None, - supported_protocols: list[Union[str, "_models.AFDEndpointProtocols"]] = ["Http", "Https"], - patterns_to_match: Optional[list[str]] = None, - cache_configuration: Optional["_models.AfdRouteCacheConfiguration"] = None, - forwarding_protocol: Optional[Union[str, "_models.ForwardingProtocol"]] = None, - link_to_default_domain: Union[str, "_models.LinkToDefaultDomain"] = "Disabled", - https_redirect: Union[str, "_models.HttpsRedirect"] = "Disabled", - enabled_state: Optional[Union[str, "_models.EnabledState"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword custom_domains: Domains referenced by this endpoint. - :paramtype custom_domains: list[~azure.mgmt.cdn.models.ActivatedResourceReference] - :keyword origin_group: A reference to the origin group. - :paramtype origin_group: ~azure.mgmt.cdn.models.ResourceReference - :keyword origin_path: A directory path on the origin that AzureFrontDoor can use to retrieve - content from, e.g. contoso.cloudapp.net/originpath. - :paramtype origin_path: str - :keyword rule_sets: rule sets referenced by this endpoint. - :paramtype rule_sets: list[~azure.mgmt.cdn.models.ResourceReference] - :keyword supported_protocols: List of supported protocols for this route. - :paramtype supported_protocols: list[str or ~azure.mgmt.cdn.models.AFDEndpointProtocols] - :keyword patterns_to_match: The route patterns of the rule. - :paramtype patterns_to_match: list[str] - :keyword cache_configuration: The caching configuration for this route. To disable caching, do - not provide a cacheConfiguration object. - :paramtype cache_configuration: ~azure.mgmt.cdn.models.AfdRouteCacheConfiguration - :keyword forwarding_protocol: Protocol this rule will use when forwarding traffic to backends. - Known values are: "HttpOnly", "HttpsOnly", and "MatchRequest". - :paramtype forwarding_protocol: str or ~azure.mgmt.cdn.models.ForwardingProtocol - :keyword link_to_default_domain: whether this route will be linked to the default endpoint - domain. Known values are: "Enabled" and "Disabled". - :paramtype link_to_default_domain: str or ~azure.mgmt.cdn.models.LinkToDefaultDomain - :keyword https_redirect: Whether to automatically redirect HTTP traffic to HTTPS traffic. Note - that this is a easy way to set up this rule and it will be the first rule that gets executed. - Known values are: "Enabled" and "Disabled". - :paramtype https_redirect: str or ~azure.mgmt.cdn.models.HttpsRedirect - :keyword enabled_state: Whether to enable use of this rule. Permitted values are 'Enabled' or - 'Disabled'. Known values are: "Enabled" and "Disabled". - :paramtype enabled_state: str or ~azure.mgmt.cdn.models.EnabledState - """ - super().__init__(**kwargs) - self.endpoint_name: Optional[str] = None - self.custom_domains = custom_domains - self.origin_group = origin_group - self.origin_path = origin_path - self.rule_sets = rule_sets - self.supported_protocols = supported_protocols - self.patterns_to_match = patterns_to_match - self.cache_configuration = cache_configuration - self.forwarding_protocol = forwarding_protocol - self.link_to_default_domain = link_to_default_domain - self.https_redirect = https_redirect - self.enabled_state = enabled_state - self.provisioning_state: Optional[Union[str, "_models.AfdProvisioningState"]] = None - self.deployment_status: Optional[Union[str, "_models.DeploymentStatus"]] = None - - -class RouteConfigurationOverrideActionParameters(DeliveryRuleActionParameters): # pylint: disable=name-too-long - """Defines the parameters for the route configuration override action. - - All required parameters must be populated in order to send to server. - - :ivar type_name: Required. Known values are: "DeliveryRuleUrlRedirectActionParameters", - "DeliveryRuleUrlSigningActionParameters", "DeliveryRuleOriginGroupOverrideActionParameters", - "DeliveryRuleUrlRewriteActionParameters", "DeliveryRuleHeaderActionParameters", - "DeliveryRuleCacheExpirationActionParameters", - "DeliveryRuleCacheKeyQueryStringBehaviorActionParameters", and - "DeliveryRuleRouteConfigurationOverrideActionParameters". - :vartype type_name: str or ~azure.mgmt.cdn.models.DeliveryRuleActionParametersType - :ivar origin_group_override: A reference to the origin group override configuration. Leave - empty to use the default origin group on route. - :vartype origin_group_override: ~azure.mgmt.cdn.models.OriginGroupOverride - :ivar cache_configuration: The caching configuration associated with this rule. To disable - caching, do not provide a cacheConfiguration object. - :vartype cache_configuration: ~azure.mgmt.cdn.models.CacheConfiguration - """ - - _validation = { - "type_name": {"required": True}, - } - - _attribute_map = { - "type_name": {"key": "typeName", "type": "str"}, - "origin_group_override": {"key": "originGroupOverride", "type": "OriginGroupOverride"}, - "cache_configuration": {"key": "cacheConfiguration", "type": "CacheConfiguration"}, - } - - def __init__( - self, - *, - origin_group_override: Optional["_models.OriginGroupOverride"] = None, - cache_configuration: Optional["_models.CacheConfiguration"] = None, - **kwargs: Any - ) -> None: - """ - :keyword origin_group_override: A reference to the origin group override configuration. Leave - empty to use the default origin group on route. - :paramtype origin_group_override: ~azure.mgmt.cdn.models.OriginGroupOverride - :keyword cache_configuration: The caching configuration associated with this rule. To disable - caching, do not provide a cacheConfiguration object. - :paramtype cache_configuration: ~azure.mgmt.cdn.models.CacheConfiguration - """ - super().__init__(**kwargs) - self.type_name: str = "DeliveryRuleRouteConfigurationOverrideActionParameters" - self.origin_group_override = origin_group_override - self.cache_configuration = cache_configuration - - -class RouteListResult(_serialization.Model): - """Result of the request to list routes. It contains a list of route objects and a URL link to get - the next set of results. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: List of AzureFrontDoor routes within a profile. - :vartype value: list[~azure.mgmt.cdn.models.Route] - :ivar next_link: URL to get the next set of route objects if there are any. - :vartype next_link: str - """ - - _validation = { - "value": {"readonly": True}, - } - - _attribute_map = { - "value": {"key": "value", "type": "[Route]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__(self, *, next_link: Optional[str] = None, **kwargs: Any) -> None: - """ - :keyword next_link: URL to get the next set of route objects if there are any. - :paramtype next_link: str - """ - super().__init__(**kwargs) - self.value: Optional[list["_models.Route"]] = None - self.next_link = next_link - - -class RouteUpdatePropertiesParameters(_serialization.Model): - """The JSON object that contains the properties of the domain to create. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar endpoint_name: The name of the endpoint which holds the route. - :vartype endpoint_name: str - :ivar custom_domains: Domains referenced by this endpoint. - :vartype custom_domains: list[~azure.mgmt.cdn.models.ActivatedResourceReference] - :ivar origin_group: A reference to the origin group. - :vartype origin_group: ~azure.mgmt.cdn.models.ResourceReference - :ivar origin_path: A directory path on the origin that AzureFrontDoor can use to retrieve - content from, e.g. contoso.cloudapp.net/originpath. - :vartype origin_path: str - :ivar rule_sets: rule sets referenced by this endpoint. - :vartype rule_sets: list[~azure.mgmt.cdn.models.ResourceReference] - :ivar supported_protocols: List of supported protocols for this route. - :vartype supported_protocols: list[str or ~azure.mgmt.cdn.models.AFDEndpointProtocols] - :ivar patterns_to_match: The route patterns of the rule. - :vartype patterns_to_match: list[str] - :ivar cache_configuration: The caching configuration for this route. To disable caching, do not - provide a cacheConfiguration object. - :vartype cache_configuration: ~azure.mgmt.cdn.models.AfdRouteCacheConfiguration - :ivar forwarding_protocol: Protocol this rule will use when forwarding traffic to backends. - Known values are: "HttpOnly", "HttpsOnly", and "MatchRequest". - :vartype forwarding_protocol: str or ~azure.mgmt.cdn.models.ForwardingProtocol - :ivar link_to_default_domain: whether this route will be linked to the default endpoint domain. - Known values are: "Enabled" and "Disabled". - :vartype link_to_default_domain: str or ~azure.mgmt.cdn.models.LinkToDefaultDomain - :ivar https_redirect: Whether to automatically redirect HTTP traffic to HTTPS traffic. Note - that this is a easy way to set up this rule and it will be the first rule that gets executed. - Known values are: "Enabled" and "Disabled". - :vartype https_redirect: str or ~azure.mgmt.cdn.models.HttpsRedirect - :ivar enabled_state: Whether to enable use of this rule. Permitted values are 'Enabled' or - 'Disabled'. Known values are: "Enabled" and "Disabled". - :vartype enabled_state: str or ~azure.mgmt.cdn.models.EnabledState - """ - - _validation = { - "endpoint_name": {"readonly": True}, - } - - _attribute_map = { - "endpoint_name": {"key": "endpointName", "type": "str"}, - "custom_domains": {"key": "customDomains", "type": "[ActivatedResourceReference]"}, - "origin_group": {"key": "originGroup", "type": "ResourceReference"}, - "origin_path": {"key": "originPath", "type": "str"}, - "rule_sets": {"key": "ruleSets", "type": "[ResourceReference]"}, - "supported_protocols": {"key": "supportedProtocols", "type": "[str]"}, - "patterns_to_match": {"key": "patternsToMatch", "type": "[str]"}, - "cache_configuration": {"key": "cacheConfiguration", "type": "AfdRouteCacheConfiguration"}, - "forwarding_protocol": {"key": "forwardingProtocol", "type": "str"}, - "link_to_default_domain": {"key": "linkToDefaultDomain", "type": "str"}, - "https_redirect": {"key": "httpsRedirect", "type": "str"}, - "enabled_state": {"key": "enabledState", "type": "str"}, - } - - def __init__( - self, - *, - custom_domains: Optional[list["_models.ActivatedResourceReference"]] = None, - origin_group: Optional["_models.ResourceReference"] = None, - origin_path: Optional[str] = None, - rule_sets: Optional[list["_models.ResourceReference"]] = None, - supported_protocols: list[Union[str, "_models.AFDEndpointProtocols"]] = ["Http", "Https"], - patterns_to_match: Optional[list[str]] = None, - cache_configuration: Optional["_models.AfdRouteCacheConfiguration"] = None, - forwarding_protocol: Optional[Union[str, "_models.ForwardingProtocol"]] = None, - link_to_default_domain: Union[str, "_models.LinkToDefaultDomain"] = "Disabled", - https_redirect: Union[str, "_models.HttpsRedirect"] = "Disabled", - enabled_state: Optional[Union[str, "_models.EnabledState"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword custom_domains: Domains referenced by this endpoint. - :paramtype custom_domains: list[~azure.mgmt.cdn.models.ActivatedResourceReference] - :keyword origin_group: A reference to the origin group. - :paramtype origin_group: ~azure.mgmt.cdn.models.ResourceReference - :keyword origin_path: A directory path on the origin that AzureFrontDoor can use to retrieve - content from, e.g. contoso.cloudapp.net/originpath. - :paramtype origin_path: str - :keyword rule_sets: rule sets referenced by this endpoint. - :paramtype rule_sets: list[~azure.mgmt.cdn.models.ResourceReference] - :keyword supported_protocols: List of supported protocols for this route. - :paramtype supported_protocols: list[str or ~azure.mgmt.cdn.models.AFDEndpointProtocols] - :keyword patterns_to_match: The route patterns of the rule. - :paramtype patterns_to_match: list[str] - :keyword cache_configuration: The caching configuration for this route. To disable caching, do - not provide a cacheConfiguration object. - :paramtype cache_configuration: ~azure.mgmt.cdn.models.AfdRouteCacheConfiguration - :keyword forwarding_protocol: Protocol this rule will use when forwarding traffic to backends. - Known values are: "HttpOnly", "HttpsOnly", and "MatchRequest". - :paramtype forwarding_protocol: str or ~azure.mgmt.cdn.models.ForwardingProtocol - :keyword link_to_default_domain: whether this route will be linked to the default endpoint - domain. Known values are: "Enabled" and "Disabled". - :paramtype link_to_default_domain: str or ~azure.mgmt.cdn.models.LinkToDefaultDomain - :keyword https_redirect: Whether to automatically redirect HTTP traffic to HTTPS traffic. Note - that this is a easy way to set up this rule and it will be the first rule that gets executed. - Known values are: "Enabled" and "Disabled". - :paramtype https_redirect: str or ~azure.mgmt.cdn.models.HttpsRedirect - :keyword enabled_state: Whether to enable use of this rule. Permitted values are 'Enabled' or - 'Disabled'. Known values are: "Enabled" and "Disabled". - :paramtype enabled_state: str or ~azure.mgmt.cdn.models.EnabledState - """ - super().__init__(**kwargs) - self.endpoint_name: Optional[str] = None - self.custom_domains = custom_domains - self.origin_group = origin_group - self.origin_path = origin_path - self.rule_sets = rule_sets - self.supported_protocols = supported_protocols - self.patterns_to_match = patterns_to_match - self.cache_configuration = cache_configuration - self.forwarding_protocol = forwarding_protocol - self.link_to_default_domain = link_to_default_domain - self.https_redirect = https_redirect - self.enabled_state = enabled_state - - -class RouteProperties(RouteUpdatePropertiesParameters, AFDStateProperties): - """The JSON object that contains the properties of the Routes to create. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar provisioning_state: Provisioning status. Known values are: "Succeeded", "Failed", - "Updating", "Deleting", and "Creating". - :vartype provisioning_state: str or ~azure.mgmt.cdn.models.AfdProvisioningState - :ivar deployment_status: Known values are: "NotStarted", "InProgress", "Succeeded", and - "Failed". - :vartype deployment_status: str or ~azure.mgmt.cdn.models.DeploymentStatus - :ivar endpoint_name: The name of the endpoint which holds the route. - :vartype endpoint_name: str - :ivar custom_domains: Domains referenced by this endpoint. - :vartype custom_domains: list[~azure.mgmt.cdn.models.ActivatedResourceReference] - :ivar origin_group: A reference to the origin group. - :vartype origin_group: ~azure.mgmt.cdn.models.ResourceReference - :ivar origin_path: A directory path on the origin that AzureFrontDoor can use to retrieve - content from, e.g. contoso.cloudapp.net/originpath. - :vartype origin_path: str - :ivar rule_sets: rule sets referenced by this endpoint. - :vartype rule_sets: list[~azure.mgmt.cdn.models.ResourceReference] - :ivar supported_protocols: List of supported protocols for this route. - :vartype supported_protocols: list[str or ~azure.mgmt.cdn.models.AFDEndpointProtocols] - :ivar patterns_to_match: The route patterns of the rule. - :vartype patterns_to_match: list[str] - :ivar cache_configuration: The caching configuration for this route. To disable caching, do not - provide a cacheConfiguration object. - :vartype cache_configuration: ~azure.mgmt.cdn.models.AfdRouteCacheConfiguration - :ivar forwarding_protocol: Protocol this rule will use when forwarding traffic to backends. - Known values are: "HttpOnly", "HttpsOnly", and "MatchRequest". - :vartype forwarding_protocol: str or ~azure.mgmt.cdn.models.ForwardingProtocol - :ivar link_to_default_domain: whether this route will be linked to the default endpoint domain. - Known values are: "Enabled" and "Disabled". - :vartype link_to_default_domain: str or ~azure.mgmt.cdn.models.LinkToDefaultDomain - :ivar https_redirect: Whether to automatically redirect HTTP traffic to HTTPS traffic. Note - that this is a easy way to set up this rule and it will be the first rule that gets executed. - Known values are: "Enabled" and "Disabled". - :vartype https_redirect: str or ~azure.mgmt.cdn.models.HttpsRedirect - :ivar enabled_state: Whether to enable use of this rule. Permitted values are 'Enabled' or - 'Disabled'. Known values are: "Enabled" and "Disabled". - :vartype enabled_state: str or ~azure.mgmt.cdn.models.EnabledState - """ - - _validation = { - "provisioning_state": {"readonly": True}, - "deployment_status": {"readonly": True}, - "endpoint_name": {"readonly": True}, - } - - _attribute_map = { - "provisioning_state": {"key": "provisioningState", "type": "str"}, - "deployment_status": {"key": "deploymentStatus", "type": "str"}, - "endpoint_name": {"key": "endpointName", "type": "str"}, - "custom_domains": {"key": "customDomains", "type": "[ActivatedResourceReference]"}, - "origin_group": {"key": "originGroup", "type": "ResourceReference"}, - "origin_path": {"key": "originPath", "type": "str"}, - "rule_sets": {"key": "ruleSets", "type": "[ResourceReference]"}, - "supported_protocols": {"key": "supportedProtocols", "type": "[str]"}, - "patterns_to_match": {"key": "patternsToMatch", "type": "[str]"}, - "cache_configuration": {"key": "cacheConfiguration", "type": "AfdRouteCacheConfiguration"}, - "forwarding_protocol": {"key": "forwardingProtocol", "type": "str"}, - "link_to_default_domain": {"key": "linkToDefaultDomain", "type": "str"}, - "https_redirect": {"key": "httpsRedirect", "type": "str"}, - "enabled_state": {"key": "enabledState", "type": "str"}, - } - - def __init__( - self, - *, - custom_domains: Optional[list["_models.ActivatedResourceReference"]] = None, - origin_group: Optional["_models.ResourceReference"] = None, - origin_path: Optional[str] = None, - rule_sets: Optional[list["_models.ResourceReference"]] = None, - supported_protocols: list[Union[str, "_models.AFDEndpointProtocols"]] = ["Http", "Https"], - patterns_to_match: Optional[list[str]] = None, - cache_configuration: Optional["_models.AfdRouteCacheConfiguration"] = None, - forwarding_protocol: Optional[Union[str, "_models.ForwardingProtocol"]] = None, - link_to_default_domain: Union[str, "_models.LinkToDefaultDomain"] = "Disabled", - https_redirect: Union[str, "_models.HttpsRedirect"] = "Disabled", - enabled_state: Optional[Union[str, "_models.EnabledState"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword custom_domains: Domains referenced by this endpoint. - :paramtype custom_domains: list[~azure.mgmt.cdn.models.ActivatedResourceReference] - :keyword origin_group: A reference to the origin group. - :paramtype origin_group: ~azure.mgmt.cdn.models.ResourceReference - :keyword origin_path: A directory path on the origin that AzureFrontDoor can use to retrieve - content from, e.g. contoso.cloudapp.net/originpath. - :paramtype origin_path: str - :keyword rule_sets: rule sets referenced by this endpoint. - :paramtype rule_sets: list[~azure.mgmt.cdn.models.ResourceReference] - :keyword supported_protocols: List of supported protocols for this route. - :paramtype supported_protocols: list[str or ~azure.mgmt.cdn.models.AFDEndpointProtocols] - :keyword patterns_to_match: The route patterns of the rule. - :paramtype patterns_to_match: list[str] - :keyword cache_configuration: The caching configuration for this route. To disable caching, do - not provide a cacheConfiguration object. - :paramtype cache_configuration: ~azure.mgmt.cdn.models.AfdRouteCacheConfiguration - :keyword forwarding_protocol: Protocol this rule will use when forwarding traffic to backends. - Known values are: "HttpOnly", "HttpsOnly", and "MatchRequest". - :paramtype forwarding_protocol: str or ~azure.mgmt.cdn.models.ForwardingProtocol - :keyword link_to_default_domain: whether this route will be linked to the default endpoint - domain. Known values are: "Enabled" and "Disabled". - :paramtype link_to_default_domain: str or ~azure.mgmt.cdn.models.LinkToDefaultDomain - :keyword https_redirect: Whether to automatically redirect HTTP traffic to HTTPS traffic. Note - that this is a easy way to set up this rule and it will be the first rule that gets executed. - Known values are: "Enabled" and "Disabled". - :paramtype https_redirect: str or ~azure.mgmt.cdn.models.HttpsRedirect - :keyword enabled_state: Whether to enable use of this rule. Permitted values are 'Enabled' or - 'Disabled'. Known values are: "Enabled" and "Disabled". - :paramtype enabled_state: str or ~azure.mgmt.cdn.models.EnabledState - """ - super().__init__( - custom_domains=custom_domains, - origin_group=origin_group, - origin_path=origin_path, - rule_sets=rule_sets, - supported_protocols=supported_protocols, - patterns_to_match=patterns_to_match, - cache_configuration=cache_configuration, - forwarding_protocol=forwarding_protocol, - link_to_default_domain=link_to_default_domain, - https_redirect=https_redirect, - enabled_state=enabled_state, - **kwargs - ) - self.provisioning_state: Optional[Union[str, "_models.AfdProvisioningState"]] = None - self.deployment_status: Optional[Union[str, "_models.DeploymentStatus"]] = None - self.endpoint_name: Optional[str] = None - self.custom_domains = custom_domains - self.origin_group = origin_group - self.origin_path = origin_path - self.rule_sets = rule_sets - self.supported_protocols = supported_protocols - self.patterns_to_match = patterns_to_match - self.cache_configuration = cache_configuration - self.forwarding_protocol = forwarding_protocol - self.link_to_default_domain = link_to_default_domain - self.https_redirect = https_redirect - self.enabled_state = enabled_state - - -class RouteUpdateParameters(_serialization.Model): - """The domain JSON object required for domain creation or update. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar endpoint_name: The name of the endpoint which holds the route. - :vartype endpoint_name: str - :ivar custom_domains: Domains referenced by this endpoint. - :vartype custom_domains: list[~azure.mgmt.cdn.models.ActivatedResourceReference] - :ivar origin_group: A reference to the origin group. - :vartype origin_group: ~azure.mgmt.cdn.models.ResourceReference - :ivar origin_path: A directory path on the origin that AzureFrontDoor can use to retrieve - content from, e.g. contoso.cloudapp.net/originpath. - :vartype origin_path: str - :ivar rule_sets: rule sets referenced by this endpoint. - :vartype rule_sets: list[~azure.mgmt.cdn.models.ResourceReference] - :ivar supported_protocols: List of supported protocols for this route. - :vartype supported_protocols: list[str or ~azure.mgmt.cdn.models.AFDEndpointProtocols] - :ivar patterns_to_match: The route patterns of the rule. - :vartype patterns_to_match: list[str] - :ivar cache_configuration: The caching configuration for this route. To disable caching, do not - provide a cacheConfiguration object. - :vartype cache_configuration: ~azure.mgmt.cdn.models.AfdRouteCacheConfiguration - :ivar forwarding_protocol: Protocol this rule will use when forwarding traffic to backends. - Known values are: "HttpOnly", "HttpsOnly", and "MatchRequest". - :vartype forwarding_protocol: str or ~azure.mgmt.cdn.models.ForwardingProtocol - :ivar link_to_default_domain: whether this route will be linked to the default endpoint domain. - Known values are: "Enabled" and "Disabled". - :vartype link_to_default_domain: str or ~azure.mgmt.cdn.models.LinkToDefaultDomain - :ivar https_redirect: Whether to automatically redirect HTTP traffic to HTTPS traffic. Note - that this is a easy way to set up this rule and it will be the first rule that gets executed. - Known values are: "Enabled" and "Disabled". - :vartype https_redirect: str or ~azure.mgmt.cdn.models.HttpsRedirect - :ivar enabled_state: Whether to enable use of this rule. Permitted values are 'Enabled' or - 'Disabled'. Known values are: "Enabled" and "Disabled". - :vartype enabled_state: str or ~azure.mgmt.cdn.models.EnabledState - """ - - _validation = { - "endpoint_name": {"readonly": True}, - } - - _attribute_map = { - "endpoint_name": {"key": "properties.endpointName", "type": "str"}, - "custom_domains": {"key": "properties.customDomains", "type": "[ActivatedResourceReference]"}, - "origin_group": {"key": "properties.originGroup", "type": "ResourceReference"}, - "origin_path": {"key": "properties.originPath", "type": "str"}, - "rule_sets": {"key": "properties.ruleSets", "type": "[ResourceReference]"}, - "supported_protocols": {"key": "properties.supportedProtocols", "type": "[str]"}, - "patterns_to_match": {"key": "properties.patternsToMatch", "type": "[str]"}, - "cache_configuration": {"key": "properties.cacheConfiguration", "type": "AfdRouteCacheConfiguration"}, - "forwarding_protocol": {"key": "properties.forwardingProtocol", "type": "str"}, - "link_to_default_domain": {"key": "properties.linkToDefaultDomain", "type": "str"}, - "https_redirect": {"key": "properties.httpsRedirect", "type": "str"}, - "enabled_state": {"key": "properties.enabledState", "type": "str"}, - } - - def __init__( - self, - *, - custom_domains: Optional[list["_models.ActivatedResourceReference"]] = None, - origin_group: Optional["_models.ResourceReference"] = None, - origin_path: Optional[str] = None, - rule_sets: Optional[list["_models.ResourceReference"]] = None, - supported_protocols: list[Union[str, "_models.AFDEndpointProtocols"]] = ["Http", "Https"], - patterns_to_match: Optional[list[str]] = None, - cache_configuration: Optional["_models.AfdRouteCacheConfiguration"] = None, - forwarding_protocol: Optional[Union[str, "_models.ForwardingProtocol"]] = None, - link_to_default_domain: Union[str, "_models.LinkToDefaultDomain"] = "Disabled", - https_redirect: Union[str, "_models.HttpsRedirect"] = "Disabled", - enabled_state: Optional[Union[str, "_models.EnabledState"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword custom_domains: Domains referenced by this endpoint. - :paramtype custom_domains: list[~azure.mgmt.cdn.models.ActivatedResourceReference] - :keyword origin_group: A reference to the origin group. - :paramtype origin_group: ~azure.mgmt.cdn.models.ResourceReference - :keyword origin_path: A directory path on the origin that AzureFrontDoor can use to retrieve - content from, e.g. contoso.cloudapp.net/originpath. - :paramtype origin_path: str - :keyword rule_sets: rule sets referenced by this endpoint. - :paramtype rule_sets: list[~azure.mgmt.cdn.models.ResourceReference] - :keyword supported_protocols: List of supported protocols for this route. - :paramtype supported_protocols: list[str or ~azure.mgmt.cdn.models.AFDEndpointProtocols] - :keyword patterns_to_match: The route patterns of the rule. - :paramtype patterns_to_match: list[str] - :keyword cache_configuration: The caching configuration for this route. To disable caching, do - not provide a cacheConfiguration object. - :paramtype cache_configuration: ~azure.mgmt.cdn.models.AfdRouteCacheConfiguration - :keyword forwarding_protocol: Protocol this rule will use when forwarding traffic to backends. - Known values are: "HttpOnly", "HttpsOnly", and "MatchRequest". - :paramtype forwarding_protocol: str or ~azure.mgmt.cdn.models.ForwardingProtocol - :keyword link_to_default_domain: whether this route will be linked to the default endpoint - domain. Known values are: "Enabled" and "Disabled". - :paramtype link_to_default_domain: str or ~azure.mgmt.cdn.models.LinkToDefaultDomain - :keyword https_redirect: Whether to automatically redirect HTTP traffic to HTTPS traffic. Note - that this is a easy way to set up this rule and it will be the first rule that gets executed. - Known values are: "Enabled" and "Disabled". - :paramtype https_redirect: str or ~azure.mgmt.cdn.models.HttpsRedirect - :keyword enabled_state: Whether to enable use of this rule. Permitted values are 'Enabled' or - 'Disabled'. Known values are: "Enabled" and "Disabled". - :paramtype enabled_state: str or ~azure.mgmt.cdn.models.EnabledState - """ - super().__init__(**kwargs) - self.endpoint_name: Optional[str] = None - self.custom_domains = custom_domains - self.origin_group = origin_group - self.origin_path = origin_path - self.rule_sets = rule_sets - self.supported_protocols = supported_protocols - self.patterns_to_match = patterns_to_match - self.cache_configuration = cache_configuration - self.forwarding_protocol = forwarding_protocol - self.link_to_default_domain = link_to_default_domain - self.https_redirect = https_redirect - self.enabled_state = enabled_state - - -class Rule(ProxyResource): - """Friendly Rules name mapping to the any Rules or secret related information. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. E.g. - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy - information. - :vartype system_data: ~azure.mgmt.cdn.models.SystemData - :ivar rule_set_name: The name of the rule set containing the rule. - :vartype rule_set_name: str - :ivar order: The order in which the rules are applied for the endpoint. Possible values - {0,1,2,3,………}. A rule with a lesser order will be applied before a rule with a greater order. - Rule with order 0 is a special rule. It does not require any condition and actions listed in it - will always be applied. - :vartype order: int - :ivar conditions: A list of conditions that must be matched for the actions to be executed. - :vartype conditions: list[~azure.mgmt.cdn.models.DeliveryRuleCondition] - :ivar actions: A list of actions that are executed when all the conditions of a rule are - satisfied. - :vartype actions: list[~azure.mgmt.cdn.models.DeliveryRuleAction] - :ivar match_processing_behavior: If this rule is a match should the rules engine continue - running the remaining rules or stop. If not present, defaults to Continue. Known values are: - "Continue" and "Stop". - :vartype match_processing_behavior: str or ~azure.mgmt.cdn.models.MatchProcessingBehavior - :ivar provisioning_state: Provisioning status. Known values are: "Succeeded", "Failed", - "Updating", "Deleting", and "Creating". - :vartype provisioning_state: str or ~azure.mgmt.cdn.models.AfdProvisioningState - :ivar deployment_status: Known values are: "NotStarted", "InProgress", "Succeeded", and - "Failed". - :vartype deployment_status: str or ~azure.mgmt.cdn.models.DeploymentStatus - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "system_data": {"readonly": True}, - "rule_set_name": {"readonly": True}, - "provisioning_state": {"readonly": True}, - "deployment_status": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "system_data": {"key": "systemData", "type": "SystemData"}, - "rule_set_name": {"key": "properties.ruleSetName", "type": "str"}, - "order": {"key": "properties.order", "type": "int"}, - "conditions": {"key": "properties.conditions", "type": "[DeliveryRuleCondition]"}, - "actions": {"key": "properties.actions", "type": "[DeliveryRuleAction]"}, - "match_processing_behavior": {"key": "properties.matchProcessingBehavior", "type": "str"}, - "provisioning_state": {"key": "properties.provisioningState", "type": "str"}, - "deployment_status": {"key": "properties.deploymentStatus", "type": "str"}, - } - - def __init__( - self, - *, - order: Optional[int] = None, - conditions: Optional[list["_models.DeliveryRuleCondition"]] = None, - actions: Optional[list["_models.DeliveryRuleAction"]] = None, - match_processing_behavior: Union[str, "_models.MatchProcessingBehavior"] = "Continue", - **kwargs: Any - ) -> None: - """ - :keyword order: The order in which the rules are applied for the endpoint. Possible values - {0,1,2,3,………}. A rule with a lesser order will be applied before a rule with a greater order. - Rule with order 0 is a special rule. It does not require any condition and actions listed in it - will always be applied. - :paramtype order: int - :keyword conditions: A list of conditions that must be matched for the actions to be executed. - :paramtype conditions: list[~azure.mgmt.cdn.models.DeliveryRuleCondition] - :keyword actions: A list of actions that are executed when all the conditions of a rule are - satisfied. - :paramtype actions: list[~azure.mgmt.cdn.models.DeliveryRuleAction] - :keyword match_processing_behavior: If this rule is a match should the rules engine continue - running the remaining rules or stop. If not present, defaults to Continue. Known values are: - "Continue" and "Stop". - :paramtype match_processing_behavior: str or ~azure.mgmt.cdn.models.MatchProcessingBehavior - """ - super().__init__(**kwargs) - self.rule_set_name: Optional[str] = None - self.order = order - self.conditions = conditions - self.actions = actions - self.match_processing_behavior = match_processing_behavior - self.provisioning_state: Optional[Union[str, "_models.AfdProvisioningState"]] = None - self.deployment_status: Optional[Union[str, "_models.DeploymentStatus"]] = None - - -class RuleListResult(_serialization.Model): - """Result of the request to list rules. It contains a list of rule objects and a URL link to get - the next set of results. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: List of AzureFrontDoor rules within a rule set. - :vartype value: list[~azure.mgmt.cdn.models.Rule] - :ivar next_link: URL to get the next set of rule objects if there are any. - :vartype next_link: str - """ - - _validation = { - "value": {"readonly": True}, - } - - _attribute_map = { - "value": {"key": "value", "type": "[Rule]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__(self, *, next_link: Optional[str] = None, **kwargs: Any) -> None: - """ - :keyword next_link: URL to get the next set of rule objects if there are any. - :paramtype next_link: str - """ - super().__init__(**kwargs) - self.value: Optional[list["_models.Rule"]] = None - self.next_link = next_link - - -class RuleUpdatePropertiesParameters(_serialization.Model): - """The JSON object that contains the properties of the rule to update. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar rule_set_name: The name of the rule set containing the rule. - :vartype rule_set_name: str - :ivar order: The order in which the rules are applied for the endpoint. Possible values - {0,1,2,3,………}. A rule with a lesser order will be applied before a rule with a greater order. - Rule with order 0 is a special rule. It does not require any condition and actions listed in it - will always be applied. - :vartype order: int - :ivar conditions: A list of conditions that must be matched for the actions to be executed. - :vartype conditions: list[~azure.mgmt.cdn.models.DeliveryRuleCondition] - :ivar actions: A list of actions that are executed when all the conditions of a rule are - satisfied. - :vartype actions: list[~azure.mgmt.cdn.models.DeliveryRuleAction] - :ivar match_processing_behavior: If this rule is a match should the rules engine continue - running the remaining rules or stop. If not present, defaults to Continue. Known values are: - "Continue" and "Stop". - :vartype match_processing_behavior: str or ~azure.mgmt.cdn.models.MatchProcessingBehavior - """ - - _validation = { - "rule_set_name": {"readonly": True}, - } - - _attribute_map = { - "rule_set_name": {"key": "ruleSetName", "type": "str"}, - "order": {"key": "order", "type": "int"}, - "conditions": {"key": "conditions", "type": "[DeliveryRuleCondition]"}, - "actions": {"key": "actions", "type": "[DeliveryRuleAction]"}, - "match_processing_behavior": {"key": "matchProcessingBehavior", "type": "str"}, - } - - def __init__( - self, - *, - order: Optional[int] = None, - conditions: Optional[list["_models.DeliveryRuleCondition"]] = None, - actions: Optional[list["_models.DeliveryRuleAction"]] = None, - match_processing_behavior: Union[str, "_models.MatchProcessingBehavior"] = "Continue", - **kwargs: Any - ) -> None: - """ - :keyword order: The order in which the rules are applied for the endpoint. Possible values - {0,1,2,3,………}. A rule with a lesser order will be applied before a rule with a greater order. - Rule with order 0 is a special rule. It does not require any condition and actions listed in it - will always be applied. - :paramtype order: int - :keyword conditions: A list of conditions that must be matched for the actions to be executed. - :paramtype conditions: list[~azure.mgmt.cdn.models.DeliveryRuleCondition] - :keyword actions: A list of actions that are executed when all the conditions of a rule are - satisfied. - :paramtype actions: list[~azure.mgmt.cdn.models.DeliveryRuleAction] - :keyword match_processing_behavior: If this rule is a match should the rules engine continue - running the remaining rules or stop. If not present, defaults to Continue. Known values are: - "Continue" and "Stop". - :paramtype match_processing_behavior: str or ~azure.mgmt.cdn.models.MatchProcessingBehavior - """ - super().__init__(**kwargs) - self.rule_set_name: Optional[str] = None - self.order = order - self.conditions = conditions - self.actions = actions - self.match_processing_behavior = match_processing_behavior - - -class RuleProperties(RuleUpdatePropertiesParameters, AFDStateProperties): - """The JSON object that contains the properties of the Rules to create. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar provisioning_state: Provisioning status. Known values are: "Succeeded", "Failed", - "Updating", "Deleting", and "Creating". - :vartype provisioning_state: str or ~azure.mgmt.cdn.models.AfdProvisioningState - :ivar deployment_status: Known values are: "NotStarted", "InProgress", "Succeeded", and - "Failed". - :vartype deployment_status: str or ~azure.mgmt.cdn.models.DeploymentStatus - :ivar rule_set_name: The name of the rule set containing the rule. - :vartype rule_set_name: str - :ivar order: The order in which the rules are applied for the endpoint. Possible values - {0,1,2,3,………}. A rule with a lesser order will be applied before a rule with a greater order. - Rule with order 0 is a special rule. It does not require any condition and actions listed in it - will always be applied. - :vartype order: int - :ivar conditions: A list of conditions that must be matched for the actions to be executed. - :vartype conditions: list[~azure.mgmt.cdn.models.DeliveryRuleCondition] - :ivar actions: A list of actions that are executed when all the conditions of a rule are - satisfied. - :vartype actions: list[~azure.mgmt.cdn.models.DeliveryRuleAction] - :ivar match_processing_behavior: If this rule is a match should the rules engine continue - running the remaining rules or stop. If not present, defaults to Continue. Known values are: - "Continue" and "Stop". - :vartype match_processing_behavior: str or ~azure.mgmt.cdn.models.MatchProcessingBehavior - """ - - _validation = { - "provisioning_state": {"readonly": True}, - "deployment_status": {"readonly": True}, - "rule_set_name": {"readonly": True}, - } - - _attribute_map = { - "provisioning_state": {"key": "provisioningState", "type": "str"}, - "deployment_status": {"key": "deploymentStatus", "type": "str"}, - "rule_set_name": {"key": "ruleSetName", "type": "str"}, - "order": {"key": "order", "type": "int"}, - "conditions": {"key": "conditions", "type": "[DeliveryRuleCondition]"}, - "actions": {"key": "actions", "type": "[DeliveryRuleAction]"}, - "match_processing_behavior": {"key": "matchProcessingBehavior", "type": "str"}, - } - - def __init__( - self, - *, - order: Optional[int] = None, - conditions: Optional[list["_models.DeliveryRuleCondition"]] = None, - actions: Optional[list["_models.DeliveryRuleAction"]] = None, - match_processing_behavior: Union[str, "_models.MatchProcessingBehavior"] = "Continue", - **kwargs: Any - ) -> None: - """ - :keyword order: The order in which the rules are applied for the endpoint. Possible values - {0,1,2,3,………}. A rule with a lesser order will be applied before a rule with a greater order. - Rule with order 0 is a special rule. It does not require any condition and actions listed in it - will always be applied. - :paramtype order: int - :keyword conditions: A list of conditions that must be matched for the actions to be executed. - :paramtype conditions: list[~azure.mgmt.cdn.models.DeliveryRuleCondition] - :keyword actions: A list of actions that are executed when all the conditions of a rule are - satisfied. - :paramtype actions: list[~azure.mgmt.cdn.models.DeliveryRuleAction] - :keyword match_processing_behavior: If this rule is a match should the rules engine continue - running the remaining rules or stop. If not present, defaults to Continue. Known values are: - "Continue" and "Stop". - :paramtype match_processing_behavior: str or ~azure.mgmt.cdn.models.MatchProcessingBehavior - """ - super().__init__( - order=order, - conditions=conditions, - actions=actions, - match_processing_behavior=match_processing_behavior, - **kwargs - ) - self.provisioning_state: Optional[Union[str, "_models.AfdProvisioningState"]] = None - self.deployment_status: Optional[Union[str, "_models.DeploymentStatus"]] = None - self.rule_set_name: Optional[str] = None - self.order = order - self.conditions = conditions - self.actions = actions - self.match_processing_behavior = match_processing_behavior - - -class RuleSet(ProxyResource): - """Friendly RuleSet name mapping to the any RuleSet or secret related information. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. E.g. - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy - information. - :vartype system_data: ~azure.mgmt.cdn.models.SystemData - :ivar provisioning_state: Provisioning status. Known values are: "Succeeded", "Failed", - "Updating", "Deleting", and "Creating". - :vartype provisioning_state: str or ~azure.mgmt.cdn.models.AfdProvisioningState - :ivar deployment_status: Known values are: "NotStarted", "InProgress", "Succeeded", and - "Failed". - :vartype deployment_status: str or ~azure.mgmt.cdn.models.DeploymentStatus - :ivar profile_name: The name of the profile which holds the rule set. - :vartype profile_name: str - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "system_data": {"readonly": True}, - "provisioning_state": {"readonly": True}, - "deployment_status": {"readonly": True}, - "profile_name": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "system_data": {"key": "systemData", "type": "SystemData"}, - "provisioning_state": {"key": "properties.provisioningState", "type": "str"}, - "deployment_status": {"key": "properties.deploymentStatus", "type": "str"}, - "profile_name": {"key": "properties.profileName", "type": "str"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.provisioning_state: Optional[Union[str, "_models.AfdProvisioningState"]] = None - self.deployment_status: Optional[Union[str, "_models.DeploymentStatus"]] = None - self.profile_name: Optional[str] = None - - -class RuleSetListResult(_serialization.Model): - """Result of the request to list rule sets. It contains a list of rule set objects and a URL link - to get the next set of results. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: List of AzureFrontDoor rule sets within a profile. - :vartype value: list[~azure.mgmt.cdn.models.RuleSet] - :ivar next_link: URL to get the next set of rule set objects if there are any. - :vartype next_link: str - """ - - _validation = { - "value": {"readonly": True}, - } - - _attribute_map = { - "value": {"key": "value", "type": "[RuleSet]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__(self, *, next_link: Optional[str] = None, **kwargs: Any) -> None: - """ - :keyword next_link: URL to get the next set of rule set objects if there are any. - :paramtype next_link: str - """ - super().__init__(**kwargs) - self.value: Optional[list["_models.RuleSet"]] = None - self.next_link = next_link - - -class RuleSetProperties(AFDStateProperties): - """The JSON object that contains the properties of the Rule Set to create. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar provisioning_state: Provisioning status. Known values are: "Succeeded", "Failed", - "Updating", "Deleting", and "Creating". - :vartype provisioning_state: str or ~azure.mgmt.cdn.models.AfdProvisioningState - :ivar deployment_status: Known values are: "NotStarted", "InProgress", "Succeeded", and - "Failed". - :vartype deployment_status: str or ~azure.mgmt.cdn.models.DeploymentStatus - :ivar profile_name: The name of the profile which holds the rule set. - :vartype profile_name: str - """ - - _validation = { - "provisioning_state": {"readonly": True}, - "deployment_status": {"readonly": True}, - "profile_name": {"readonly": True}, - } - - _attribute_map = { - "provisioning_state": {"key": "provisioningState", "type": "str"}, - "deployment_status": {"key": "deploymentStatus", "type": "str"}, - "profile_name": {"key": "profileName", "type": "str"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.profile_name: Optional[str] = None - - -class RuleUpdateParameters(_serialization.Model): - """The domain JSON object required for domain creation or update. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar rule_set_name: The name of the rule set containing the rule. - :vartype rule_set_name: str - :ivar order: The order in which the rules are applied for the endpoint. Possible values - {0,1,2,3,………}. A rule with a lesser order will be applied before a rule with a greater order. - Rule with order 0 is a special rule. It does not require any condition and actions listed in it - will always be applied. - :vartype order: int - :ivar conditions: A list of conditions that must be matched for the actions to be executed. - :vartype conditions: list[~azure.mgmt.cdn.models.DeliveryRuleCondition] - :ivar actions: A list of actions that are executed when all the conditions of a rule are - satisfied. - :vartype actions: list[~azure.mgmt.cdn.models.DeliveryRuleAction] - :ivar match_processing_behavior: If this rule is a match should the rules engine continue - running the remaining rules or stop. If not present, defaults to Continue. Known values are: - "Continue" and "Stop". - :vartype match_processing_behavior: str or ~azure.mgmt.cdn.models.MatchProcessingBehavior - """ - - _validation = { - "rule_set_name": {"readonly": True}, - } - - _attribute_map = { - "rule_set_name": {"key": "properties.ruleSetName", "type": "str"}, - "order": {"key": "properties.order", "type": "int"}, - "conditions": {"key": "properties.conditions", "type": "[DeliveryRuleCondition]"}, - "actions": {"key": "properties.actions", "type": "[DeliveryRuleAction]"}, - "match_processing_behavior": {"key": "properties.matchProcessingBehavior", "type": "str"}, - } - - def __init__( - self, - *, - order: Optional[int] = None, - conditions: Optional[list["_models.DeliveryRuleCondition"]] = None, - actions: Optional[list["_models.DeliveryRuleAction"]] = None, - match_processing_behavior: Union[str, "_models.MatchProcessingBehavior"] = "Continue", - **kwargs: Any - ) -> None: - """ - :keyword order: The order in which the rules are applied for the endpoint. Possible values - {0,1,2,3,………}. A rule with a lesser order will be applied before a rule with a greater order. - Rule with order 0 is a special rule. It does not require any condition and actions listed in it - will always be applied. - :paramtype order: int - :keyword conditions: A list of conditions that must be matched for the actions to be executed. - :paramtype conditions: list[~azure.mgmt.cdn.models.DeliveryRuleCondition] - :keyword actions: A list of actions that are executed when all the conditions of a rule are - satisfied. - :paramtype actions: list[~azure.mgmt.cdn.models.DeliveryRuleAction] - :keyword match_processing_behavior: If this rule is a match should the rules engine continue - running the remaining rules or stop. If not present, defaults to Continue. Known values are: - "Continue" and "Stop". - :paramtype match_processing_behavior: str or ~azure.mgmt.cdn.models.MatchProcessingBehavior - """ - super().__init__(**kwargs) - self.rule_set_name: Optional[str] = None - self.order = order - self.conditions = conditions - self.actions = actions - self.match_processing_behavior = match_processing_behavior - - -class Secret(ProxyResource): - """Friendly Secret name mapping to the any Secret or secret related information. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. E.g. - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy - information. - :vartype system_data: ~azure.mgmt.cdn.models.SystemData - :ivar provisioning_state: Provisioning status. Known values are: "Succeeded", "Failed", - "Updating", "Deleting", and "Creating". - :vartype provisioning_state: str or ~azure.mgmt.cdn.models.AfdProvisioningState - :ivar deployment_status: Known values are: "NotStarted", "InProgress", "Succeeded", and - "Failed". - :vartype deployment_status: str or ~azure.mgmt.cdn.models.DeploymentStatus - :ivar profile_name: The name of the profile which holds the secret. - :vartype profile_name: str - :ivar parameters: object which contains secret parameters. - :vartype parameters: ~azure.mgmt.cdn.models.SecretParameters - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "system_data": {"readonly": True}, - "provisioning_state": {"readonly": True}, - "deployment_status": {"readonly": True}, - "profile_name": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "system_data": {"key": "systemData", "type": "SystemData"}, - "provisioning_state": {"key": "properties.provisioningState", "type": "str"}, - "deployment_status": {"key": "properties.deploymentStatus", "type": "str"}, - "profile_name": {"key": "properties.profileName", "type": "str"}, - "parameters": {"key": "properties.parameters", "type": "SecretParameters"}, - } - - def __init__(self, *, parameters: Optional["_models.SecretParameters"] = None, **kwargs: Any) -> None: - """ - :keyword parameters: object which contains secret parameters. - :paramtype parameters: ~azure.mgmt.cdn.models.SecretParameters - """ - super().__init__(**kwargs) - self.provisioning_state: Optional[Union[str, "_models.AfdProvisioningState"]] = None - self.deployment_status: Optional[Union[str, "_models.DeploymentStatus"]] = None - self.profile_name: Optional[str] = None - self.parameters = parameters - - -class SecretListResult(_serialization.Model): - """Result of the request to list secrets. It contains a list of Secret objects and a URL link to - get the next set of results. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: List of AzureFrontDoor secrets within a profile. - :vartype value: list[~azure.mgmt.cdn.models.Secret] - :ivar next_link: URL to get the next set of Secret objects if there are any. - :vartype next_link: str - """ - - _validation = { - "value": {"readonly": True}, - } - - _attribute_map = { - "value": {"key": "value", "type": "[Secret]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__(self, *, next_link: Optional[str] = None, **kwargs: Any) -> None: - """ - :keyword next_link: URL to get the next set of Secret objects if there are any. - :paramtype next_link: str - """ - super().__init__(**kwargs) - self.value: Optional[list["_models.Secret"]] = None - self.next_link = next_link - - -class SecretProperties(AFDStateProperties): - """The JSON object that contains the properties of the Secret to create. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar provisioning_state: Provisioning status. Known values are: "Succeeded", "Failed", - "Updating", "Deleting", and "Creating". - :vartype provisioning_state: str or ~azure.mgmt.cdn.models.AfdProvisioningState - :ivar deployment_status: Known values are: "NotStarted", "InProgress", "Succeeded", and - "Failed". - :vartype deployment_status: str or ~azure.mgmt.cdn.models.DeploymentStatus - :ivar profile_name: The name of the profile which holds the secret. - :vartype profile_name: str - :ivar parameters: object which contains secret parameters. - :vartype parameters: ~azure.mgmt.cdn.models.SecretParameters - """ - - _validation = { - "provisioning_state": {"readonly": True}, - "deployment_status": {"readonly": True}, - "profile_name": {"readonly": True}, - } - - _attribute_map = { - "provisioning_state": {"key": "provisioningState", "type": "str"}, - "deployment_status": {"key": "deploymentStatus", "type": "str"}, - "profile_name": {"key": "profileName", "type": "str"}, - "parameters": {"key": "parameters", "type": "SecretParameters"}, - } - - def __init__(self, *, parameters: Optional["_models.SecretParameters"] = None, **kwargs: Any) -> None: - """ - :keyword parameters: object which contains secret parameters. - :paramtype parameters: ~azure.mgmt.cdn.models.SecretParameters - """ - super().__init__(**kwargs) - self.profile_name: Optional[str] = None - self.parameters = parameters - - -class SecurityPolicy(ProxyResource): - """SecurityPolicy association for AzureFrontDoor profile. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. E.g. - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy - information. - :vartype system_data: ~azure.mgmt.cdn.models.SystemData - :ivar provisioning_state: Provisioning status. Known values are: "Succeeded", "Failed", - "Updating", "Deleting", and "Creating". - :vartype provisioning_state: str or ~azure.mgmt.cdn.models.AfdProvisioningState - :ivar deployment_status: Known values are: "NotStarted", "InProgress", "Succeeded", and - "Failed". - :vartype deployment_status: str or ~azure.mgmt.cdn.models.DeploymentStatus - :ivar profile_name: The name of the profile which holds the security policy. - :vartype profile_name: str - :ivar parameters: object which contains security policy parameters. - :vartype parameters: ~azure.mgmt.cdn.models.SecurityPolicyPropertiesParameters - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "system_data": {"readonly": True}, - "provisioning_state": {"readonly": True}, - "deployment_status": {"readonly": True}, - "profile_name": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "system_data": {"key": "systemData", "type": "SystemData"}, - "provisioning_state": {"key": "properties.provisioningState", "type": "str"}, - "deployment_status": {"key": "properties.deploymentStatus", "type": "str"}, - "profile_name": {"key": "properties.profileName", "type": "str"}, - "parameters": {"key": "properties.parameters", "type": "SecurityPolicyPropertiesParameters"}, - } - - def __init__( - self, *, parameters: Optional["_models.SecurityPolicyPropertiesParameters"] = None, **kwargs: Any - ) -> None: - """ - :keyword parameters: object which contains security policy parameters. - :paramtype parameters: ~azure.mgmt.cdn.models.SecurityPolicyPropertiesParameters - """ - super().__init__(**kwargs) - self.provisioning_state: Optional[Union[str, "_models.AfdProvisioningState"]] = None - self.deployment_status: Optional[Union[str, "_models.DeploymentStatus"]] = None - self.profile_name: Optional[str] = None - self.parameters = parameters - - -class SecurityPolicyListResult(_serialization.Model): - """Result of the request to list security policies. It contains a list of security policy objects - and a URL link to get the next set of results. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: List of Security policies within a profile. - :vartype value: list[~azure.mgmt.cdn.models.SecurityPolicy] - :ivar next_link: URL to get the next set of security policy objects if there is any. - :vartype next_link: str - """ - - _validation = { - "value": {"readonly": True}, - } - - _attribute_map = { - "value": {"key": "value", "type": "[SecurityPolicy]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__(self, *, next_link: Optional[str] = None, **kwargs: Any) -> None: - """ - :keyword next_link: URL to get the next set of security policy objects if there is any. - :paramtype next_link: str - """ - super().__init__(**kwargs) - self.value: Optional[list["_models.SecurityPolicy"]] = None - self.next_link = next_link - - -class SecurityPolicyProperties(AFDStateProperties): - """The json object that contains properties required to create a security policy. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar provisioning_state: Provisioning status. Known values are: "Succeeded", "Failed", - "Updating", "Deleting", and "Creating". - :vartype provisioning_state: str or ~azure.mgmt.cdn.models.AfdProvisioningState - :ivar deployment_status: Known values are: "NotStarted", "InProgress", "Succeeded", and - "Failed". - :vartype deployment_status: str or ~azure.mgmt.cdn.models.DeploymentStatus - :ivar profile_name: The name of the profile which holds the security policy. - :vartype profile_name: str - :ivar parameters: object which contains security policy parameters. - :vartype parameters: ~azure.mgmt.cdn.models.SecurityPolicyPropertiesParameters - """ - - _validation = { - "provisioning_state": {"readonly": True}, - "deployment_status": {"readonly": True}, - "profile_name": {"readonly": True}, - } - - _attribute_map = { - "provisioning_state": {"key": "provisioningState", "type": "str"}, - "deployment_status": {"key": "deploymentStatus", "type": "str"}, - "profile_name": {"key": "profileName", "type": "str"}, - "parameters": {"key": "parameters", "type": "SecurityPolicyPropertiesParameters"}, - } - - def __init__( - self, *, parameters: Optional["_models.SecurityPolicyPropertiesParameters"] = None, **kwargs: Any - ) -> None: - """ - :keyword parameters: object which contains security policy parameters. - :paramtype parameters: ~azure.mgmt.cdn.models.SecurityPolicyPropertiesParameters - """ - super().__init__(**kwargs) - self.profile_name: Optional[str] = None - self.parameters = parameters - - -class SecurityPolicyPropertiesParameters(_serialization.Model): - """The json object containing security policy parameters. - - You probably want to use the sub-classes and not this class directly. Known sub-classes are: - SecurityPolicyWebApplicationFirewallParameters - - All required parameters must be populated in order to send to server. - - :ivar type: The type of the Security policy to create. Required. "WebApplicationFirewall" - :vartype type: str or ~azure.mgmt.cdn.models.SecurityPolicyType - """ - - _validation = { - "type": {"required": True}, - } - - _attribute_map = { - "type": {"key": "type", "type": "str"}, - } - - _subtype_map = {"type": {"WebApplicationFirewall": "SecurityPolicyWebApplicationFirewallParameters"}} - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.type: Optional[str] = None - - -class SecurityPolicyUpdateParameters(_serialization.Model): - """The JSON object containing security policy update parameters. - - :ivar parameters: object which contains security policy parameters. - :vartype parameters: ~azure.mgmt.cdn.models.SecurityPolicyPropertiesParameters - """ - - _attribute_map = { - "parameters": {"key": "properties.parameters", "type": "SecurityPolicyPropertiesParameters"}, - } - - def __init__( - self, *, parameters: Optional["_models.SecurityPolicyPropertiesParameters"] = None, **kwargs: Any - ) -> None: - """ - :keyword parameters: object which contains security policy parameters. - :paramtype parameters: ~azure.mgmt.cdn.models.SecurityPolicyPropertiesParameters - """ - super().__init__(**kwargs) - self.parameters = parameters - - -class SecurityPolicyWebApplicationFirewallAssociation(_serialization.Model): # pylint: disable=name-too-long - """settings for security policy patterns to match. - - :ivar domains: List of domains. - :vartype domains: list[~azure.mgmt.cdn.models.ActivatedResourceReference] - :ivar patterns_to_match: List of paths. - :vartype patterns_to_match: list[str] - """ - - _attribute_map = { - "domains": {"key": "domains", "type": "[ActivatedResourceReference]"}, - "patterns_to_match": {"key": "patternsToMatch", "type": "[str]"}, - } - - def __init__( - self, - *, - domains: Optional[list["_models.ActivatedResourceReference"]] = None, - patterns_to_match: Optional[list[str]] = None, - **kwargs: Any - ) -> None: - """ - :keyword domains: List of domains. - :paramtype domains: list[~azure.mgmt.cdn.models.ActivatedResourceReference] - :keyword patterns_to_match: List of paths. - :paramtype patterns_to_match: list[str] - """ - super().__init__(**kwargs) - self.domains = domains - self.patterns_to_match = patterns_to_match - - -class SecurityPolicyWebApplicationFirewallParameters( - SecurityPolicyPropertiesParameters -): # pylint: disable=name-too-long - """The json object containing security policy waf parameters. - - All required parameters must be populated in order to send to server. - - :ivar type: The type of the Security policy to create. Required. "WebApplicationFirewall" - :vartype type: str or ~azure.mgmt.cdn.models.SecurityPolicyType - :ivar waf_policy: Resource ID. - :vartype waf_policy: ~azure.mgmt.cdn.models.ResourceReference - :ivar associations: Waf associations. - :vartype associations: - list[~azure.mgmt.cdn.models.SecurityPolicyWebApplicationFirewallAssociation] - """ - - _validation = { - "type": {"required": True}, - } - - _attribute_map = { - "type": {"key": "type", "type": "str"}, - "waf_policy": {"key": "wafPolicy", "type": "ResourceReference"}, - "associations": {"key": "associations", "type": "[SecurityPolicyWebApplicationFirewallAssociation]"}, - } - - def __init__( - self, - *, - waf_policy: Optional["_models.ResourceReference"] = None, - associations: Optional[list["_models.SecurityPolicyWebApplicationFirewallAssociation"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword waf_policy: Resource ID. - :paramtype waf_policy: ~azure.mgmt.cdn.models.ResourceReference - :keyword associations: Waf associations. - :paramtype associations: - list[~azure.mgmt.cdn.models.SecurityPolicyWebApplicationFirewallAssociation] - """ - super().__init__(**kwargs) - self.type: str = "WebApplicationFirewall" - self.waf_policy = waf_policy - self.associations = associations - - -class ServerPortMatchConditionParameters(DeliveryRuleConditionParameters): - """Defines the parameters for ServerPort match conditions. - - All required parameters must be populated in order to send to server. - - :ivar type_name: Required. Known values are: "DeliveryRuleRemoteAddressConditionParameters", - "DeliveryRuleRequestMethodConditionParameters", "DeliveryRuleQueryStringConditionParameters", - "DeliveryRulePostArgsConditionParameters", "DeliveryRuleRequestUriConditionParameters", - "DeliveryRuleRequestHeaderConditionParameters", "DeliveryRuleRequestBodyConditionParameters", - "DeliveryRuleRequestSchemeConditionParameters", "DeliveryRuleUrlPathMatchConditionParameters", - "DeliveryRuleUrlFileExtensionMatchConditionParameters", - "DeliveryRuleUrlFilenameConditionParameters", "DeliveryRuleHttpVersionConditionParameters", - "DeliveryRuleCookiesConditionParameters", "DeliveryRuleIsDeviceConditionParameters", - "DeliveryRuleSocketAddrConditionParameters", "DeliveryRuleClientPortConditionParameters", - "DeliveryRuleServerPortConditionParameters", "DeliveryRuleHostNameConditionParameters", and - "DeliveryRuleSslProtocolConditionParameters". - :vartype type_name: str or ~azure.mgmt.cdn.models.DeliveryRuleConditionParametersType - :ivar operator: Describes operator to be matched. Required. Known values are: "Any", "Equal", - "Contains", "BeginsWith", "EndsWith", "LessThan", "LessThanOrEqual", "GreaterThan", - "GreaterThanOrEqual", and "RegEx". - :vartype operator: str or ~azure.mgmt.cdn.models.ServerPortOperator - :ivar negate_condition: Describes if this is negate condition or not. - :vartype negate_condition: bool - :ivar match_values: The match value for the condition of the delivery rule. - :vartype match_values: list[str] - :ivar transforms: List of transforms. - :vartype transforms: list[str or ~azure.mgmt.cdn.models.Transform] - """ - - _validation = { - "type_name": {"required": True}, - "operator": {"required": True}, - } - - _attribute_map = { - "type_name": {"key": "typeName", "type": "str"}, - "operator": {"key": "operator", "type": "str"}, - "negate_condition": {"key": "negateCondition", "type": "bool"}, - "match_values": {"key": "matchValues", "type": "[str]"}, - "transforms": {"key": "transforms", "type": "[str]"}, - } - - def __init__( - self, - *, - operator: Union[str, "_models.ServerPortOperator"], - negate_condition: bool = False, - match_values: Optional[list[str]] = None, - transforms: Optional[list[Union[str, "_models.Transform"]]] = None, - **kwargs: Any - ) -> None: - """ - :keyword operator: Describes operator to be matched. Required. Known values are: "Any", - "Equal", "Contains", "BeginsWith", "EndsWith", "LessThan", "LessThanOrEqual", "GreaterThan", - "GreaterThanOrEqual", and "RegEx". - :paramtype operator: str or ~azure.mgmt.cdn.models.ServerPortOperator - :keyword negate_condition: Describes if this is negate condition or not. - :paramtype negate_condition: bool - :keyword match_values: The match value for the condition of the delivery rule. - :paramtype match_values: list[str] - :keyword transforms: List of transforms. - :paramtype transforms: list[str or ~azure.mgmt.cdn.models.Transform] - """ - super().__init__(**kwargs) - self.type_name: str = "DeliveryRuleServerPortConditionParameters" - self.operator = operator - self.negate_condition = negate_condition - self.match_values = match_values - self.transforms = transforms - - -class ServiceSpecification(_serialization.Model): - """One property of operation, include log specifications. - - :ivar log_specifications: Log specifications of operation. - :vartype log_specifications: list[~azure.mgmt.cdn.models.LogSpecification] - :ivar metric_specifications: Metric specifications of operation. - :vartype metric_specifications: list[~azure.mgmt.cdn.models.MetricSpecification] - """ - - _attribute_map = { - "log_specifications": {"key": "logSpecifications", "type": "[LogSpecification]"}, - "metric_specifications": {"key": "metricSpecifications", "type": "[MetricSpecification]"}, - } - - def __init__( - self, - *, - log_specifications: Optional[list["_models.LogSpecification"]] = None, - metric_specifications: Optional[list["_models.MetricSpecification"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword log_specifications: Log specifications of operation. - :paramtype log_specifications: list[~azure.mgmt.cdn.models.LogSpecification] - :keyword metric_specifications: Metric specifications of operation. - :paramtype metric_specifications: list[~azure.mgmt.cdn.models.MetricSpecification] - """ - super().__init__(**kwargs) - self.log_specifications = log_specifications - self.metric_specifications = metric_specifications - - -class SharedPrivateLinkResourceProperties(_serialization.Model): - """Describes the properties of an existing Shared Private Link Resource to use when connecting to - a private origin. - - :ivar private_link: The resource id of the resource the shared private link resource is for. - :vartype private_link: ~azure.mgmt.cdn.models.ResourceReference - :ivar private_link_location: The location of the shared private link resource. - :vartype private_link_location: str - :ivar group_id: The group id from the provider of resource the shared private link resource is - for. - :vartype group_id: str - :ivar request_message: The request message for requesting approval of the shared private link - resource. - :vartype request_message: str - :ivar status: Status of the shared private link resource. Can be Pending, Approved, Rejected, - Disconnected, or Timeout. Known values are: "Pending", "Approved", "Rejected", "Disconnected", - and "Timeout". - :vartype status: str or ~azure.mgmt.cdn.models.SharedPrivateLinkResourceStatus - """ - - _attribute_map = { - "private_link": {"key": "privateLink", "type": "ResourceReference"}, - "private_link_location": {"key": "privateLinkLocation", "type": "str"}, - "group_id": {"key": "groupId", "type": "str"}, - "request_message": {"key": "requestMessage", "type": "str"}, - "status": {"key": "status", "type": "str"}, - } - - def __init__( - self, - *, - private_link: Optional["_models.ResourceReference"] = None, - private_link_location: Optional[str] = None, - group_id: Optional[str] = None, - request_message: Optional[str] = None, - status: Optional[Union[str, "_models.SharedPrivateLinkResourceStatus"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword private_link: The resource id of the resource the shared private link resource is for. - :paramtype private_link: ~azure.mgmt.cdn.models.ResourceReference - :keyword private_link_location: The location of the shared private link resource. - :paramtype private_link_location: str - :keyword group_id: The group id from the provider of resource the shared private link resource - is for. - :paramtype group_id: str - :keyword request_message: The request message for requesting approval of the shared private - link resource. - :paramtype request_message: str - :keyword status: Status of the shared private link resource. Can be Pending, Approved, - Rejected, Disconnected, or Timeout. Known values are: "Pending", "Approved", "Rejected", - "Disconnected", and "Timeout". - :paramtype status: str or ~azure.mgmt.cdn.models.SharedPrivateLinkResourceStatus - """ - super().__init__(**kwargs) - self.private_link = private_link - self.private_link_location = private_link_location - self.group_id = group_id - self.request_message = request_message - self.status = status - - -class Sku(_serialization.Model): - """Standard_Verizon = The SKU name for a Standard Verizon CDN profile. Premium_Verizon = The SKU - name for a Premium Verizon CDN profile. Custom_Verizon = The SKU name for a Custom Verizon CDN - profile. Standard_Akamai = The SKU name for an Akamai CDN profile. Standard_ChinaCdn = The SKU - name for a China CDN profile for VOD, Web and download scenarios using GB based billing model. - Standard_Microsoft = The SKU name for a Standard Microsoft CDN profile. Standard_AzureFrontDoor - = The SKU name for an Azure Front Door Standard profile. Premium_AzureFrontDoor = The SKU name - for an Azure Front Door Premium profile. Standard_955BandWidth_ChinaCdn = The SKU name for a - China CDN profile for VOD, Web and download scenarios using 95-5 peak bandwidth billing model. - Standard_AvgBandWidth_ChinaCdn = The SKU name for a China CDN profile for VOD, Web and download - scenarios using monthly average peak bandwidth billing model. StandardPlus_ChinaCdn = The SKU - name for a China CDN profile for live-streaming using GB based billing model. - StandardPlus_955BandWidth_ChinaCdn = The SKU name for a China CDN live-streaming profile using - 95-5 peak bandwidth billing model. StandardPlus_AvgBandWidth_ChinaCdn = The SKU name for a - China CDN live-streaming profile using monthly average peak bandwidth billing model. - - :ivar name: Name of the pricing tier. Known values are: "Standard_Verizon", "Premium_Verizon", - "Custom_Verizon", "Standard_Akamai", "Standard_ChinaCdn", "Standard_Microsoft", - "Standard_AzureFrontDoor", "Premium_AzureFrontDoor", "Standard_955BandWidth_ChinaCdn", - "Standard_AvgBandWidth_ChinaCdn", "StandardPlus_ChinaCdn", - "StandardPlus_955BandWidth_ChinaCdn", and "StandardPlus_AvgBandWidth_ChinaCdn". - :vartype name: str or ~azure.mgmt.cdn.models.SkuName - """ - - _attribute_map = { - "name": {"key": "name", "type": "str"}, - } - - def __init__(self, *, name: Optional[Union[str, "_models.SkuName"]] = None, **kwargs: Any) -> None: - """ - :keyword name: Name of the pricing tier. Known values are: "Standard_Verizon", - "Premium_Verizon", "Custom_Verizon", "Standard_Akamai", "Standard_ChinaCdn", - "Standard_Microsoft", "Standard_AzureFrontDoor", "Premium_AzureFrontDoor", - "Standard_955BandWidth_ChinaCdn", "Standard_AvgBandWidth_ChinaCdn", "StandardPlus_ChinaCdn", - "StandardPlus_955BandWidth_ChinaCdn", and "StandardPlus_AvgBandWidth_ChinaCdn". - :paramtype name: str or ~azure.mgmt.cdn.models.SkuName - """ - super().__init__(**kwargs) - self.name = name - - -class SocketAddrMatchConditionParameters(DeliveryRuleConditionParameters): - """Defines the parameters for SocketAddress match conditions. - - All required parameters must be populated in order to send to server. - - :ivar type_name: Required. Known values are: "DeliveryRuleRemoteAddressConditionParameters", - "DeliveryRuleRequestMethodConditionParameters", "DeliveryRuleQueryStringConditionParameters", - "DeliveryRulePostArgsConditionParameters", "DeliveryRuleRequestUriConditionParameters", - "DeliveryRuleRequestHeaderConditionParameters", "DeliveryRuleRequestBodyConditionParameters", - "DeliveryRuleRequestSchemeConditionParameters", "DeliveryRuleUrlPathMatchConditionParameters", - "DeliveryRuleUrlFileExtensionMatchConditionParameters", - "DeliveryRuleUrlFilenameConditionParameters", "DeliveryRuleHttpVersionConditionParameters", - "DeliveryRuleCookiesConditionParameters", "DeliveryRuleIsDeviceConditionParameters", - "DeliveryRuleSocketAddrConditionParameters", "DeliveryRuleClientPortConditionParameters", - "DeliveryRuleServerPortConditionParameters", "DeliveryRuleHostNameConditionParameters", and - "DeliveryRuleSslProtocolConditionParameters". - :vartype type_name: str or ~azure.mgmt.cdn.models.DeliveryRuleConditionParametersType - :ivar operator: Describes operator to be matched. Required. Known values are: "Any" and - "IPMatch". - :vartype operator: str or ~azure.mgmt.cdn.models.SocketAddrOperator - :ivar negate_condition: Describes if this is negate condition or not. - :vartype negate_condition: bool - :ivar match_values: The match value for the condition of the delivery rule. - :vartype match_values: list[str] - :ivar transforms: List of transforms. - :vartype transforms: list[str or ~azure.mgmt.cdn.models.Transform] - """ - - _validation = { - "type_name": {"required": True}, - "operator": {"required": True}, - } - - _attribute_map = { - "type_name": {"key": "typeName", "type": "str"}, - "operator": {"key": "operator", "type": "str"}, - "negate_condition": {"key": "negateCondition", "type": "bool"}, - "match_values": {"key": "matchValues", "type": "[str]"}, - "transforms": {"key": "transforms", "type": "[str]"}, - } - - def __init__( - self, - *, - operator: Union[str, "_models.SocketAddrOperator"], - negate_condition: bool = False, - match_values: Optional[list[str]] = None, - transforms: Optional[list[Union[str, "_models.Transform"]]] = None, - **kwargs: Any - ) -> None: - """ - :keyword operator: Describes operator to be matched. Required. Known values are: "Any" and - "IPMatch". - :paramtype operator: str or ~azure.mgmt.cdn.models.SocketAddrOperator - :keyword negate_condition: Describes if this is negate condition or not. - :paramtype negate_condition: bool - :keyword match_values: The match value for the condition of the delivery rule. - :paramtype match_values: list[str] - :keyword transforms: List of transforms. - :paramtype transforms: list[str or ~azure.mgmt.cdn.models.Transform] - """ - super().__init__(**kwargs) - self.type_name: str = "DeliveryRuleSocketAddrConditionParameters" - self.operator = operator - self.negate_condition = negate_condition - self.match_values = match_values - self.transforms = transforms - - -class SslProtocolMatchConditionParameters(DeliveryRuleConditionParameters): - """Defines the parameters for SslProtocol match conditions. - - All required parameters must be populated in order to send to server. - - :ivar type_name: Required. Known values are: "DeliveryRuleRemoteAddressConditionParameters", - "DeliveryRuleRequestMethodConditionParameters", "DeliveryRuleQueryStringConditionParameters", - "DeliveryRulePostArgsConditionParameters", "DeliveryRuleRequestUriConditionParameters", - "DeliveryRuleRequestHeaderConditionParameters", "DeliveryRuleRequestBodyConditionParameters", - "DeliveryRuleRequestSchemeConditionParameters", "DeliveryRuleUrlPathMatchConditionParameters", - "DeliveryRuleUrlFileExtensionMatchConditionParameters", - "DeliveryRuleUrlFilenameConditionParameters", "DeliveryRuleHttpVersionConditionParameters", - "DeliveryRuleCookiesConditionParameters", "DeliveryRuleIsDeviceConditionParameters", - "DeliveryRuleSocketAddrConditionParameters", "DeliveryRuleClientPortConditionParameters", - "DeliveryRuleServerPortConditionParameters", "DeliveryRuleHostNameConditionParameters", and - "DeliveryRuleSslProtocolConditionParameters". - :vartype type_name: str or ~azure.mgmt.cdn.models.DeliveryRuleConditionParametersType - :ivar operator: Describes operator to be matched. Required. "Equal" - :vartype operator: str or ~azure.mgmt.cdn.models.SslProtocolOperator - :ivar negate_condition: Describes if this is negate condition or not. - :vartype negate_condition: bool - :ivar match_values: The match value for the condition of the delivery rule. - :vartype match_values: list[str or ~azure.mgmt.cdn.models.SslProtocol] - :ivar transforms: List of transforms. - :vartype transforms: list[str or ~azure.mgmt.cdn.models.Transform] - """ - - _validation = { - "type_name": {"required": True}, - "operator": {"required": True}, - } - - _attribute_map = { - "type_name": {"key": "typeName", "type": "str"}, - "operator": {"key": "operator", "type": "str"}, - "negate_condition": {"key": "negateCondition", "type": "bool"}, - "match_values": {"key": "matchValues", "type": "[str]"}, - "transforms": {"key": "transforms", "type": "[str]"}, - } - - def __init__( - self, - *, - operator: Union[str, "_models.SslProtocolOperator"], - negate_condition: bool = False, - match_values: Optional[list[Union[str, "_models.SslProtocol"]]] = None, - transforms: Optional[list[Union[str, "_models.Transform"]]] = None, - **kwargs: Any - ) -> None: - """ - :keyword operator: Describes operator to be matched. Required. "Equal" - :paramtype operator: str or ~azure.mgmt.cdn.models.SslProtocolOperator - :keyword negate_condition: Describes if this is negate condition or not. - :paramtype negate_condition: bool - :keyword match_values: The match value for the condition of the delivery rule. - :paramtype match_values: list[str or ~azure.mgmt.cdn.models.SslProtocol] - :keyword transforms: List of transforms. - :paramtype transforms: list[str or ~azure.mgmt.cdn.models.Transform] - """ - super().__init__(**kwargs) - self.type_name: str = "DeliveryRuleSslProtocolConditionParameters" - self.operator = operator - self.negate_condition = negate_condition - self.match_values = match_values - self.transforms = transforms - - -class SsoUri(_serialization.Model): - """The URI required to login to the supplemental portal from the Azure portal. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar sso_uri_value: The URI used to login to the supplemental portal. - :vartype sso_uri_value: str - """ - - _validation = { - "sso_uri_value": {"readonly": True}, - } - - _attribute_map = { - "sso_uri_value": {"key": "ssoUriValue", "type": "str"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.sso_uri_value: Optional[str] = None - - -class SupportedOptimizationTypesListResult(_serialization.Model): - """The result of the GetSupportedOptimizationTypes API. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar supported_optimization_types: Supported optimization types for a profile. - :vartype supported_optimization_types: list[str or ~azure.mgmt.cdn.models.OptimizationType] - """ - - _validation = { - "supported_optimization_types": {"readonly": True}, - } - - _attribute_map = { - "supported_optimization_types": {"key": "supportedOptimizationTypes", "type": "[str]"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.supported_optimization_types: Optional[list[Union[str, "_models.OptimizationType"]]] = None - - -class SystemData(_serialization.Model): - """Metadata pertaining to creation and last modification of the resource. - - :ivar created_by: The identity that created the resource. - :vartype created_by: str - :ivar created_by_type: The type of identity that created the resource. Known values are: - "User", "Application", "ManagedIdentity", and "Key". - :vartype created_by_type: str or ~azure.mgmt.cdn.models.CreatedByType - :ivar created_at: The timestamp of resource creation (UTC). - :vartype created_at: ~datetime.datetime - :ivar last_modified_by: The identity that last modified the resource. - :vartype last_modified_by: str - :ivar last_modified_by_type: The type of identity that last modified the resource. Known values - are: "User", "Application", "ManagedIdentity", and "Key". - :vartype last_modified_by_type: str or ~azure.mgmt.cdn.models.CreatedByType - :ivar last_modified_at: The timestamp of resource last modification (UTC). - :vartype last_modified_at: ~datetime.datetime - """ - - _attribute_map = { - "created_by": {"key": "createdBy", "type": "str"}, - "created_by_type": {"key": "createdByType", "type": "str"}, - "created_at": {"key": "createdAt", "type": "iso-8601"}, - "last_modified_by": {"key": "lastModifiedBy", "type": "str"}, - "last_modified_by_type": {"key": "lastModifiedByType", "type": "str"}, - "last_modified_at": {"key": "lastModifiedAt", "type": "iso-8601"}, - } - - def __init__( - self, - *, - created_by: Optional[str] = None, - created_by_type: Optional[Union[str, "_models.CreatedByType"]] = None, - created_at: Optional[datetime.datetime] = None, - last_modified_by: Optional[str] = None, - last_modified_by_type: Optional[Union[str, "_models.CreatedByType"]] = None, - last_modified_at: Optional[datetime.datetime] = None, - **kwargs: Any - ) -> None: - """ - :keyword created_by: The identity that created the resource. - :paramtype created_by: str - :keyword created_by_type: The type of identity that created the resource. Known values are: - "User", "Application", "ManagedIdentity", and "Key". - :paramtype created_by_type: str or ~azure.mgmt.cdn.models.CreatedByType - :keyword created_at: The timestamp of resource creation (UTC). - :paramtype created_at: ~datetime.datetime - :keyword last_modified_by: The identity that last modified the resource. - :paramtype last_modified_by: str - :keyword last_modified_by_type: The type of identity that last modified the resource. Known - values are: "User", "Application", "ManagedIdentity", and "Key". - :paramtype last_modified_by_type: str or ~azure.mgmt.cdn.models.CreatedByType - :keyword last_modified_at: The timestamp of resource last modification (UTC). - :paramtype last_modified_at: ~datetime.datetime - """ - super().__init__(**kwargs) - self.created_by = created_by - self.created_by_type = created_by_type - self.created_at = created_at - self.last_modified_by = last_modified_by - self.last_modified_by_type = last_modified_by_type - self.last_modified_at = last_modified_at - - -class UrlFileExtensionMatchConditionParameters(DeliveryRuleConditionParameters): - """Defines the parameters for UrlFileExtension match conditions. - - All required parameters must be populated in order to send to server. - - :ivar type_name: Required. Known values are: "DeliveryRuleRemoteAddressConditionParameters", - "DeliveryRuleRequestMethodConditionParameters", "DeliveryRuleQueryStringConditionParameters", - "DeliveryRulePostArgsConditionParameters", "DeliveryRuleRequestUriConditionParameters", - "DeliveryRuleRequestHeaderConditionParameters", "DeliveryRuleRequestBodyConditionParameters", - "DeliveryRuleRequestSchemeConditionParameters", "DeliveryRuleUrlPathMatchConditionParameters", - "DeliveryRuleUrlFileExtensionMatchConditionParameters", - "DeliveryRuleUrlFilenameConditionParameters", "DeliveryRuleHttpVersionConditionParameters", - "DeliveryRuleCookiesConditionParameters", "DeliveryRuleIsDeviceConditionParameters", - "DeliveryRuleSocketAddrConditionParameters", "DeliveryRuleClientPortConditionParameters", - "DeliveryRuleServerPortConditionParameters", "DeliveryRuleHostNameConditionParameters", and - "DeliveryRuleSslProtocolConditionParameters". - :vartype type_name: str or ~azure.mgmt.cdn.models.DeliveryRuleConditionParametersType - :ivar operator: Describes operator to be matched. Required. Known values are: "Any", "Equal", - "Contains", "BeginsWith", "EndsWith", "LessThan", "LessThanOrEqual", "GreaterThan", - "GreaterThanOrEqual", and "RegEx". - :vartype operator: str or ~azure.mgmt.cdn.models.UrlFileExtensionOperator - :ivar negate_condition: Describes if this is negate condition or not. - :vartype negate_condition: bool - :ivar match_values: The match value for the condition of the delivery rule. - :vartype match_values: list[str] - :ivar transforms: List of transforms. - :vartype transforms: list[str or ~azure.mgmt.cdn.models.Transform] - """ - - _validation = { - "type_name": {"required": True}, - "operator": {"required": True}, - } - - _attribute_map = { - "type_name": {"key": "typeName", "type": "str"}, - "operator": {"key": "operator", "type": "str"}, - "negate_condition": {"key": "negateCondition", "type": "bool"}, - "match_values": {"key": "matchValues", "type": "[str]"}, - "transforms": {"key": "transforms", "type": "[str]"}, - } - - def __init__( - self, - *, - operator: Union[str, "_models.UrlFileExtensionOperator"], - negate_condition: bool = False, - match_values: Optional[list[str]] = None, - transforms: Optional[list[Union[str, "_models.Transform"]]] = None, - **kwargs: Any - ) -> None: - """ - :keyword operator: Describes operator to be matched. Required. Known values are: "Any", - "Equal", "Contains", "BeginsWith", "EndsWith", "LessThan", "LessThanOrEqual", "GreaterThan", - "GreaterThanOrEqual", and "RegEx". - :paramtype operator: str or ~azure.mgmt.cdn.models.UrlFileExtensionOperator - :keyword negate_condition: Describes if this is negate condition or not. - :paramtype negate_condition: bool - :keyword match_values: The match value for the condition of the delivery rule. - :paramtype match_values: list[str] - :keyword transforms: List of transforms. - :paramtype transforms: list[str or ~azure.mgmt.cdn.models.Transform] - """ - super().__init__(**kwargs) - self.type_name: str = "DeliveryRuleUrlFileExtensionMatchConditionParameters" - self.operator = operator - self.negate_condition = negate_condition - self.match_values = match_values - self.transforms = transforms - - -class UrlFileNameMatchConditionParameters(DeliveryRuleConditionParameters): - """Defines the parameters for UrlFilename match conditions. - - All required parameters must be populated in order to send to server. - - :ivar type_name: Required. Known values are: "DeliveryRuleRemoteAddressConditionParameters", - "DeliveryRuleRequestMethodConditionParameters", "DeliveryRuleQueryStringConditionParameters", - "DeliveryRulePostArgsConditionParameters", "DeliveryRuleRequestUriConditionParameters", - "DeliveryRuleRequestHeaderConditionParameters", "DeliveryRuleRequestBodyConditionParameters", - "DeliveryRuleRequestSchemeConditionParameters", "DeliveryRuleUrlPathMatchConditionParameters", - "DeliveryRuleUrlFileExtensionMatchConditionParameters", - "DeliveryRuleUrlFilenameConditionParameters", "DeliveryRuleHttpVersionConditionParameters", - "DeliveryRuleCookiesConditionParameters", "DeliveryRuleIsDeviceConditionParameters", - "DeliveryRuleSocketAddrConditionParameters", "DeliveryRuleClientPortConditionParameters", - "DeliveryRuleServerPortConditionParameters", "DeliveryRuleHostNameConditionParameters", and - "DeliveryRuleSslProtocolConditionParameters". - :vartype type_name: str or ~azure.mgmt.cdn.models.DeliveryRuleConditionParametersType - :ivar operator: Describes operator to be matched. Required. Known values are: "Any", "Equal", - "Contains", "BeginsWith", "EndsWith", "LessThan", "LessThanOrEqual", "GreaterThan", - "GreaterThanOrEqual", and "RegEx". - :vartype operator: str or ~azure.mgmt.cdn.models.UrlFileNameOperator - :ivar negate_condition: Describes if this is negate condition or not. - :vartype negate_condition: bool - :ivar match_values: The match value for the condition of the delivery rule. - :vartype match_values: list[str] - :ivar transforms: List of transforms. - :vartype transforms: list[str or ~azure.mgmt.cdn.models.Transform] - """ - - _validation = { - "type_name": {"required": True}, - "operator": {"required": True}, - } - - _attribute_map = { - "type_name": {"key": "typeName", "type": "str"}, - "operator": {"key": "operator", "type": "str"}, - "negate_condition": {"key": "negateCondition", "type": "bool"}, - "match_values": {"key": "matchValues", "type": "[str]"}, - "transforms": {"key": "transforms", "type": "[str]"}, - } - - def __init__( - self, - *, - operator: Union[str, "_models.UrlFileNameOperator"], - negate_condition: bool = False, - match_values: Optional[list[str]] = None, - transforms: Optional[list[Union[str, "_models.Transform"]]] = None, - **kwargs: Any - ) -> None: - """ - :keyword operator: Describes operator to be matched. Required. Known values are: "Any", - "Equal", "Contains", "BeginsWith", "EndsWith", "LessThan", "LessThanOrEqual", "GreaterThan", - "GreaterThanOrEqual", and "RegEx". - :paramtype operator: str or ~azure.mgmt.cdn.models.UrlFileNameOperator - :keyword negate_condition: Describes if this is negate condition or not. - :paramtype negate_condition: bool - :keyword match_values: The match value for the condition of the delivery rule. - :paramtype match_values: list[str] - :keyword transforms: List of transforms. - :paramtype transforms: list[str or ~azure.mgmt.cdn.models.Transform] - """ - super().__init__(**kwargs) - self.type_name: str = "DeliveryRuleUrlFilenameConditionParameters" - self.operator = operator - self.negate_condition = negate_condition - self.match_values = match_values - self.transforms = transforms - - -class UrlPathMatchConditionParameters(DeliveryRuleConditionParameters): - """Defines the parameters for UrlPath match conditions. - - All required parameters must be populated in order to send to server. - - :ivar type_name: Required. Known values are: "DeliveryRuleRemoteAddressConditionParameters", - "DeliveryRuleRequestMethodConditionParameters", "DeliveryRuleQueryStringConditionParameters", - "DeliveryRulePostArgsConditionParameters", "DeliveryRuleRequestUriConditionParameters", - "DeliveryRuleRequestHeaderConditionParameters", "DeliveryRuleRequestBodyConditionParameters", - "DeliveryRuleRequestSchemeConditionParameters", "DeliveryRuleUrlPathMatchConditionParameters", - "DeliveryRuleUrlFileExtensionMatchConditionParameters", - "DeliveryRuleUrlFilenameConditionParameters", "DeliveryRuleHttpVersionConditionParameters", - "DeliveryRuleCookiesConditionParameters", "DeliveryRuleIsDeviceConditionParameters", - "DeliveryRuleSocketAddrConditionParameters", "DeliveryRuleClientPortConditionParameters", - "DeliveryRuleServerPortConditionParameters", "DeliveryRuleHostNameConditionParameters", and - "DeliveryRuleSslProtocolConditionParameters". - :vartype type_name: str or ~azure.mgmt.cdn.models.DeliveryRuleConditionParametersType - :ivar operator: Describes operator to be matched. Required. Known values are: "Any", "Equal", - "Contains", "BeginsWith", "EndsWith", "LessThan", "LessThanOrEqual", "GreaterThan", - "GreaterThanOrEqual", "Wildcard", and "RegEx". - :vartype operator: str or ~azure.mgmt.cdn.models.UrlPathOperator - :ivar negate_condition: Describes if this is negate condition or not. - :vartype negate_condition: bool - :ivar match_values: The match value for the condition of the delivery rule. - :vartype match_values: list[str] - :ivar transforms: List of transforms. - :vartype transforms: list[str or ~azure.mgmt.cdn.models.Transform] - """ - - _validation = { - "type_name": {"required": True}, - "operator": {"required": True}, - } - - _attribute_map = { - "type_name": {"key": "typeName", "type": "str"}, - "operator": {"key": "operator", "type": "str"}, - "negate_condition": {"key": "negateCondition", "type": "bool"}, - "match_values": {"key": "matchValues", "type": "[str]"}, - "transforms": {"key": "transforms", "type": "[str]"}, - } - - def __init__( - self, - *, - operator: Union[str, "_models.UrlPathOperator"], - negate_condition: bool = False, - match_values: Optional[list[str]] = None, - transforms: Optional[list[Union[str, "_models.Transform"]]] = None, - **kwargs: Any - ) -> None: - """ - :keyword operator: Describes operator to be matched. Required. Known values are: "Any", - "Equal", "Contains", "BeginsWith", "EndsWith", "LessThan", "LessThanOrEqual", "GreaterThan", - "GreaterThanOrEqual", "Wildcard", and "RegEx". - :paramtype operator: str or ~azure.mgmt.cdn.models.UrlPathOperator - :keyword negate_condition: Describes if this is negate condition or not. - :paramtype negate_condition: bool - :keyword match_values: The match value for the condition of the delivery rule. - :paramtype match_values: list[str] - :keyword transforms: List of transforms. - :paramtype transforms: list[str or ~azure.mgmt.cdn.models.Transform] - """ - super().__init__(**kwargs) - self.type_name: str = "DeliveryRuleUrlPathMatchConditionParameters" - self.operator = operator - self.negate_condition = negate_condition - self.match_values = match_values - self.transforms = transforms - - -class UrlRedirectAction(DeliveryRuleAction): - """Defines the url redirect action for the delivery rule. - - All required parameters must be populated in order to send to server. - - :ivar name: The name of the action for the delivery rule. Required. Known values are: - "CacheExpiration", "CacheKeyQueryString", "ModifyRequestHeader", "ModifyResponseHeader", - "UrlRedirect", "UrlRewrite", "UrlSigning", "OriginGroupOverride", and - "RouteConfigurationOverride". - :vartype name: str or ~azure.mgmt.cdn.models.DeliveryRuleActionEnum - :ivar parameters: Defines the parameters for the action. Required. - :vartype parameters: ~azure.mgmt.cdn.models.UrlRedirectActionParameters - """ - - _validation = { - "name": {"required": True}, - "parameters": {"required": True}, - } - - _attribute_map = { - "name": {"key": "name", "type": "str"}, - "parameters": {"key": "parameters", "type": "UrlRedirectActionParameters"}, - } - - def __init__(self, *, parameters: "_models.UrlRedirectActionParameters", **kwargs: Any) -> None: - """ - :keyword parameters: Defines the parameters for the action. Required. - :paramtype parameters: ~azure.mgmt.cdn.models.UrlRedirectActionParameters - """ - super().__init__(**kwargs) - self.name: str = "UrlRedirect" - self.parameters = parameters - - -class UrlRedirectActionParameters(DeliveryRuleActionParameters): - """Defines the parameters for the url redirect action. - - All required parameters must be populated in order to send to server. - - :ivar type_name: Required. Known values are: "DeliveryRuleUrlRedirectActionParameters", - "DeliveryRuleUrlSigningActionParameters", "DeliveryRuleOriginGroupOverrideActionParameters", - "DeliveryRuleUrlRewriteActionParameters", "DeliveryRuleHeaderActionParameters", - "DeliveryRuleCacheExpirationActionParameters", - "DeliveryRuleCacheKeyQueryStringBehaviorActionParameters", and - "DeliveryRuleRouteConfigurationOverrideActionParameters". - :vartype type_name: str or ~azure.mgmt.cdn.models.DeliveryRuleActionParametersType - :ivar redirect_type: The redirect type the rule will use when redirecting traffic. Required. - Known values are: "Moved", "Found", "TemporaryRedirect", and "PermanentRedirect". - :vartype redirect_type: str or ~azure.mgmt.cdn.models.RedirectType - :ivar destination_protocol: Protocol to use for the redirect. The default value is - MatchRequest. Known values are: "MatchRequest", "Http", and "Https". - :vartype destination_protocol: str or ~azure.mgmt.cdn.models.DestinationProtocol - :ivar custom_path: The full path to redirect. Path cannot be empty and must start with /. Leave - empty to use the incoming path as destination path. - :vartype custom_path: str - :ivar custom_hostname: Host to redirect. Leave empty to use the incoming host as the - destination host. - :vartype custom_hostname: str - :ivar custom_query_string: The set of query strings to be placed in the redirect URL. Setting - this value would replace any existing query string; leave empty to preserve the incoming query - string. Query string must be in :code:``=\\ :code:`` format. ? and & will be added - automatically so do not include them. - :vartype custom_query_string: str - :ivar custom_fragment: Fragment to add to the redirect URL. Fragment is the part of the URL - that comes after #. Do not include the #. - :vartype custom_fragment: str - """ - - _validation = { - "type_name": {"required": True}, - "redirect_type": {"required": True}, - } - - _attribute_map = { - "type_name": {"key": "typeName", "type": "str"}, - "redirect_type": {"key": "redirectType", "type": "str"}, - "destination_protocol": {"key": "destinationProtocol", "type": "str"}, - "custom_path": {"key": "customPath", "type": "str"}, - "custom_hostname": {"key": "customHostname", "type": "str"}, - "custom_query_string": {"key": "customQueryString", "type": "str"}, - "custom_fragment": {"key": "customFragment", "type": "str"}, - } - - def __init__( - self, - *, - redirect_type: Union[str, "_models.RedirectType"], - destination_protocol: Optional[Union[str, "_models.DestinationProtocol"]] = None, - custom_path: Optional[str] = None, - custom_hostname: Optional[str] = None, - custom_query_string: Optional[str] = None, - custom_fragment: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword redirect_type: The redirect type the rule will use when redirecting traffic. Required. - Known values are: "Moved", "Found", "TemporaryRedirect", and "PermanentRedirect". - :paramtype redirect_type: str or ~azure.mgmt.cdn.models.RedirectType - :keyword destination_protocol: Protocol to use for the redirect. The default value is - MatchRequest. Known values are: "MatchRequest", "Http", and "Https". - :paramtype destination_protocol: str or ~azure.mgmt.cdn.models.DestinationProtocol - :keyword custom_path: The full path to redirect. Path cannot be empty and must start with /. - Leave empty to use the incoming path as destination path. - :paramtype custom_path: str - :keyword custom_hostname: Host to redirect. Leave empty to use the incoming host as the - destination host. - :paramtype custom_hostname: str - :keyword custom_query_string: The set of query strings to be placed in the redirect URL. - Setting this value would replace any existing query string; leave empty to preserve the - incoming query string. Query string must be in :code:``=\\ :code:`` format. ? and & - will be added automatically so do not include them. - :paramtype custom_query_string: str - :keyword custom_fragment: Fragment to add to the redirect URL. Fragment is the part of the URL - that comes after #. Do not include the #. - :paramtype custom_fragment: str - """ - super().__init__(**kwargs) - self.type_name: str = "DeliveryRuleUrlRedirectActionParameters" - self.redirect_type = redirect_type - self.destination_protocol = destination_protocol - self.custom_path = custom_path - self.custom_hostname = custom_hostname - self.custom_query_string = custom_query_string - self.custom_fragment = custom_fragment - - -class UrlRewriteAction(DeliveryRuleAction): - """Defines the url rewrite action for the delivery rule. - - All required parameters must be populated in order to send to server. - - :ivar name: The name of the action for the delivery rule. Required. Known values are: - "CacheExpiration", "CacheKeyQueryString", "ModifyRequestHeader", "ModifyResponseHeader", - "UrlRedirect", "UrlRewrite", "UrlSigning", "OriginGroupOverride", and - "RouteConfigurationOverride". - :vartype name: str or ~azure.mgmt.cdn.models.DeliveryRuleActionEnum - :ivar parameters: Defines the parameters for the action. Required. - :vartype parameters: ~azure.mgmt.cdn.models.UrlRewriteActionParameters - """ - - _validation = { - "name": {"required": True}, - "parameters": {"required": True}, - } - - _attribute_map = { - "name": {"key": "name", "type": "str"}, - "parameters": {"key": "parameters", "type": "UrlRewriteActionParameters"}, - } - - def __init__(self, *, parameters: "_models.UrlRewriteActionParameters", **kwargs: Any) -> None: - """ - :keyword parameters: Defines the parameters for the action. Required. - :paramtype parameters: ~azure.mgmt.cdn.models.UrlRewriteActionParameters - """ - super().__init__(**kwargs) - self.name: str = "UrlRewrite" - self.parameters = parameters - - -class UrlRewriteActionParameters(DeliveryRuleActionParameters): - """Defines the parameters for the url rewrite action. - - All required parameters must be populated in order to send to server. - - :ivar type_name: Required. Known values are: "DeliveryRuleUrlRedirectActionParameters", - "DeliveryRuleUrlSigningActionParameters", "DeliveryRuleOriginGroupOverrideActionParameters", - "DeliveryRuleUrlRewriteActionParameters", "DeliveryRuleHeaderActionParameters", - "DeliveryRuleCacheExpirationActionParameters", - "DeliveryRuleCacheKeyQueryStringBehaviorActionParameters", and - "DeliveryRuleRouteConfigurationOverrideActionParameters". - :vartype type_name: str or ~azure.mgmt.cdn.models.DeliveryRuleActionParametersType - :ivar source_pattern: define a request URI pattern that identifies the type of requests that - may be rewritten. If value is blank, all strings are matched. Required. - :vartype source_pattern: str - :ivar destination: Define the relative URL to which the above requests will be rewritten by. - Required. - :vartype destination: str - :ivar preserve_unmatched_path: Whether to preserve unmatched path. Default value is true. - :vartype preserve_unmatched_path: bool - """ - - _validation = { - "type_name": {"required": True}, - "source_pattern": {"required": True}, - "destination": {"required": True}, - } - - _attribute_map = { - "type_name": {"key": "typeName", "type": "str"}, - "source_pattern": {"key": "sourcePattern", "type": "str"}, - "destination": {"key": "destination", "type": "str"}, - "preserve_unmatched_path": {"key": "preserveUnmatchedPath", "type": "bool"}, - } - - def __init__( - self, *, source_pattern: str, destination: str, preserve_unmatched_path: Optional[bool] = None, **kwargs: Any - ) -> None: - """ - :keyword source_pattern: define a request URI pattern that identifies the type of requests that - may be rewritten. If value is blank, all strings are matched. Required. - :paramtype source_pattern: str - :keyword destination: Define the relative URL to which the above requests will be rewritten by. - Required. - :paramtype destination: str - :keyword preserve_unmatched_path: Whether to preserve unmatched path. Default value is true. - :paramtype preserve_unmatched_path: bool - """ - super().__init__(**kwargs) - self.type_name: str = "DeliveryRuleUrlRewriteActionParameters" - self.source_pattern = source_pattern - self.destination = destination - self.preserve_unmatched_path = preserve_unmatched_path - - -class UrlSigningAction(DeliveryRuleAction): - """Defines the url signing action for the delivery rule. - - All required parameters must be populated in order to send to server. - - :ivar name: The name of the action for the delivery rule. Required. Known values are: - "CacheExpiration", "CacheKeyQueryString", "ModifyRequestHeader", "ModifyResponseHeader", - "UrlRedirect", "UrlRewrite", "UrlSigning", "OriginGroupOverride", and - "RouteConfigurationOverride". - :vartype name: str or ~azure.mgmt.cdn.models.DeliveryRuleActionEnum - :ivar parameters: Defines the parameters for the action. Required. - :vartype parameters: ~azure.mgmt.cdn.models.UrlSigningActionParameters - """ - - _validation = { - "name": {"required": True}, - "parameters": {"required": True}, - } - - _attribute_map = { - "name": {"key": "name", "type": "str"}, - "parameters": {"key": "parameters", "type": "UrlSigningActionParameters"}, - } - - def __init__(self, *, parameters: "_models.UrlSigningActionParameters", **kwargs: Any) -> None: - """ - :keyword parameters: Defines the parameters for the action. Required. - :paramtype parameters: ~azure.mgmt.cdn.models.UrlSigningActionParameters - """ - super().__init__(**kwargs) - self.name: str = "UrlSigning" - self.parameters = parameters - - -class UrlSigningActionParameters(DeliveryRuleActionParameters): - """Defines the parameters for the Url Signing action. - - All required parameters must be populated in order to send to server. - - :ivar type_name: Required. Known values are: "DeliveryRuleUrlRedirectActionParameters", - "DeliveryRuleUrlSigningActionParameters", "DeliveryRuleOriginGroupOverrideActionParameters", - "DeliveryRuleUrlRewriteActionParameters", "DeliveryRuleHeaderActionParameters", - "DeliveryRuleCacheExpirationActionParameters", - "DeliveryRuleCacheKeyQueryStringBehaviorActionParameters", and - "DeliveryRuleRouteConfigurationOverrideActionParameters". - :vartype type_name: str or ~azure.mgmt.cdn.models.DeliveryRuleActionParametersType - :ivar algorithm: Algorithm to use for URL signing. "SHA256" - :vartype algorithm: str or ~azure.mgmt.cdn.models.Algorithm - :ivar parameter_name_override: Defines which query string parameters in the url to be - considered for expires, key id etc. - :vartype parameter_name_override: list[~azure.mgmt.cdn.models.UrlSigningParamIdentifier] - """ - - _validation = { - "type_name": {"required": True}, - } - - _attribute_map = { - "type_name": {"key": "typeName", "type": "str"}, - "algorithm": {"key": "algorithm", "type": "str"}, - "parameter_name_override": {"key": "parameterNameOverride", "type": "[UrlSigningParamIdentifier]"}, - } - - def __init__( - self, - *, - algorithm: Optional[Union[str, "_models.Algorithm"]] = None, - parameter_name_override: Optional[list["_models.UrlSigningParamIdentifier"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword algorithm: Algorithm to use for URL signing. "SHA256" - :paramtype algorithm: str or ~azure.mgmt.cdn.models.Algorithm - :keyword parameter_name_override: Defines which query string parameters in the url to be - considered for expires, key id etc. - :paramtype parameter_name_override: list[~azure.mgmt.cdn.models.UrlSigningParamIdentifier] - """ - super().__init__(**kwargs) - self.type_name: str = "DeliveryRuleUrlSigningActionParameters" - self.algorithm = algorithm - self.parameter_name_override = parameter_name_override - - -class UrlSigningKey(_serialization.Model): - """Url signing key. - - All required parameters must be populated in order to send to server. - - :ivar key_id: Defines the customer defined key Id. This id will exist in the incoming request - to indicate the key used to form the hash. Required. - :vartype key_id: str - :ivar key_source_parameters: Defines the parameters for using customer key vault for Url - Signing Key. Required. - :vartype key_source_parameters: ~azure.mgmt.cdn.models.KeyVaultSigningKeyParameters - """ - - _validation = { - "key_id": {"required": True}, - "key_source_parameters": {"required": True}, - } - - _attribute_map = { - "key_id": {"key": "keyId", "type": "str"}, - "key_source_parameters": {"key": "keySourceParameters", "type": "KeyVaultSigningKeyParameters"}, - } - - def __init__( - self, *, key_id: str, key_source_parameters: "_models.KeyVaultSigningKeyParameters", **kwargs: Any - ) -> None: - """ - :keyword key_id: Defines the customer defined key Id. This id will exist in the incoming - request to indicate the key used to form the hash. Required. - :paramtype key_id: str - :keyword key_source_parameters: Defines the parameters for using customer key vault for Url - Signing Key. Required. - :paramtype key_source_parameters: ~azure.mgmt.cdn.models.KeyVaultSigningKeyParameters - """ - super().__init__(**kwargs) - self.key_id = key_id - self.key_source_parameters = key_source_parameters - - -class UrlSigningKeyParameters(SecretParameters): - """Url signing key parameters. - - All required parameters must be populated in order to send to server. - - :ivar type: The type of the secret resource. Required. Known values are: "UrlSigningKey", - "CustomerCertificate", "ManagedCertificate", and "AzureFirstPartyManagedCertificate". - :vartype type: str or ~azure.mgmt.cdn.models.SecretType - :ivar key_id: Defines the customer defined key Id. This id will exist in the incoming request - to indicate the key used to form the hash. Required. - :vartype key_id: str - :ivar secret_source: Resource reference to the Azure Key Vault secret. Expected to be in format - of - /subscriptions/{​​​​​​​​​subscriptionId}​​​​​​​​​/resourceGroups/{​​​​​​​​​resourceGroupName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/providers/Microsoft.KeyVault/vaults/{vaultName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/secrets/{secretName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​. - Required. - :vartype secret_source: ~azure.mgmt.cdn.models.ResourceReference - :ivar secret_version: Version of the secret to be used. Required. - :vartype secret_version: str - """ - - _validation = { - "type": {"required": True}, - "key_id": {"required": True}, - "secret_source": {"required": True}, - "secret_version": {"required": True}, - } - - _attribute_map = { - "type": {"key": "type", "type": "str"}, - "key_id": {"key": "keyId", "type": "str"}, - "secret_source": {"key": "secretSource", "type": "ResourceReference"}, - "secret_version": {"key": "secretVersion", "type": "str"}, - } - - def __init__( - self, *, key_id: str, secret_source: "_models.ResourceReference", secret_version: str, **kwargs: Any - ) -> None: - """ - :keyword key_id: Defines the customer defined key Id. This id will exist in the incoming - request to indicate the key used to form the hash. Required. - :paramtype key_id: str - :keyword secret_source: Resource reference to the Azure Key Vault secret. Expected to be in - format of - /subscriptions/{​​​​​​​​​subscriptionId}​​​​​​​​​/resourceGroups/{​​​​​​​​​resourceGroupName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/providers/Microsoft.KeyVault/vaults/{vaultName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/secrets/{secretName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​. - Required. - :paramtype secret_source: ~azure.mgmt.cdn.models.ResourceReference - :keyword secret_version: Version of the secret to be used. Required. - :paramtype secret_version: str - """ - super().__init__(**kwargs) - self.type: str = "UrlSigningKey" - self.key_id = key_id - self.secret_source = secret_source - self.secret_version = secret_version - - -class UrlSigningParamIdentifier(_serialization.Model): - """Defines how to identify a parameter for a specific purpose e.g. expires. - - All required parameters must be populated in order to send to server. - - :ivar param_indicator: Indicates the purpose of the parameter. Required. Known values are: - "Expires", "KeyId", and "Signature". - :vartype param_indicator: str or ~azure.mgmt.cdn.models.ParamIndicator - :ivar param_name: Parameter name. Required. - :vartype param_name: str - """ - - _validation = { - "param_indicator": {"required": True}, - "param_name": {"required": True}, - } - - _attribute_map = { - "param_indicator": {"key": "paramIndicator", "type": "str"}, - "param_name": {"key": "paramName", "type": "str"}, - } - - def __init__( - self, *, param_indicator: Union[str, "_models.ParamIndicator"], param_name: str, **kwargs: Any - ) -> None: - """ - :keyword param_indicator: Indicates the purpose of the parameter. Required. Known values are: - "Expires", "KeyId", and "Signature". - :paramtype param_indicator: str or ~azure.mgmt.cdn.models.ParamIndicator - :keyword param_name: Parameter name. Required. - :paramtype param_name: str - """ - super().__init__(**kwargs) - self.param_indicator = param_indicator - self.param_name = param_name - - -class Usage(_serialization.Model): - """Describes resource usage. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to server. - - :ivar id: Resource identifier. - :vartype id: str - :ivar unit: An enum describing the unit of measurement. Required. "Count" - :vartype unit: str or ~azure.mgmt.cdn.models.UsageUnit - :ivar current_value: The current value of the usage. Required. - :vartype current_value: int - :ivar limit: The limit of usage. Required. - :vartype limit: int - :ivar name: The name of the type of usage. Required. - :vartype name: ~azure.mgmt.cdn.models.UsageName - """ - - _validation = { - "id": {"readonly": True}, - "unit": {"required": True}, - "current_value": {"required": True}, - "limit": {"required": True}, - "name": {"required": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "unit": {"key": "unit", "type": "str"}, - "current_value": {"key": "currentValue", "type": "int"}, - "limit": {"key": "limit", "type": "int"}, - "name": {"key": "name", "type": "UsageName"}, - } - - def __init__( - self, - *, - unit: Union[str, "_models.UsageUnit"], - current_value: int, - limit: int, - name: "_models.UsageName", - **kwargs: Any - ) -> None: - """ - :keyword unit: An enum describing the unit of measurement. Required. "Count" - :paramtype unit: str or ~azure.mgmt.cdn.models.UsageUnit - :keyword current_value: The current value of the usage. Required. - :paramtype current_value: int - :keyword limit: The limit of usage. Required. - :paramtype limit: int - :keyword name: The name of the type of usage. Required. - :paramtype name: ~azure.mgmt.cdn.models.UsageName - """ - super().__init__(**kwargs) - self.id: Optional[str] = None - self.unit = unit - self.current_value = current_value - self.limit = limit - self.name = name - - -class UsageName(_serialization.Model): - """The usage names. - - :ivar value: A string describing the resource name. - :vartype value: str - :ivar localized_value: A localized string describing the resource name. - :vartype localized_value: str - """ - - _attribute_map = { - "value": {"key": "value", "type": "str"}, - "localized_value": {"key": "localizedValue", "type": "str"}, - } - - def __init__(self, *, value: Optional[str] = None, localized_value: Optional[str] = None, **kwargs: Any) -> None: - """ - :keyword value: A string describing the resource name. - :paramtype value: str - :keyword localized_value: A localized string describing the resource name. - :paramtype localized_value: str - """ - super().__init__(**kwargs) - self.value = value - self.localized_value = localized_value - - -class UsagesListResult(_serialization.Model): - """The list usages operation response. - - :ivar value: The list of resource usages. - :vartype value: list[~azure.mgmt.cdn.models.Usage] - :ivar next_link: URL to get the next set of results. - :vartype next_link: str - """ - - _attribute_map = { - "value": {"key": "value", "type": "[Usage]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__( - self, *, value: Optional[list["_models.Usage"]] = None, next_link: Optional[str] = None, **kwargs: Any - ) -> None: - """ - :keyword value: The list of resource usages. - :paramtype value: list[~azure.mgmt.cdn.models.Usage] - :keyword next_link: URL to get the next set of results. - :paramtype next_link: str - """ - super().__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class UserAssignedIdentity(_serialization.Model): - """User assigned identity properties. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar principal_id: The principal ID of the assigned identity. - :vartype principal_id: str - :ivar client_id: The client ID of the assigned identity. - :vartype client_id: str - """ - - _validation = { - "principal_id": {"readonly": True}, - "client_id": {"readonly": True}, - } - - _attribute_map = { - "principal_id": {"key": "principalId", "type": "str"}, - "client_id": {"key": "clientId", "type": "str"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.principal_id: Optional[str] = None - self.client_id: Optional[str] = None - - -class UserManagedHttpsParameters(CustomDomainHttpsParameters): - """Defines the certificate source parameters using user's keyvault certificate for enabling SSL. - - All required parameters must be populated in order to send to server. - - :ivar certificate_source: Defines the source of the SSL certificate. Required. Known values - are: "AzureKeyVault" and "Cdn". - :vartype certificate_source: str or ~azure.mgmt.cdn.models.CertificateSource - :ivar protocol_type: Defines the TLS extension protocol that is used for secure delivery. - Required. Known values are: "ServerNameIndication" and "IPBased". - :vartype protocol_type: str or ~azure.mgmt.cdn.models.ProtocolType - :ivar minimum_tls_version: TLS protocol version that will be used for Https. Known values are: - "None", "TLS10", and "TLS12". - :vartype minimum_tls_version: str or ~azure.mgmt.cdn.models.MinimumTlsVersion - :ivar certificate_source_parameters: Defines the certificate source parameters using user's - keyvault certificate for enabling SSL. Required. - :vartype certificate_source_parameters: - ~azure.mgmt.cdn.models.KeyVaultCertificateSourceParameters - """ - - _validation = { - "certificate_source": {"required": True}, - "protocol_type": {"required": True}, - "certificate_source_parameters": {"required": True}, - } - - _attribute_map = { - "certificate_source": {"key": "certificateSource", "type": "str"}, - "protocol_type": {"key": "protocolType", "type": "str"}, - "minimum_tls_version": {"key": "minimumTlsVersion", "type": "str"}, - "certificate_source_parameters": { - "key": "certificateSourceParameters", - "type": "KeyVaultCertificateSourceParameters", - }, - } - - def __init__( - self, - *, - protocol_type: Union[str, "_models.ProtocolType"], - certificate_source_parameters: "_models.KeyVaultCertificateSourceParameters", - minimum_tls_version: Optional[Union[str, "_models.MinimumTlsVersion"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword protocol_type: Defines the TLS extension protocol that is used for secure delivery. - Required. Known values are: "ServerNameIndication" and "IPBased". - :paramtype protocol_type: str or ~azure.mgmt.cdn.models.ProtocolType - :keyword minimum_tls_version: TLS protocol version that will be used for Https. Known values - are: "None", "TLS10", and "TLS12". - :paramtype minimum_tls_version: str or ~azure.mgmt.cdn.models.MinimumTlsVersion - :keyword certificate_source_parameters: Defines the certificate source parameters using user's - keyvault certificate for enabling SSL. Required. - :paramtype certificate_source_parameters: - ~azure.mgmt.cdn.models.KeyVaultCertificateSourceParameters - """ - super().__init__(protocol_type=protocol_type, minimum_tls_version=minimum_tls_version, **kwargs) - self.certificate_source: str = "AzureKeyVault" - self.certificate_source_parameters = certificate_source_parameters - - -class ValidateCustomDomainInput(_serialization.Model): - """Input of the custom domain to be validated for DNS mapping. - - All required parameters must be populated in order to send to server. - - :ivar host_name: The host name of the custom domain. Must be a domain name. Required. - :vartype host_name: str - """ - - _validation = { - "host_name": {"required": True}, - } - - _attribute_map = { - "host_name": {"key": "hostName", "type": "str"}, - } - - def __init__(self, *, host_name: str, **kwargs: Any) -> None: - """ - :keyword host_name: The host name of the custom domain. Must be a domain name. Required. - :paramtype host_name: str - """ - super().__init__(**kwargs) - self.host_name = host_name - - -class ValidateCustomDomainOutput(_serialization.Model): - """Output of custom domain validation. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar custom_domain_validated: Indicates whether the custom domain is valid or not. - :vartype custom_domain_validated: bool - :ivar reason: The reason why the custom domain is not valid. - :vartype reason: str - :ivar message: Error message describing why the custom domain is not valid. - :vartype message: str - """ - - _validation = { - "custom_domain_validated": {"readonly": True}, - "reason": {"readonly": True}, - "message": {"readonly": True}, - } - - _attribute_map = { - "custom_domain_validated": {"key": "customDomainValidated", "type": "bool"}, - "reason": {"key": "reason", "type": "str"}, - "message": {"key": "message", "type": "str"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.custom_domain_validated: Optional[bool] = None - self.reason: Optional[str] = None - self.message: Optional[str] = None - - -class ValidateProbeInput(_serialization.Model): - """Input of the validate probe API. - - All required parameters must be populated in order to send to server. - - :ivar probe_url: The probe URL to validate. Required. - :vartype probe_url: str - """ - - _validation = { - "probe_url": {"required": True}, - } - - _attribute_map = { - "probe_url": {"key": "probeURL", "type": "str"}, - } - - def __init__(self, *, probe_url: str, **kwargs: Any) -> None: - """ - :keyword probe_url: The probe URL to validate. Required. - :paramtype probe_url: str - """ - super().__init__(**kwargs) - self.probe_url = probe_url - - -class ValidateProbeOutput(_serialization.Model): - """Output of the validate probe API. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar is_valid: Indicates whether the probe URL is accepted or not. - :vartype is_valid: bool - :ivar error_code: Specifies the error code when the probe url is not accepted. - :vartype error_code: str - :ivar message: The detailed error message describing why the probe URL is not accepted. - :vartype message: str - """ - - _validation = { - "is_valid": {"readonly": True}, - "error_code": {"readonly": True}, - "message": {"readonly": True}, - } - - _attribute_map = { - "is_valid": {"key": "isValid", "type": "bool"}, - "error_code": {"key": "errorCode", "type": "str"}, - "message": {"key": "message", "type": "str"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.is_valid: Optional[bool] = None - self.error_code: Optional[str] = None - self.message: Optional[str] = None - - -class ValidateSecretInput(_serialization.Model): - """Input of the secret to be validated. - - All required parameters must be populated in order to send to server. - - :ivar secret_type: The secret type. Required. Known values are: "UrlSigningKey", - "CustomerCertificate", "ManagedCertificate", and "AzureFirstPartyManagedCertificate". - :vartype secret_type: str or ~azure.mgmt.cdn.models.SecretType - :ivar secret_source: Resource reference to the Azure Key Vault secret. Expected to be in format - of - /subscriptions/{​​​​​​​​​subscriptionId}​​​​​​​​​/resourceGroups/{​​​​​​​​​resourceGroupName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/providers/Microsoft.KeyVault/vaults/{vaultName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/secrets/{secretName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​. - Required. - :vartype secret_source: ~azure.mgmt.cdn.models.ResourceReference - :ivar secret_version: Secret version, if customer is using a specific version. - :vartype secret_version: str - """ - - _validation = { - "secret_type": {"required": True}, - "secret_source": {"required": True}, - } - - _attribute_map = { - "secret_type": {"key": "secretType", "type": "str"}, - "secret_source": {"key": "secretSource", "type": "ResourceReference"}, - "secret_version": {"key": "secretVersion", "type": "str"}, - } - - def __init__( - self, - *, - secret_type: Union[str, "_models.SecretType"], - secret_source: "_models.ResourceReference", - secret_version: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword secret_type: The secret type. Required. Known values are: "UrlSigningKey", - "CustomerCertificate", "ManagedCertificate", and "AzureFirstPartyManagedCertificate". - :paramtype secret_type: str or ~azure.mgmt.cdn.models.SecretType - :keyword secret_source: Resource reference to the Azure Key Vault secret. Expected to be in - format of - /subscriptions/{​​​​​​​​​subscriptionId}​​​​​​​​​/resourceGroups/{​​​​​​​​​resourceGroupName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/providers/Microsoft.KeyVault/vaults/{vaultName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/secrets/{secretName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​. - Required. - :paramtype secret_source: ~azure.mgmt.cdn.models.ResourceReference - :keyword secret_version: Secret version, if customer is using a specific version. - :paramtype secret_version: str - """ - super().__init__(**kwargs) - self.secret_type = secret_type - self.secret_source = secret_source - self.secret_version = secret_version - - -class ValidateSecretOutput(_serialization.Model): - """Output of the validated secret. - - :ivar status: The validation status. Known values are: "Valid", "Invalid", "AccessDenied", and - "CertificateExpired". - :vartype status: str or ~azure.mgmt.cdn.models.Status - :ivar message: Detailed error message. - :vartype message: str - """ - - _attribute_map = { - "status": {"key": "status", "type": "str"}, - "message": {"key": "message", "type": "str"}, - } - - def __init__( - self, *, status: Optional[Union[str, "_models.Status"]] = None, message: Optional[str] = None, **kwargs: Any - ) -> None: - """ - :keyword status: The validation status. Known values are: "Valid", "Invalid", "AccessDenied", - and "CertificateExpired". - :paramtype status: str or ~azure.mgmt.cdn.models.Status - :keyword message: Detailed error message. - :paramtype message: str - """ - super().__init__(**kwargs) - self.status = status - self.message = message - - -class ValidationToken(_serialization.Model): - """The validation token. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar token: - :vartype token: str - """ - - _validation = { - "token": {"readonly": True}, - } - - _attribute_map = { - "token": {"key": "token", "type": "str"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.token: Optional[str] = None - - -class WafMetricsResponse(_serialization.Model): - """Waf Metrics Response. - - :ivar date_time_begin: - :vartype date_time_begin: ~datetime.datetime - :ivar date_time_end: - :vartype date_time_end: ~datetime.datetime - :ivar granularity: Known values are: "PT5M", "PT1H", and "P1D". - :vartype granularity: str or ~azure.mgmt.cdn.models.WafMetricsGranularity - :ivar series: - :vartype series: list[~azure.mgmt.cdn.models.WafMetricsResponseSeriesItem] - """ - - _attribute_map = { - "date_time_begin": {"key": "dateTimeBegin", "type": "iso-8601"}, - "date_time_end": {"key": "dateTimeEnd", "type": "iso-8601"}, - "granularity": {"key": "granularity", "type": "str"}, - "series": {"key": "series", "type": "[WafMetricsResponseSeriesItem]"}, - } - - def __init__( - self, - *, - date_time_begin: Optional[datetime.datetime] = None, - date_time_end: Optional[datetime.datetime] = None, - granularity: Optional[Union[str, "_models.WafMetricsGranularity"]] = None, - series: Optional[list["_models.WafMetricsResponseSeriesItem"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword date_time_begin: - :paramtype date_time_begin: ~datetime.datetime - :keyword date_time_end: - :paramtype date_time_end: ~datetime.datetime - :keyword granularity: Known values are: "PT5M", "PT1H", and "P1D". - :paramtype granularity: str or ~azure.mgmt.cdn.models.WafMetricsGranularity - :keyword series: - :paramtype series: list[~azure.mgmt.cdn.models.WafMetricsResponseSeriesItem] - """ - super().__init__(**kwargs) - self.date_time_begin = date_time_begin - self.date_time_end = date_time_end - self.granularity = granularity - self.series = series - - -class WafMetricsResponseSeriesItem(_serialization.Model): - """WafMetricsResponseSeriesItem. - - :ivar metric: - :vartype metric: str - :ivar unit: "count" - :vartype unit: str or ~azure.mgmt.cdn.models.WafMetricsSeriesUnit - :ivar groups: - :vartype groups: list[~azure.mgmt.cdn.models.WafMetricsResponseSeriesPropertiesItemsItem] - :ivar data: - :vartype data: - list[~azure.mgmt.cdn.models.Components18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsPropertiesDataItems] - """ - - _attribute_map = { - "metric": {"key": "metric", "type": "str"}, - "unit": {"key": "unit", "type": "str"}, - "groups": {"key": "groups", "type": "[WafMetricsResponseSeriesPropertiesItemsItem]"}, - "data": { - "key": "data", - "type": "[Components18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsPropertiesDataItems]", - }, - } - - def __init__( - self, - *, - metric: Optional[str] = None, - unit: Optional[Union[str, "_models.WafMetricsSeriesUnit"]] = None, - groups: Optional[list["_models.WafMetricsResponseSeriesPropertiesItemsItem"]] = None, - data: Optional[ - list["_models.Components18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsPropertiesDataItems"] - ] = None, - **kwargs: Any - ) -> None: - """ - :keyword metric: - :paramtype metric: str - :keyword unit: "count" - :paramtype unit: str or ~azure.mgmt.cdn.models.WafMetricsSeriesUnit - :keyword groups: - :paramtype groups: list[~azure.mgmt.cdn.models.WafMetricsResponseSeriesPropertiesItemsItem] - :keyword data: - :paramtype data: - list[~azure.mgmt.cdn.models.Components18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsPropertiesDataItems] - """ - super().__init__(**kwargs) - self.metric = metric - self.unit = unit - self.groups = groups - self.data = data - - -class WafMetricsResponseSeriesPropertiesItemsItem(_serialization.Model): # pylint: disable=name-too-long - """WafMetricsResponseSeriesPropertiesItemsItem. - - :ivar name: - :vartype name: str - :ivar value: - :vartype value: str - """ - - _attribute_map = { - "name": {"key": "name", "type": "str"}, - "value": {"key": "value", "type": "str"}, - } - - def __init__(self, *, name: Optional[str] = None, value: Optional[str] = None, **kwargs: Any) -> None: - """ - :keyword name: - :paramtype name: str - :keyword value: - :paramtype value: str - """ - super().__init__(**kwargs) - self.name = name - self.value = value - - -class WafRankingsResponse(_serialization.Model): - """Waf Rankings Response. - - :ivar date_time_begin: - :vartype date_time_begin: ~datetime.datetime - :ivar date_time_end: - :vartype date_time_end: ~datetime.datetime - :ivar groups: - :vartype groups: list[str] - :ivar data: - :vartype data: list[~azure.mgmt.cdn.models.WafRankingsResponseDataItem] - """ - - _attribute_map = { - "date_time_begin": {"key": "dateTimeBegin", "type": "iso-8601"}, - "date_time_end": {"key": "dateTimeEnd", "type": "iso-8601"}, - "groups": {"key": "groups", "type": "[str]"}, - "data": {"key": "data", "type": "[WafRankingsResponseDataItem]"}, - } - - def __init__( - self, - *, - date_time_begin: Optional[datetime.datetime] = None, - date_time_end: Optional[datetime.datetime] = None, - groups: Optional[list[str]] = None, - data: Optional[list["_models.WafRankingsResponseDataItem"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword date_time_begin: - :paramtype date_time_begin: ~datetime.datetime - :keyword date_time_end: - :paramtype date_time_end: ~datetime.datetime - :keyword groups: - :paramtype groups: list[str] - :keyword data: - :paramtype data: list[~azure.mgmt.cdn.models.WafRankingsResponseDataItem] - """ - super().__init__(**kwargs) - self.date_time_begin = date_time_begin - self.date_time_end = date_time_end - self.groups = groups - self.data = data - - -class WafRankingsResponseDataItem(_serialization.Model): - """WafRankingsResponseDataItem. - - :ivar group_values: - :vartype group_values: list[str] - :ivar metrics: - :vartype metrics: - list[~azure.mgmt.cdn.models.ComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItems] - """ - - _attribute_map = { - "group_values": {"key": "groupValues", "type": "[str]"}, - "metrics": { - "key": "metrics", - "type": "[ComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItems]", - }, - } - - def __init__( - self, - *, - group_values: Optional[list[str]] = None, - metrics: Optional[ - list["_models.ComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItems"] - ] = None, - **kwargs: Any - ) -> None: - """ - :keyword group_values: - :paramtype group_values: list[str] - :keyword metrics: - :paramtype metrics: - list[~azure.mgmt.cdn.models.ComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItems] - """ - super().__init__(**kwargs) - self.group_values = group_values - self.metrics = metrics diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/_patch.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/_patch.py index 49900f6ab120..ea765788358a 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/_patch.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/_patch.py @@ -1,15 +1,14 @@ -# ------------------------------------ -# Copyright (c) Microsoft Corporation. -# Licensed under the MIT License. -# ------------------------------------ - +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------- """Customize generated code here. Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ -from typing import List -__all__: List[str] = [] # Add all objects you want publicly available to users at this package level +__all__: list[str] = [] # Add all objects you want publicly available to users at this package level def patch_sdk(): diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/__init__.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/__init__.py index 8fc333a2c406..43626d3a22d5 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/__init__.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/__init__.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # pylint: disable=wrong-import-position @@ -13,36 +12,36 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._cdn_management_client_operations import _CdnManagementClientOperationsMixin # type: ignore # pylint: disable=unused-import -from ._afd_profiles_operations import AFDProfilesOperations # type: ignore -from ._afd_custom_domains_operations import AFDCustomDomainsOperations # type: ignore -from ._afd_endpoints_operations import AFDEndpointsOperations # type: ignore -from ._afd_origin_groups_operations import AFDOriginGroupsOperations # type: ignore -from ._afd_origins_operations import AFDOriginsOperations # type: ignore -from ._routes_operations import RoutesOperations # type: ignore -from ._rule_sets_operations import RuleSetsOperations # type: ignore -from ._rules_operations import RulesOperations # type: ignore -from ._security_policies_operations import SecurityPoliciesOperations # type: ignore -from ._secrets_operations import SecretsOperations # type: ignore -from ._log_analytics_operations import LogAnalyticsOperations # type: ignore -from ._profiles_operations import ProfilesOperations # type: ignore -from ._endpoints_operations import EndpointsOperations # type: ignore -from ._origins_operations import OriginsOperations # type: ignore -from ._origin_groups_operations import OriginGroupsOperations # type: ignore -from ._custom_domains_operations import CustomDomainsOperations # type: ignore -from ._resource_usage_operations import ResourceUsageOperations # type: ignore from ._operations import Operations # type: ignore -from ._edge_nodes_operations import EdgeNodesOperations # type: ignore -from ._policies_operations import PoliciesOperations # type: ignore -from ._managed_rule_sets_operations import ManagedRuleSetsOperations # type: ignore +from ._operations import ProfilesOperations # type: ignore +from ._operations import AFDEndpointsOperations # type: ignore +from ._operations import AFDOriginGroupsOperations # type: ignore +from ._operations import AFDOriginsOperations # type: ignore +from ._operations import RoutesOperations # type: ignore +from ._operations import RuleSetsOperations # type: ignore +from ._operations import RulesOperations # type: ignore +from ._operations import SecurityPoliciesOperations # type: ignore +from ._operations import SecretsOperations # type: ignore +from ._operations import EndpointsOperations # type: ignore +from ._operations import OriginsOperations # type: ignore +from ._operations import OriginGroupsOperations # type: ignore +from ._operations import CustomDomainsOperations # type: ignore +from ._operations import AFDCustomDomainsOperations # type: ignore +from ._operations import AFDProfilesOperations # type: ignore +from ._operations import LogAnalyticsOperations # type: ignore +from ._operations import PoliciesOperations # type: ignore +from ._operations import ResourceUsageOperations # type: ignore +from ._operations import EdgeNodesOperations # type: ignore +from ._operations import ManagedRuleSetsOperations # type: ignore +from ._operations import _CdnClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "AFDProfilesOperations", - "AFDCustomDomainsOperations", + "Operations", + "ProfilesOperations", "AFDEndpointsOperations", "AFDOriginGroupsOperations", "AFDOriginsOperations", @@ -51,16 +50,16 @@ "RulesOperations", "SecurityPoliciesOperations", "SecretsOperations", - "LogAnalyticsOperations", - "ProfilesOperations", "EndpointsOperations", "OriginsOperations", "OriginGroupsOperations", "CustomDomainsOperations", + "AFDCustomDomainsOperations", + "AFDProfilesOperations", + "LogAnalyticsOperations", + "PoliciesOperations", "ResourceUsageOperations", - "Operations", "EdgeNodesOperations", - "PoliciesOperations", "ManagedRuleSetsOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_afd_custom_domains_operations.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_afd_custom_domains_operations.py deleted file mode 100644 index bdd074136527..000000000000 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_afd_custom_domains_operations.py +++ /dev/null @@ -1,1117 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression,too-many-lines -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.arm_polling import ARMPolling - -from .. import models as _models -from .._configuration import CdnManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_profile_request( - resource_group_name: str, profile_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/customDomains", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "profileName": _SERIALIZER.url( - "profile_name", profile_name, "str", max_length=260, min_length=1, pattern=r"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, profile_name: str, custom_domain_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/customDomains/{customDomainName}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "profileName": _SERIALIZER.url( - "profile_name", profile_name, "str", max_length=260, min_length=1, pattern=r"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$" - ), - "customDomainName": _SERIALIZER.url("custom_domain_name", custom_domain_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_request( - resource_group_name: str, profile_name: str, custom_domain_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/customDomains/{customDomainName}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "profileName": _SERIALIZER.url( - "profile_name", profile_name, "str", max_length=260, min_length=1, pattern=r"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$" - ), - "customDomainName": _SERIALIZER.url("custom_domain_name", custom_domain_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_update_request( - resource_group_name: str, profile_name: str, custom_domain_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/customDomains/{customDomainName}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "profileName": _SERIALIZER.url( - "profile_name", profile_name, "str", max_length=260, min_length=1, pattern=r"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$" - ), - "customDomainName": _SERIALIZER.url("custom_domain_name", custom_domain_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, profile_name: str, custom_domain_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/customDomains/{customDomainName}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "profileName": _SERIALIZER.url( - "profile_name", profile_name, "str", max_length=260, min_length=1, pattern=r"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$" - ), - "customDomainName": _SERIALIZER.url("custom_domain_name", custom_domain_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_refresh_validation_token_request( - resource_group_name: str, profile_name: str, custom_domain_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/customDomains/{customDomainName}/refreshValidationToken", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "profileName": _SERIALIZER.url( - "profile_name", profile_name, "str", max_length=260, min_length=1, pattern=r"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$" - ), - "customDomainName": _SERIALIZER.url("custom_domain_name", custom_domain_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -class AFDCustomDomainsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.cdn.CdnManagementClient`'s - :attr:`afd_custom_domains` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: CdnManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_profile( - self, resource_group_name: str, profile_name: str, **kwargs: Any - ) -> ItemPaged["_models.AFDDomain"]: - """Lists existing AzureFrontDoor domains. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :return: An iterator like instance of either AFDDomain or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cdn.models.AFDDomain] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.AFDDomainListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_profile_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("AFDDomainListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get( - self, resource_group_name: str, profile_name: str, custom_domain_name: str, **kwargs: Any - ) -> _models.AFDDomain: - """Gets an existing AzureFrontDoor domain with the specified domain name under the specified - subscription, resource group and profile. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param custom_domain_name: Name of the domain under the profile which is unique globally. - Required. - :type custom_domain_name: str - :return: AFDDomain or the result of cls(response) - :rtype: ~azure.mgmt.cdn.models.AFDDomain - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.AFDDomain] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - custom_domain_name=custom_domain_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("AFDDomain", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - def _create_initial( - self, - resource_group_name: str, - profile_name: str, - custom_domain_name: str, - custom_domain: Union[_models.AFDDomain, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(custom_domain, (IOBase, bytes)): - _content = custom_domain - else: - _json = self._serialize.body(custom_domain, "AFDDomain") - - _request = build_create_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - custom_domain_name=custom_domain_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 201: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_create( - self, - resource_group_name: str, - profile_name: str, - custom_domain_name: str, - custom_domain: _models.AFDDomain, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.AFDDomain]: - """Creates a new domain within the specified profile. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param custom_domain_name: Name of the domain under the profile which is unique globally. - Required. - :type custom_domain_name: str - :param custom_domain: Domain properties. Required. - :type custom_domain: ~azure.mgmt.cdn.models.AFDDomain - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either AFDDomain or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.AFDDomain] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_create( - self, - resource_group_name: str, - profile_name: str, - custom_domain_name: str, - custom_domain: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.AFDDomain]: - """Creates a new domain within the specified profile. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param custom_domain_name: Name of the domain under the profile which is unique globally. - Required. - :type custom_domain_name: str - :param custom_domain: Domain properties. Required. - :type custom_domain: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either AFDDomain or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.AFDDomain] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_create( - self, - resource_group_name: str, - profile_name: str, - custom_domain_name: str, - custom_domain: Union[_models.AFDDomain, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.AFDDomain]: - """Creates a new domain within the specified profile. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param custom_domain_name: Name of the domain under the profile which is unique globally. - Required. - :type custom_domain_name: str - :param custom_domain: Domain properties. Is either a AFDDomain type or a IO[bytes] type. - Required. - :type custom_domain: ~azure.mgmt.cdn.models.AFDDomain or IO[bytes] - :return: An instance of LROPoller that returns either AFDDomain or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.AFDDomain] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.AFDDomain] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._create_initial( - resource_group_name=resource_group_name, - profile_name=profile_name, - custom_domain_name=custom_domain_name, - custom_domain=custom_domain, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("AFDDomain", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.AFDDomain].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.AFDDomain]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _update_initial( - self, - resource_group_name: str, - profile_name: str, - custom_domain_name: str, - custom_domain_update_properties: Union[_models.AFDDomainUpdateParameters, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(custom_domain_update_properties, (IOBase, bytes)): - _content = custom_domain_update_properties - else: - _json = self._serialize.body(custom_domain_update_properties, "AFDDomainUpdateParameters") - - _request = build_update_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - custom_domain_name=custom_domain_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_update( - self, - resource_group_name: str, - profile_name: str, - custom_domain_name: str, - custom_domain_update_properties: _models.AFDDomainUpdateParameters, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.AFDDomain]: - """Updates an existing domain within a profile. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param custom_domain_name: Name of the domain under the profile which is unique globally. - Required. - :type custom_domain_name: str - :param custom_domain_update_properties: Domain properties. Required. - :type custom_domain_update_properties: ~azure.mgmt.cdn.models.AFDDomainUpdateParameters - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either AFDDomain or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.AFDDomain] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_update( - self, - resource_group_name: str, - profile_name: str, - custom_domain_name: str, - custom_domain_update_properties: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.AFDDomain]: - """Updates an existing domain within a profile. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param custom_domain_name: Name of the domain under the profile which is unique globally. - Required. - :type custom_domain_name: str - :param custom_domain_update_properties: Domain properties. Required. - :type custom_domain_update_properties: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either AFDDomain or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.AFDDomain] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_update( - self, - resource_group_name: str, - profile_name: str, - custom_domain_name: str, - custom_domain_update_properties: Union[_models.AFDDomainUpdateParameters, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.AFDDomain]: - """Updates an existing domain within a profile. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param custom_domain_name: Name of the domain under the profile which is unique globally. - Required. - :type custom_domain_name: str - :param custom_domain_update_properties: Domain properties. Is either a - AFDDomainUpdateParameters type or a IO[bytes] type. Required. - :type custom_domain_update_properties: ~azure.mgmt.cdn.models.AFDDomainUpdateParameters or - IO[bytes] - :return: An instance of LROPoller that returns either AFDDomain or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.AFDDomain] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.AFDDomain] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._update_initial( - resource_group_name=resource_group_name, - profile_name=profile_name, - custom_domain_name=custom_domain_name, - custom_domain_update_properties=custom_domain_update_properties, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("AFDDomain", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.AFDDomain].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.AFDDomain]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _delete_initial( - self, resource_group_name: str, profile_name: str, custom_domain_name: str, **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - custom_domain_name=custom_domain_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_delete( - self, resource_group_name: str, profile_name: str, custom_domain_name: str, **kwargs: Any - ) -> LROPoller[None]: - """Deletes an existing AzureFrontDoor domain with the specified domain name under the specified - subscription, resource group and profile. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param custom_domain_name: Name of the domain under the profile which is unique globally. - Required. - :type custom_domain_name: str - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - profile_name=profile_name, - custom_domain_name=custom_domain_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - def _refresh_validation_token_initial( - self, resource_group_name: str, profile_name: str, custom_domain_name: str, **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_refresh_validation_token_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - custom_domain_name=custom_domain_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_refresh_validation_token( - self, resource_group_name: str, profile_name: str, custom_domain_name: str, **kwargs: Any - ) -> LROPoller[None]: - """Updates the domain validation token. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param custom_domain_name: Name of the domain under the profile which is unique globally. - Required. - :type custom_domain_name: str - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._refresh_validation_token_initial( - resource_group_name=resource_group_name, - profile_name=profile_name, - custom_domain_name=custom_domain_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_afd_endpoints_operations.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_afd_endpoints_operations.py deleted file mode 100644 index 0fb96b0423c1..000000000000 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_afd_endpoints_operations.py +++ /dev/null @@ -1,1558 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression,too-many-lines -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.arm_polling import ARMPolling - -from .. import models as _models -from .._configuration import CdnManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_profile_request( - resource_group_name: str, profile_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "profileName": _SERIALIZER.url( - "profile_name", profile_name, "str", max_length=260, min_length=1, pattern=r"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, profile_name: str, endpoint_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints/{endpointName}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "profileName": _SERIALIZER.url( - "profile_name", profile_name, "str", max_length=260, min_length=1, pattern=r"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$" - ), - "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_request( - resource_group_name: str, profile_name: str, endpoint_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints/{endpointName}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "profileName": _SERIALIZER.url( - "profile_name", profile_name, "str", max_length=260, min_length=1, pattern=r"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$" - ), - "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_update_request( - resource_group_name: str, profile_name: str, endpoint_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints/{endpointName}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "profileName": _SERIALIZER.url( - "profile_name", profile_name, "str", max_length=260, min_length=1, pattern=r"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$" - ), - "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, profile_name: str, endpoint_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints/{endpointName}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "profileName": _SERIALIZER.url( - "profile_name", profile_name, "str", max_length=260, min_length=1, pattern=r"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$" - ), - "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_purge_content_request( - resource_group_name: str, profile_name: str, endpoint_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints/{endpointName}/purge", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "profileName": _SERIALIZER.url( - "profile_name", profile_name, "str", max_length=260, min_length=1, pattern=r"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$" - ), - "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_list_resource_usage_request( - resource_group_name: str, profile_name: str, endpoint_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints/{endpointName}/usages", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "profileName": _SERIALIZER.url( - "profile_name", profile_name, "str", max_length=260, min_length=1, pattern=r"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$" - ), - "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_validate_custom_domain_request( - resource_group_name: str, profile_name: str, endpoint_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints/{endpointName}/validateCustomDomain", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "profileName": _SERIALIZER.url( - "profile_name", profile_name, "str", max_length=260, min_length=1, pattern=r"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$" - ), - "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -class AFDEndpointsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.cdn.CdnManagementClient`'s - :attr:`afd_endpoints` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: CdnManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_profile( - self, resource_group_name: str, profile_name: str, **kwargs: Any - ) -> ItemPaged["_models.AFDEndpoint"]: - """Lists existing AzureFrontDoor endpoints. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :return: An iterator like instance of either AFDEndpoint or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cdn.models.AFDEndpoint] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.AFDEndpointListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_profile_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("AFDEndpointListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get( - self, resource_group_name: str, profile_name: str, endpoint_name: str, **kwargs: Any - ) -> _models.AFDEndpoint: - """Gets an existing AzureFrontDoor endpoint with the specified endpoint name under the specified - subscription, resource group and profile. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :return: AFDEndpoint or the result of cls(response) - :rtype: ~azure.mgmt.cdn.models.AFDEndpoint - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.AFDEndpoint] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - endpoint_name=endpoint_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("AFDEndpoint", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - def _create_initial( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - endpoint: Union[_models.AFDEndpoint, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(endpoint, (IOBase, bytes)): - _content = endpoint - else: - _json = self._serialize.body(endpoint, "AFDEndpoint") - - _request = build_create_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - endpoint_name=endpoint_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_create( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - endpoint: _models.AFDEndpoint, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.AFDEndpoint]: - """Creates a new AzureFrontDoor endpoint with the specified endpoint name under the specified - subscription, resource group and profile. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :param endpoint: Endpoint properties. Required. - :type endpoint: ~azure.mgmt.cdn.models.AFDEndpoint - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either AFDEndpoint or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.AFDEndpoint] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_create( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - endpoint: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.AFDEndpoint]: - """Creates a new AzureFrontDoor endpoint with the specified endpoint name under the specified - subscription, resource group and profile. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :param endpoint: Endpoint properties. Required. - :type endpoint: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either AFDEndpoint or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.AFDEndpoint] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_create( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - endpoint: Union[_models.AFDEndpoint, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.AFDEndpoint]: - """Creates a new AzureFrontDoor endpoint with the specified endpoint name under the specified - subscription, resource group and profile. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :param endpoint: Endpoint properties. Is either a AFDEndpoint type or a IO[bytes] type. - Required. - :type endpoint: ~azure.mgmt.cdn.models.AFDEndpoint or IO[bytes] - :return: An instance of LROPoller that returns either AFDEndpoint or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.AFDEndpoint] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.AFDEndpoint] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._create_initial( - resource_group_name=resource_group_name, - profile_name=profile_name, - endpoint_name=endpoint_name, - endpoint=endpoint, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("AFDEndpoint", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.AFDEndpoint].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.AFDEndpoint]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _update_initial( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - endpoint_update_properties: Union[_models.AFDEndpointUpdateParameters, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(endpoint_update_properties, (IOBase, bytes)): - _content = endpoint_update_properties - else: - _json = self._serialize.body(endpoint_update_properties, "AFDEndpointUpdateParameters") - - _request = build_update_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - endpoint_name=endpoint_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_update( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - endpoint_update_properties: _models.AFDEndpointUpdateParameters, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.AFDEndpoint]: - """Updates an existing AzureFrontDoor endpoint with the specified endpoint name under the - specified subscription, resource group and profile. Only tags can be updated after creating an - endpoint. To update origins, use the Update Origin operation. To update origin groups, use the - Update Origin group operation. To update domains, use the Update Custom Domain operation. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :param endpoint_update_properties: Endpoint update properties. Required. - :type endpoint_update_properties: ~azure.mgmt.cdn.models.AFDEndpointUpdateParameters - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either AFDEndpoint or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.AFDEndpoint] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_update( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - endpoint_update_properties: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.AFDEndpoint]: - """Updates an existing AzureFrontDoor endpoint with the specified endpoint name under the - specified subscription, resource group and profile. Only tags can be updated after creating an - endpoint. To update origins, use the Update Origin operation. To update origin groups, use the - Update Origin group operation. To update domains, use the Update Custom Domain operation. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :param endpoint_update_properties: Endpoint update properties. Required. - :type endpoint_update_properties: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either AFDEndpoint or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.AFDEndpoint] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_update( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - endpoint_update_properties: Union[_models.AFDEndpointUpdateParameters, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.AFDEndpoint]: - """Updates an existing AzureFrontDoor endpoint with the specified endpoint name under the - specified subscription, resource group and profile. Only tags can be updated after creating an - endpoint. To update origins, use the Update Origin operation. To update origin groups, use the - Update Origin group operation. To update domains, use the Update Custom Domain operation. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :param endpoint_update_properties: Endpoint update properties. Is either a - AFDEndpointUpdateParameters type or a IO[bytes] type. Required. - :type endpoint_update_properties: ~azure.mgmt.cdn.models.AFDEndpointUpdateParameters or - IO[bytes] - :return: An instance of LROPoller that returns either AFDEndpoint or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.AFDEndpoint] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.AFDEndpoint] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._update_initial( - resource_group_name=resource_group_name, - profile_name=profile_name, - endpoint_name=endpoint_name, - endpoint_update_properties=endpoint_update_properties, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("AFDEndpoint", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.AFDEndpoint].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.AFDEndpoint]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _delete_initial( - self, resource_group_name: str, profile_name: str, endpoint_name: str, **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - endpoint_name=endpoint_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_delete( - self, resource_group_name: str, profile_name: str, endpoint_name: str, **kwargs: Any - ) -> LROPoller[None]: - """Deletes an existing AzureFrontDoor endpoint with the specified endpoint name under the - specified subscription, resource group and profile. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - profile_name=profile_name, - endpoint_name=endpoint_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - def _purge_content_initial( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - contents: Union[_models.AfdPurgeParameters, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(contents, (IOBase, bytes)): - _content = contents - else: - _json = self._serialize.body(contents, "AfdPurgeParameters") - - _request = build_purge_content_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - endpoint_name=endpoint_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_purge_content( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - contents: _models.AfdPurgeParameters, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[None]: - """Removes a content from AzureFrontDoor. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :param contents: The list of paths to the content and the list of linked domains to be purged. - Path can be a full URL, e.g. '/pictures/city.png' which removes a single file, or a directory - with a wildcard, e.g. '/pictures/*' which removes all folders and files in the directory. - Required. - :type contents: ~azure.mgmt.cdn.models.AfdPurgeParameters - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_purge_content( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - contents: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[None]: - """Removes a content from AzureFrontDoor. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :param contents: The list of paths to the content and the list of linked domains to be purged. - Path can be a full URL, e.g. '/pictures/city.png' which removes a single file, or a directory - with a wildcard, e.g. '/pictures/*' which removes all folders and files in the directory. - Required. - :type contents: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_purge_content( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - contents: Union[_models.AfdPurgeParameters, IO[bytes]], - **kwargs: Any - ) -> LROPoller[None]: - """Removes a content from AzureFrontDoor. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :param contents: The list of paths to the content and the list of linked domains to be purged. - Path can be a full URL, e.g. '/pictures/city.png' which removes a single file, or a directory - with a wildcard, e.g. '/pictures/*' which removes all folders and files in the directory. Is - either a AfdPurgeParameters type or a IO[bytes] type. Required. - :type contents: ~azure.mgmt.cdn.models.AfdPurgeParameters or IO[bytes] - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._purge_content_initial( - resource_group_name=resource_group_name, - profile_name=profile_name, - endpoint_name=endpoint_name, - contents=contents, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - @distributed_trace - def list_resource_usage( - self, resource_group_name: str, profile_name: str, endpoint_name: str, **kwargs: Any - ) -> ItemPaged["_models.Usage"]: - """Checks the quota and actual usage of endpoints under the given Azure Front Door profile. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :return: An iterator like instance of either Usage or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cdn.models.Usage] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.UsagesListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_resource_usage_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - endpoint_name=endpoint_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("UsagesListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @overload - def validate_custom_domain( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - custom_domain_properties: _models.ValidateCustomDomainInput, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ValidateCustomDomainOutput: - """Validates the custom domain mapping to ensure it maps to the correct Azure Front Door endpoint - in DNS. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :param custom_domain_properties: Custom domain to be validated. Required. - :type custom_domain_properties: ~azure.mgmt.cdn.models.ValidateCustomDomainInput - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: ValidateCustomDomainOutput or the result of cls(response) - :rtype: ~azure.mgmt.cdn.models.ValidateCustomDomainOutput - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def validate_custom_domain( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - custom_domain_properties: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ValidateCustomDomainOutput: - """Validates the custom domain mapping to ensure it maps to the correct Azure Front Door endpoint - in DNS. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :param custom_domain_properties: Custom domain to be validated. Required. - :type custom_domain_properties: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: ValidateCustomDomainOutput or the result of cls(response) - :rtype: ~azure.mgmt.cdn.models.ValidateCustomDomainOutput - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def validate_custom_domain( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - custom_domain_properties: Union[_models.ValidateCustomDomainInput, IO[bytes]], - **kwargs: Any - ) -> _models.ValidateCustomDomainOutput: - """Validates the custom domain mapping to ensure it maps to the correct Azure Front Door endpoint - in DNS. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :param custom_domain_properties: Custom domain to be validated. Is either a - ValidateCustomDomainInput type or a IO[bytes] type. Required. - :type custom_domain_properties: ~azure.mgmt.cdn.models.ValidateCustomDomainInput or IO[bytes] - :return: ValidateCustomDomainOutput or the result of cls(response) - :rtype: ~azure.mgmt.cdn.models.ValidateCustomDomainOutput - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ValidateCustomDomainOutput] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(custom_domain_properties, (IOBase, bytes)): - _content = custom_domain_properties - else: - _json = self._serialize.body(custom_domain_properties, "ValidateCustomDomainInput") - - _request = build_validate_custom_domain_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - endpoint_name=endpoint_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("ValidateCustomDomainOutput", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_afd_origin_groups_operations.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_afd_origin_groups_operations.py deleted file mode 100644 index 562db291bf98..000000000000 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_afd_origin_groups_operations.py +++ /dev/null @@ -1,1092 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression,too-many-lines -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.arm_polling import ARMPolling - -from .. import models as _models -from .._configuration import CdnManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_profile_request( - resource_group_name: str, profile_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/originGroups", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "profileName": _SERIALIZER.url( - "profile_name", profile_name, "str", max_length=260, min_length=1, pattern=r"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, profile_name: str, origin_group_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/originGroups/{originGroupName}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "profileName": _SERIALIZER.url( - "profile_name", profile_name, "str", max_length=260, min_length=1, pattern=r"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$" - ), - "originGroupName": _SERIALIZER.url("origin_group_name", origin_group_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_request( - resource_group_name: str, profile_name: str, origin_group_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/originGroups/{originGroupName}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "profileName": _SERIALIZER.url( - "profile_name", profile_name, "str", max_length=260, min_length=1, pattern=r"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$" - ), - "originGroupName": _SERIALIZER.url("origin_group_name", origin_group_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_update_request( - resource_group_name: str, profile_name: str, origin_group_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/originGroups/{originGroupName}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "profileName": _SERIALIZER.url( - "profile_name", profile_name, "str", max_length=260, min_length=1, pattern=r"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$" - ), - "originGroupName": _SERIALIZER.url("origin_group_name", origin_group_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, profile_name: str, origin_group_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/originGroups/{originGroupName}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "profileName": _SERIALIZER.url( - "profile_name", profile_name, "str", max_length=260, min_length=1, pattern=r"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$" - ), - "originGroupName": _SERIALIZER.url("origin_group_name", origin_group_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_list_resource_usage_request( - resource_group_name: str, profile_name: str, origin_group_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/originGroups/{originGroupName}/usages", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "profileName": _SERIALIZER.url( - "profile_name", profile_name, "str", max_length=260, min_length=1, pattern=r"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$" - ), - "originGroupName": _SERIALIZER.url("origin_group_name", origin_group_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -class AFDOriginGroupsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.cdn.CdnManagementClient`'s - :attr:`afd_origin_groups` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: CdnManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_profile( - self, resource_group_name: str, profile_name: str, **kwargs: Any - ) -> ItemPaged["_models.AFDOriginGroup"]: - """Lists all of the existing origin groups within a profile. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :return: An iterator like instance of either AFDOriginGroup or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cdn.models.AFDOriginGroup] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.AFDOriginGroupListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_profile_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("AFDOriginGroupListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get( - self, resource_group_name: str, profile_name: str, origin_group_name: str, **kwargs: Any - ) -> _models.AFDOriginGroup: - """Gets an existing origin group within a profile. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param origin_group_name: Name of the origin group which is unique within the endpoint. - Required. - :type origin_group_name: str - :return: AFDOriginGroup or the result of cls(response) - :rtype: ~azure.mgmt.cdn.models.AFDOriginGroup - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.AFDOriginGroup] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - origin_group_name=origin_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("AFDOriginGroup", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - def _create_initial( - self, - resource_group_name: str, - profile_name: str, - origin_group_name: str, - origin_group: Union[_models.AFDOriginGroup, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(origin_group, (IOBase, bytes)): - _content = origin_group - else: - _json = self._serialize.body(origin_group, "AFDOriginGroup") - - _request = build_create_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - origin_group_name=origin_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_create( - self, - resource_group_name: str, - profile_name: str, - origin_group_name: str, - origin_group: _models.AFDOriginGroup, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.AFDOriginGroup]: - """Creates a new origin group within the specified profile. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param origin_group_name: Name of the origin group which is unique within the endpoint. - Required. - :type origin_group_name: str - :param origin_group: Origin group properties. Required. - :type origin_group: ~azure.mgmt.cdn.models.AFDOriginGroup - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either AFDOriginGroup or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.AFDOriginGroup] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_create( - self, - resource_group_name: str, - profile_name: str, - origin_group_name: str, - origin_group: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.AFDOriginGroup]: - """Creates a new origin group within the specified profile. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param origin_group_name: Name of the origin group which is unique within the endpoint. - Required. - :type origin_group_name: str - :param origin_group: Origin group properties. Required. - :type origin_group: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either AFDOriginGroup or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.AFDOriginGroup] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_create( - self, - resource_group_name: str, - profile_name: str, - origin_group_name: str, - origin_group: Union[_models.AFDOriginGroup, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.AFDOriginGroup]: - """Creates a new origin group within the specified profile. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param origin_group_name: Name of the origin group which is unique within the endpoint. - Required. - :type origin_group_name: str - :param origin_group: Origin group properties. Is either a AFDOriginGroup type or a IO[bytes] - type. Required. - :type origin_group: ~azure.mgmt.cdn.models.AFDOriginGroup or IO[bytes] - :return: An instance of LROPoller that returns either AFDOriginGroup or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.AFDOriginGroup] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.AFDOriginGroup] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._create_initial( - resource_group_name=resource_group_name, - profile_name=profile_name, - origin_group_name=origin_group_name, - origin_group=origin_group, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("AFDOriginGroup", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.AFDOriginGroup].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.AFDOriginGroup]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _update_initial( - self, - resource_group_name: str, - profile_name: str, - origin_group_name: str, - origin_group_update_properties: Union[_models.AFDOriginGroupUpdateParameters, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(origin_group_update_properties, (IOBase, bytes)): - _content = origin_group_update_properties - else: - _json = self._serialize.body(origin_group_update_properties, "AFDOriginGroupUpdateParameters") - - _request = build_update_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - origin_group_name=origin_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_update( - self, - resource_group_name: str, - profile_name: str, - origin_group_name: str, - origin_group_update_properties: _models.AFDOriginGroupUpdateParameters, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.AFDOriginGroup]: - """Updates an existing origin group within a profile. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param origin_group_name: Name of the origin group which is unique within the profile. - Required. - :type origin_group_name: str - :param origin_group_update_properties: Origin group properties. Required. - :type origin_group_update_properties: ~azure.mgmt.cdn.models.AFDOriginGroupUpdateParameters - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either AFDOriginGroup or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.AFDOriginGroup] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_update( - self, - resource_group_name: str, - profile_name: str, - origin_group_name: str, - origin_group_update_properties: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.AFDOriginGroup]: - """Updates an existing origin group within a profile. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param origin_group_name: Name of the origin group which is unique within the profile. - Required. - :type origin_group_name: str - :param origin_group_update_properties: Origin group properties. Required. - :type origin_group_update_properties: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either AFDOriginGroup or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.AFDOriginGroup] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_update( - self, - resource_group_name: str, - profile_name: str, - origin_group_name: str, - origin_group_update_properties: Union[_models.AFDOriginGroupUpdateParameters, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.AFDOriginGroup]: - """Updates an existing origin group within a profile. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param origin_group_name: Name of the origin group which is unique within the profile. - Required. - :type origin_group_name: str - :param origin_group_update_properties: Origin group properties. Is either a - AFDOriginGroupUpdateParameters type or a IO[bytes] type. Required. - :type origin_group_update_properties: ~azure.mgmt.cdn.models.AFDOriginGroupUpdateParameters or - IO[bytes] - :return: An instance of LROPoller that returns either AFDOriginGroup or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.AFDOriginGroup] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.AFDOriginGroup] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._update_initial( - resource_group_name=resource_group_name, - profile_name=profile_name, - origin_group_name=origin_group_name, - origin_group_update_properties=origin_group_update_properties, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("AFDOriginGroup", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.AFDOriginGroup].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.AFDOriginGroup]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _delete_initial( - self, resource_group_name: str, profile_name: str, origin_group_name: str, **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - origin_group_name=origin_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_delete( - self, resource_group_name: str, profile_name: str, origin_group_name: str, **kwargs: Any - ) -> LROPoller[None]: - """Deletes an existing origin group within a profile. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param origin_group_name: Name of the origin group which is unique within the profile. - Required. - :type origin_group_name: str - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - profile_name=profile_name, - origin_group_name=origin_group_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - @distributed_trace - def list_resource_usage( - self, resource_group_name: str, profile_name: str, origin_group_name: str, **kwargs: Any - ) -> ItemPaged["_models.Usage"]: - """Checks the quota and actual usage of endpoints under the given Azure Front Door profile.. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param origin_group_name: Name of the origin group which is unique within the endpoint. - Required. - :type origin_group_name: str - :return: An iterator like instance of either Usage or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cdn.models.Usage] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.UsagesListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_resource_usage_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - origin_group_name=origin_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("UsagesListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_afd_origins_operations.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_afd_origins_operations.py deleted file mode 100644 index 686ec0ad31b2..000000000000 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_afd_origins_operations.py +++ /dev/null @@ -1,1016 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression,too-many-lines -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.arm_polling import ARMPolling - -from .. import models as _models -from .._configuration import CdnManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_origin_group_request( - resource_group_name: str, profile_name: str, origin_group_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/originGroups/{originGroupName}/origins", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "profileName": _SERIALIZER.url( - "profile_name", profile_name, "str", max_length=260, min_length=1, pattern=r"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$" - ), - "originGroupName": _SERIALIZER.url("origin_group_name", origin_group_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, - profile_name: str, - origin_group_name: str, - origin_name: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/originGroups/{originGroupName}/origins/{originName}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "profileName": _SERIALIZER.url( - "profile_name", profile_name, "str", max_length=260, min_length=1, pattern=r"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$" - ), - "originGroupName": _SERIALIZER.url("origin_group_name", origin_group_name, "str"), - "originName": _SERIALIZER.url("origin_name", origin_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_request( - resource_group_name: str, - profile_name: str, - origin_group_name: str, - origin_name: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/originGroups/{originGroupName}/origins/{originName}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "profileName": _SERIALIZER.url( - "profile_name", profile_name, "str", max_length=260, min_length=1, pattern=r"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$" - ), - "originGroupName": _SERIALIZER.url("origin_group_name", origin_group_name, "str"), - "originName": _SERIALIZER.url("origin_name", origin_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_update_request( - resource_group_name: str, - profile_name: str, - origin_group_name: str, - origin_name: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/originGroups/{originGroupName}/origins/{originName}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "profileName": _SERIALIZER.url( - "profile_name", profile_name, "str", max_length=260, min_length=1, pattern=r"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$" - ), - "originGroupName": _SERIALIZER.url("origin_group_name", origin_group_name, "str"), - "originName": _SERIALIZER.url("origin_name", origin_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, - profile_name: str, - origin_group_name: str, - origin_name: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/originGroups/{originGroupName}/origins/{originName}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "profileName": _SERIALIZER.url( - "profile_name", profile_name, "str", max_length=260, min_length=1, pattern=r"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$" - ), - "originGroupName": _SERIALIZER.url("origin_group_name", origin_group_name, "str"), - "originName": _SERIALIZER.url("origin_name", origin_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -class AFDOriginsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.cdn.CdnManagementClient`'s - :attr:`afd_origins` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: CdnManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_origin_group( - self, resource_group_name: str, profile_name: str, origin_group_name: str, **kwargs: Any - ) -> ItemPaged["_models.AFDOrigin"]: - """Lists all of the existing origins within an origin group. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param origin_group_name: Name of the origin group which is unique within the profile. - Required. - :type origin_group_name: str - :return: An iterator like instance of either AFDOrigin or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cdn.models.AFDOrigin] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.AFDOriginListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_origin_group_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - origin_group_name=origin_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("AFDOriginListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get( - self, resource_group_name: str, profile_name: str, origin_group_name: str, origin_name: str, **kwargs: Any - ) -> _models.AFDOrigin: - """Gets an existing origin within an origin group. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param origin_group_name: Name of the origin group which is unique within the profile. - Required. - :type origin_group_name: str - :param origin_name: Name of the origin which is unique within the profile. Required. - :type origin_name: str - :return: AFDOrigin or the result of cls(response) - :rtype: ~azure.mgmt.cdn.models.AFDOrigin - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.AFDOrigin] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - origin_group_name=origin_group_name, - origin_name=origin_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("AFDOrigin", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - def _create_initial( - self, - resource_group_name: str, - profile_name: str, - origin_group_name: str, - origin_name: str, - origin: Union[_models.AFDOrigin, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(origin, (IOBase, bytes)): - _content = origin - else: - _json = self._serialize.body(origin, "AFDOrigin") - - _request = build_create_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - origin_group_name=origin_group_name, - origin_name=origin_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_create( - self, - resource_group_name: str, - profile_name: str, - origin_group_name: str, - origin_name: str, - origin: _models.AFDOrigin, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.AFDOrigin]: - """Creates a new origin within the specified origin group. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param origin_group_name: Name of the origin group which is unique within the profile. - Required. - :type origin_group_name: str - :param origin_name: Name of the origin that is unique within the profile. Required. - :type origin_name: str - :param origin: Origin properties. Required. - :type origin: ~azure.mgmt.cdn.models.AFDOrigin - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either AFDOrigin or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.AFDOrigin] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_create( - self, - resource_group_name: str, - profile_name: str, - origin_group_name: str, - origin_name: str, - origin: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.AFDOrigin]: - """Creates a new origin within the specified origin group. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param origin_group_name: Name of the origin group which is unique within the profile. - Required. - :type origin_group_name: str - :param origin_name: Name of the origin that is unique within the profile. Required. - :type origin_name: str - :param origin: Origin properties. Required. - :type origin: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either AFDOrigin or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.AFDOrigin] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_create( - self, - resource_group_name: str, - profile_name: str, - origin_group_name: str, - origin_name: str, - origin: Union[_models.AFDOrigin, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.AFDOrigin]: - """Creates a new origin within the specified origin group. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param origin_group_name: Name of the origin group which is unique within the profile. - Required. - :type origin_group_name: str - :param origin_name: Name of the origin that is unique within the profile. Required. - :type origin_name: str - :param origin: Origin properties. Is either a AFDOrigin type or a IO[bytes] type. Required. - :type origin: ~azure.mgmt.cdn.models.AFDOrigin or IO[bytes] - :return: An instance of LROPoller that returns either AFDOrigin or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.AFDOrigin] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.AFDOrigin] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._create_initial( - resource_group_name=resource_group_name, - profile_name=profile_name, - origin_group_name=origin_group_name, - origin_name=origin_name, - origin=origin, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("AFDOrigin", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.AFDOrigin].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.AFDOrigin]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _update_initial( - self, - resource_group_name: str, - profile_name: str, - origin_group_name: str, - origin_name: str, - origin_update_properties: Union[_models.AFDOriginUpdateParameters, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(origin_update_properties, (IOBase, bytes)): - _content = origin_update_properties - else: - _json = self._serialize.body(origin_update_properties, "AFDOriginUpdateParameters") - - _request = build_update_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - origin_group_name=origin_group_name, - origin_name=origin_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_update( - self, - resource_group_name: str, - profile_name: str, - origin_group_name: str, - origin_name: str, - origin_update_properties: _models.AFDOriginUpdateParameters, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.AFDOrigin]: - """Updates an existing origin within an origin group. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param origin_group_name: Name of the origin group which is unique within the profile. - Required. - :type origin_group_name: str - :param origin_name: Name of the origin which is unique within the profile. Required. - :type origin_name: str - :param origin_update_properties: Origin properties. Required. - :type origin_update_properties: ~azure.mgmt.cdn.models.AFDOriginUpdateParameters - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either AFDOrigin or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.AFDOrigin] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_update( - self, - resource_group_name: str, - profile_name: str, - origin_group_name: str, - origin_name: str, - origin_update_properties: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.AFDOrigin]: - """Updates an existing origin within an origin group. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param origin_group_name: Name of the origin group which is unique within the profile. - Required. - :type origin_group_name: str - :param origin_name: Name of the origin which is unique within the profile. Required. - :type origin_name: str - :param origin_update_properties: Origin properties. Required. - :type origin_update_properties: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either AFDOrigin or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.AFDOrigin] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_update( - self, - resource_group_name: str, - profile_name: str, - origin_group_name: str, - origin_name: str, - origin_update_properties: Union[_models.AFDOriginUpdateParameters, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.AFDOrigin]: - """Updates an existing origin within an origin group. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param origin_group_name: Name of the origin group which is unique within the profile. - Required. - :type origin_group_name: str - :param origin_name: Name of the origin which is unique within the profile. Required. - :type origin_name: str - :param origin_update_properties: Origin properties. Is either a AFDOriginUpdateParameters type - or a IO[bytes] type. Required. - :type origin_update_properties: ~azure.mgmt.cdn.models.AFDOriginUpdateParameters or IO[bytes] - :return: An instance of LROPoller that returns either AFDOrigin or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.AFDOrigin] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.AFDOrigin] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._update_initial( - resource_group_name=resource_group_name, - profile_name=profile_name, - origin_group_name=origin_group_name, - origin_name=origin_name, - origin_update_properties=origin_update_properties, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("AFDOrigin", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.AFDOrigin].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.AFDOrigin]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _delete_initial( - self, resource_group_name: str, profile_name: str, origin_group_name: str, origin_name: str, **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - origin_group_name=origin_group_name, - origin_name=origin_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_delete( - self, resource_group_name: str, profile_name: str, origin_group_name: str, origin_name: str, **kwargs: Any - ) -> LROPoller[None]: - """Deletes an existing origin within an origin group. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param origin_group_name: Name of the origin group which is unique within the profile. - Required. - :type origin_group_name: str - :param origin_name: Name of the origin which is unique within the profile. Required. - :type origin_name: str - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - profile_name=profile_name, - origin_group_name=origin_group_name, - origin_name=origin_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_afd_profiles_operations.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_afd_profiles_operations.py deleted file mode 100644 index cb7b1f6a61cd..000000000000 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_afd_profiles_operations.py +++ /dev/null @@ -1,960 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.arm_polling import ARMPolling - -from .. import models as _models -from .._configuration import CdnManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_check_endpoint_name_availability_request( # pylint: disable=name-too-long - resource_group_name: str, profile_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/checkEndpointNameAvailability", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "profileName": _SERIALIZER.url( - "profile_name", profile_name, "str", max_length=260, min_length=1, pattern=r"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$" - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_list_resource_usage_request( - resource_group_name: str, profile_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/usages", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "profileName": _SERIALIZER.url( - "profile_name", profile_name, "str", max_length=260, min_length=1, pattern=r"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_check_host_name_availability_request( # pylint: disable=name-too-long - resource_group_name: str, profile_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/checkHostNameAvailability", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "profileName": _SERIALIZER.url( - "profile_name", profile_name, "str", max_length=260, min_length=1, pattern=r"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_validate_secret_request( - resource_group_name: str, profile_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/validateSecret", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "profileName": _SERIALIZER.url( - "profile_name", profile_name, "str", max_length=260, min_length=1, pattern=r"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_upgrade_request( - resource_group_name: str, profile_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/upgrade", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "profileName": _SERIALIZER.url( - "profile_name", profile_name, "str", max_length=260, min_length=1, pattern=r"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -class AFDProfilesOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.cdn.CdnManagementClient`'s - :attr:`afd_profiles` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: CdnManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @overload - def check_endpoint_name_availability( - self, - resource_group_name: str, - profile_name: str, - check_endpoint_name_availability_input: _models.CheckEndpointNameAvailabilityInput, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.CheckEndpointNameAvailabilityOutput: - """Check the availability of an afdx endpoint name, and return the globally unique endpoint host - name. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param check_endpoint_name_availability_input: Input to check. Required. - :type check_endpoint_name_availability_input: - ~azure.mgmt.cdn.models.CheckEndpointNameAvailabilityInput - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: CheckEndpointNameAvailabilityOutput or the result of cls(response) - :rtype: ~azure.mgmt.cdn.models.CheckEndpointNameAvailabilityOutput - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def check_endpoint_name_availability( - self, - resource_group_name: str, - profile_name: str, - check_endpoint_name_availability_input: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.CheckEndpointNameAvailabilityOutput: - """Check the availability of an afdx endpoint name, and return the globally unique endpoint host - name. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param check_endpoint_name_availability_input: Input to check. Required. - :type check_endpoint_name_availability_input: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: CheckEndpointNameAvailabilityOutput or the result of cls(response) - :rtype: ~azure.mgmt.cdn.models.CheckEndpointNameAvailabilityOutput - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def check_endpoint_name_availability( - self, - resource_group_name: str, - profile_name: str, - check_endpoint_name_availability_input: Union[_models.CheckEndpointNameAvailabilityInput, IO[bytes]], - **kwargs: Any - ) -> _models.CheckEndpointNameAvailabilityOutput: - """Check the availability of an afdx endpoint name, and return the globally unique endpoint host - name. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param check_endpoint_name_availability_input: Input to check. Is either a - CheckEndpointNameAvailabilityInput type or a IO[bytes] type. Required. - :type check_endpoint_name_availability_input: - ~azure.mgmt.cdn.models.CheckEndpointNameAvailabilityInput or IO[bytes] - :return: CheckEndpointNameAvailabilityOutput or the result of cls(response) - :rtype: ~azure.mgmt.cdn.models.CheckEndpointNameAvailabilityOutput - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CheckEndpointNameAvailabilityOutput] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(check_endpoint_name_availability_input, (IOBase, bytes)): - _content = check_endpoint_name_availability_input - else: - _json = self._serialize.body(check_endpoint_name_availability_input, "CheckEndpointNameAvailabilityInput") - - _request = build_check_endpoint_name_availability_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("CheckEndpointNameAvailabilityOutput", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def list_resource_usage( - self, resource_group_name: str, profile_name: str, **kwargs: Any - ) -> ItemPaged["_models.Usage"]: - """Checks the quota and actual usage of endpoints under the given Azure Front Door profile. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :return: An iterator like instance of either Usage or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cdn.models.Usage] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.UsagesListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_resource_usage_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("UsagesListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @overload - def check_host_name_availability( - self, - resource_group_name: str, - profile_name: str, - check_host_name_availability_input: _models.CheckHostNameAvailabilityInput, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.CheckNameAvailabilityOutput: - """Validates the custom domain mapping to ensure it maps to the correct Azure Front Door endpoint - in DNS. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param check_host_name_availability_input: Custom domain to be validated. Required. - :type check_host_name_availability_input: ~azure.mgmt.cdn.models.CheckHostNameAvailabilityInput - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: CheckNameAvailabilityOutput or the result of cls(response) - :rtype: ~azure.mgmt.cdn.models.CheckNameAvailabilityOutput - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def check_host_name_availability( - self, - resource_group_name: str, - profile_name: str, - check_host_name_availability_input: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.CheckNameAvailabilityOutput: - """Validates the custom domain mapping to ensure it maps to the correct Azure Front Door endpoint - in DNS. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param check_host_name_availability_input: Custom domain to be validated. Required. - :type check_host_name_availability_input: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: CheckNameAvailabilityOutput or the result of cls(response) - :rtype: ~azure.mgmt.cdn.models.CheckNameAvailabilityOutput - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def check_host_name_availability( - self, - resource_group_name: str, - profile_name: str, - check_host_name_availability_input: Union[_models.CheckHostNameAvailabilityInput, IO[bytes]], - **kwargs: Any - ) -> _models.CheckNameAvailabilityOutput: - """Validates the custom domain mapping to ensure it maps to the correct Azure Front Door endpoint - in DNS. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param check_host_name_availability_input: Custom domain to be validated. Is either a - CheckHostNameAvailabilityInput type or a IO[bytes] type. Required. - :type check_host_name_availability_input: ~azure.mgmt.cdn.models.CheckHostNameAvailabilityInput - or IO[bytes] - :return: CheckNameAvailabilityOutput or the result of cls(response) - :rtype: ~azure.mgmt.cdn.models.CheckNameAvailabilityOutput - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CheckNameAvailabilityOutput] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(check_host_name_availability_input, (IOBase, bytes)): - _content = check_host_name_availability_input - else: - _json = self._serialize.body(check_host_name_availability_input, "CheckHostNameAvailabilityInput") - - _request = build_check_host_name_availability_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("CheckNameAvailabilityOutput", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - def validate_secret( - self, - resource_group_name: str, - profile_name: str, - validate_secret_input: _models.ValidateSecretInput, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ValidateSecretOutput: - """Validate a Secret in the profile. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param validate_secret_input: The Secret source. Required. - :type validate_secret_input: ~azure.mgmt.cdn.models.ValidateSecretInput - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: ValidateSecretOutput or the result of cls(response) - :rtype: ~azure.mgmt.cdn.models.ValidateSecretOutput - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def validate_secret( - self, - resource_group_name: str, - profile_name: str, - validate_secret_input: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ValidateSecretOutput: - """Validate a Secret in the profile. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param validate_secret_input: The Secret source. Required. - :type validate_secret_input: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: ValidateSecretOutput or the result of cls(response) - :rtype: ~azure.mgmt.cdn.models.ValidateSecretOutput - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def validate_secret( - self, - resource_group_name: str, - profile_name: str, - validate_secret_input: Union[_models.ValidateSecretInput, IO[bytes]], - **kwargs: Any - ) -> _models.ValidateSecretOutput: - """Validate a Secret in the profile. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param validate_secret_input: The Secret source. Is either a ValidateSecretInput type or a - IO[bytes] type. Required. - :type validate_secret_input: ~azure.mgmt.cdn.models.ValidateSecretInput or IO[bytes] - :return: ValidateSecretOutput or the result of cls(response) - :rtype: ~azure.mgmt.cdn.models.ValidateSecretOutput - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ValidateSecretOutput] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(validate_secret_input, (IOBase, bytes)): - _content = validate_secret_input - else: - _json = self._serialize.body(validate_secret_input, "ValidateSecretInput") - - _request = build_validate_secret_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("ValidateSecretOutput", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - def _upgrade_initial( - self, - resource_group_name: str, - profile_name: str, - profile_upgrade_parameters: Union[_models.ProfileUpgradeParameters, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(profile_upgrade_parameters, (IOBase, bytes)): - _content = profile_upgrade_parameters - else: - _json = self._serialize.body(profile_upgrade_parameters, "ProfileUpgradeParameters") - - _request = build_upgrade_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_upgrade( - self, - resource_group_name: str, - profile_name: str, - profile_upgrade_parameters: _models.ProfileUpgradeParameters, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.Profile]: - """Upgrade a profile from Standard_AzureFrontDoor to Premium_AzureFrontDoor. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param profile_upgrade_parameters: Profile upgrade input parameter. Required. - :type profile_upgrade_parameters: ~azure.mgmt.cdn.models.ProfileUpgradeParameters - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either Profile or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.Profile] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_upgrade( - self, - resource_group_name: str, - profile_name: str, - profile_upgrade_parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.Profile]: - """Upgrade a profile from Standard_AzureFrontDoor to Premium_AzureFrontDoor. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param profile_upgrade_parameters: Profile upgrade input parameter. Required. - :type profile_upgrade_parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either Profile or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.Profile] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_upgrade( - self, - resource_group_name: str, - profile_name: str, - profile_upgrade_parameters: Union[_models.ProfileUpgradeParameters, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.Profile]: - """Upgrade a profile from Standard_AzureFrontDoor to Premium_AzureFrontDoor. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param profile_upgrade_parameters: Profile upgrade input parameter. Is either a - ProfileUpgradeParameters type or a IO[bytes] type. Required. - :type profile_upgrade_parameters: ~azure.mgmt.cdn.models.ProfileUpgradeParameters or IO[bytes] - :return: An instance of LROPoller that returns either Profile or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.Profile] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.Profile] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._upgrade_initial( - resource_group_name=resource_group_name, - profile_name=profile_name, - profile_upgrade_parameters=profile_upgrade_parameters, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("Profile", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.Profile].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.Profile]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_cdn_management_client_operations.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_cdn_management_client_operations.py deleted file mode 100644 index ee180c116620..000000000000 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_cdn_management_client_operations.py +++ /dev/null @@ -1,609 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import CdnManagementClientConfiguration -from .._utils.serialization import Serializer -from .._utils.utils import ClientMixinABC - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_check_endpoint_name_availability_request( # pylint: disable=name-too-long - resource_group_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/checkEndpointNameAvailability", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_check_name_availability_request(**kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop("template_url", "/providers/Microsoft.Cdn/checkNameAvailability") - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_check_name_availability_with_subscription_request( # pylint: disable=name-too-long - subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Cdn/checkNameAvailability") - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_validate_probe_request(subscription_id: str, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Cdn/validateProbe") - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -class _CdnManagementClientOperationsMixin( - ClientMixinABC[PipelineClient[HttpRequest, HttpResponse], CdnManagementClientConfiguration] -): - - @overload - def check_endpoint_name_availability( - self, - resource_group_name: str, - check_endpoint_name_availability_input: _models.CheckEndpointNameAvailabilityInput, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.CheckEndpointNameAvailabilityOutput: - """Check the availability of a resource name. This is needed for resources where name is globally - unique, such as a afdx endpoint. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param check_endpoint_name_availability_input: Input to check. Required. - :type check_endpoint_name_availability_input: - ~azure.mgmt.cdn.models.CheckEndpointNameAvailabilityInput - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: CheckEndpointNameAvailabilityOutput or the result of cls(response) - :rtype: ~azure.mgmt.cdn.models.CheckEndpointNameAvailabilityOutput - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def check_endpoint_name_availability( - self, - resource_group_name: str, - check_endpoint_name_availability_input: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.CheckEndpointNameAvailabilityOutput: - """Check the availability of a resource name. This is needed for resources where name is globally - unique, such as a afdx endpoint. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param check_endpoint_name_availability_input: Input to check. Required. - :type check_endpoint_name_availability_input: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: CheckEndpointNameAvailabilityOutput or the result of cls(response) - :rtype: ~azure.mgmt.cdn.models.CheckEndpointNameAvailabilityOutput - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def check_endpoint_name_availability( - self, - resource_group_name: str, - check_endpoint_name_availability_input: Union[_models.CheckEndpointNameAvailabilityInput, IO[bytes]], - **kwargs: Any - ) -> _models.CheckEndpointNameAvailabilityOutput: - """Check the availability of a resource name. This is needed for resources where name is globally - unique, such as a afdx endpoint. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param check_endpoint_name_availability_input: Input to check. Is either a - CheckEndpointNameAvailabilityInput type or a IO[bytes] type. Required. - :type check_endpoint_name_availability_input: - ~azure.mgmt.cdn.models.CheckEndpointNameAvailabilityInput or IO[bytes] - :return: CheckEndpointNameAvailabilityOutput or the result of cls(response) - :rtype: ~azure.mgmt.cdn.models.CheckEndpointNameAvailabilityOutput - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CheckEndpointNameAvailabilityOutput] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(check_endpoint_name_availability_input, (IOBase, bytes)): - _content = check_endpoint_name_availability_input - else: - _json = self._serialize.body(check_endpoint_name_availability_input, "CheckEndpointNameAvailabilityInput") - - _request = build_check_endpoint_name_availability_request( - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("CheckEndpointNameAvailabilityOutput", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - def check_name_availability( - self, - check_name_availability_input: _models.CheckNameAvailabilityInput, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.CheckNameAvailabilityOutput: - """Check the availability of a resource name. This is needed for resources where name is globally - unique, such as a CDN endpoint. - - :param check_name_availability_input: Input to check. Required. - :type check_name_availability_input: ~azure.mgmt.cdn.models.CheckNameAvailabilityInput - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: CheckNameAvailabilityOutput or the result of cls(response) - :rtype: ~azure.mgmt.cdn.models.CheckNameAvailabilityOutput - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def check_name_availability( - self, check_name_availability_input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> _models.CheckNameAvailabilityOutput: - """Check the availability of a resource name. This is needed for resources where name is globally - unique, such as a CDN endpoint. - - :param check_name_availability_input: Input to check. Required. - :type check_name_availability_input: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: CheckNameAvailabilityOutput or the result of cls(response) - :rtype: ~azure.mgmt.cdn.models.CheckNameAvailabilityOutput - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def check_name_availability( - self, check_name_availability_input: Union[_models.CheckNameAvailabilityInput, IO[bytes]], **kwargs: Any - ) -> _models.CheckNameAvailabilityOutput: - """Check the availability of a resource name. This is needed for resources where name is globally - unique, such as a CDN endpoint. - - :param check_name_availability_input: Input to check. Is either a CheckNameAvailabilityInput - type or a IO[bytes] type. Required. - :type check_name_availability_input: ~azure.mgmt.cdn.models.CheckNameAvailabilityInput or - IO[bytes] - :return: CheckNameAvailabilityOutput or the result of cls(response) - :rtype: ~azure.mgmt.cdn.models.CheckNameAvailabilityOutput - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CheckNameAvailabilityOutput] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(check_name_availability_input, (IOBase, bytes)): - _content = check_name_availability_input - else: - _json = self._serialize.body(check_name_availability_input, "CheckNameAvailabilityInput") - - _request = build_check_name_availability_request( - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("CheckNameAvailabilityOutput", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - def check_name_availability_with_subscription( # pylint: disable=name-too-long - self, - check_name_availability_input: _models.CheckNameAvailabilityInput, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.CheckNameAvailabilityOutput: - """Check the availability of a resource name. This is needed for resources where name is globally - unique, such as a CDN endpoint. - - :param check_name_availability_input: Input to check. Required. - :type check_name_availability_input: ~azure.mgmt.cdn.models.CheckNameAvailabilityInput - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: CheckNameAvailabilityOutput or the result of cls(response) - :rtype: ~azure.mgmt.cdn.models.CheckNameAvailabilityOutput - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def check_name_availability_with_subscription( # pylint: disable=name-too-long - self, check_name_availability_input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> _models.CheckNameAvailabilityOutput: - """Check the availability of a resource name. This is needed for resources where name is globally - unique, such as a CDN endpoint. - - :param check_name_availability_input: Input to check. Required. - :type check_name_availability_input: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: CheckNameAvailabilityOutput or the result of cls(response) - :rtype: ~azure.mgmt.cdn.models.CheckNameAvailabilityOutput - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def check_name_availability_with_subscription( # pylint: disable=name-too-long - self, check_name_availability_input: Union[_models.CheckNameAvailabilityInput, IO[bytes]], **kwargs: Any - ) -> _models.CheckNameAvailabilityOutput: - """Check the availability of a resource name. This is needed for resources where name is globally - unique, such as a CDN endpoint. - - :param check_name_availability_input: Input to check. Is either a CheckNameAvailabilityInput - type or a IO[bytes] type. Required. - :type check_name_availability_input: ~azure.mgmt.cdn.models.CheckNameAvailabilityInput or - IO[bytes] - :return: CheckNameAvailabilityOutput or the result of cls(response) - :rtype: ~azure.mgmt.cdn.models.CheckNameAvailabilityOutput - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CheckNameAvailabilityOutput] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(check_name_availability_input, (IOBase, bytes)): - _content = check_name_availability_input - else: - _json = self._serialize.body(check_name_availability_input, "CheckNameAvailabilityInput") - - _request = build_check_name_availability_with_subscription_request( - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("CheckNameAvailabilityOutput", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - def validate_probe( - self, validate_probe_input: _models.ValidateProbeInput, *, content_type: str = "application/json", **kwargs: Any - ) -> _models.ValidateProbeOutput: - """Check if the probe path is a valid path and the file can be accessed. Probe path is the path to - a file hosted on the origin server to help accelerate the delivery of dynamic content via the - CDN endpoint. This path is relative to the origin path specified in the endpoint configuration. - - :param validate_probe_input: Input to check. Required. - :type validate_probe_input: ~azure.mgmt.cdn.models.ValidateProbeInput - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: ValidateProbeOutput or the result of cls(response) - :rtype: ~azure.mgmt.cdn.models.ValidateProbeOutput - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def validate_probe( - self, validate_probe_input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> _models.ValidateProbeOutput: - """Check if the probe path is a valid path and the file can be accessed. Probe path is the path to - a file hosted on the origin server to help accelerate the delivery of dynamic content via the - CDN endpoint. This path is relative to the origin path specified in the endpoint configuration. - - :param validate_probe_input: Input to check. Required. - :type validate_probe_input: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: ValidateProbeOutput or the result of cls(response) - :rtype: ~azure.mgmt.cdn.models.ValidateProbeOutput - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def validate_probe( - self, validate_probe_input: Union[_models.ValidateProbeInput, IO[bytes]], **kwargs: Any - ) -> _models.ValidateProbeOutput: - """Check if the probe path is a valid path and the file can be accessed. Probe path is the path to - a file hosted on the origin server to help accelerate the delivery of dynamic content via the - CDN endpoint. This path is relative to the origin path specified in the endpoint configuration. - - :param validate_probe_input: Input to check. Is either a ValidateProbeInput type or a IO[bytes] - type. Required. - :type validate_probe_input: ~azure.mgmt.cdn.models.ValidateProbeInput or IO[bytes] - :return: ValidateProbeOutput or the result of cls(response) - :rtype: ~azure.mgmt.cdn.models.ValidateProbeOutput - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ValidateProbeOutput] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(validate_probe_input, (IOBase, bytes)): - _content = validate_probe_input - else: - _json = self._serialize.body(validate_probe_input, "ValidateProbeInput") - - _request = build_validate_probe_request( - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("ValidateProbeOutput", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_custom_domains_operations.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_custom_domains_operations.py deleted file mode 100644 index 0165643c3c68..000000000000 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_custom_domains_operations.py +++ /dev/null @@ -1,1196 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression,too-many-lines -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.arm_polling import ARMPolling - -from .. import models as _models -from .._configuration import CdnManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_endpoint_request( - resource_group_name: str, profile_name: str, endpoint_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/customDomains", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), - "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, - profile_name: str, - endpoint_name: str, - custom_domain_name: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/customDomains/{customDomainName}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), - "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, "str"), - "customDomainName": _SERIALIZER.url("custom_domain_name", custom_domain_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_request( - resource_group_name: str, - profile_name: str, - endpoint_name: str, - custom_domain_name: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/customDomains/{customDomainName}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), - "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, "str"), - "customDomainName": _SERIALIZER.url("custom_domain_name", custom_domain_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, - profile_name: str, - endpoint_name: str, - custom_domain_name: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/customDomains/{customDomainName}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), - "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, "str"), - "customDomainName": _SERIALIZER.url("custom_domain_name", custom_domain_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_disable_custom_https_request( - resource_group_name: str, - profile_name: str, - endpoint_name: str, - custom_domain_name: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/customDomains/{customDomainName}/disableCustomHttps", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), - "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, "str"), - "customDomainName": _SERIALIZER.url("custom_domain_name", custom_domain_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_enable_custom_https_request( - resource_group_name: str, - profile_name: str, - endpoint_name: str, - custom_domain_name: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/customDomains/{customDomainName}/enableCustomHttps", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), - "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, "str"), - "customDomainName": _SERIALIZER.url("custom_domain_name", custom_domain_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -class CustomDomainsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.cdn.CdnManagementClient`'s - :attr:`custom_domains` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: CdnManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_endpoint( - self, resource_group_name: str, profile_name: str, endpoint_name: str, **kwargs: Any - ) -> ItemPaged["_models.CustomDomain"]: - """Lists all of the existing custom domains within an endpoint. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the CDN profile which is unique within the resource group. - Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :return: An iterator like instance of either CustomDomain or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cdn.models.CustomDomain] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.CustomDomainListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_endpoint_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - endpoint_name=endpoint_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("CustomDomainListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get( - self, resource_group_name: str, profile_name: str, endpoint_name: str, custom_domain_name: str, **kwargs: Any - ) -> _models.CustomDomain: - """Gets an existing custom domain within an endpoint. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the CDN profile which is unique within the resource group. - Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :param custom_domain_name: Name of the custom domain within an endpoint. Required. - :type custom_domain_name: str - :return: CustomDomain or the result of cls(response) - :rtype: ~azure.mgmt.cdn.models.CustomDomain - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.CustomDomain] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - endpoint_name=endpoint_name, - custom_domain_name=custom_domain_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("CustomDomain", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - def _create_initial( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - custom_domain_name: str, - custom_domain_properties: Union[_models.CustomDomainParameters, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(custom_domain_properties, (IOBase, bytes)): - _content = custom_domain_properties - else: - _json = self._serialize.body(custom_domain_properties, "CustomDomainParameters") - - _request = build_create_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - endpoint_name=endpoint_name, - custom_domain_name=custom_domain_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_create( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - custom_domain_name: str, - custom_domain_properties: _models.CustomDomainParameters, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.CustomDomain]: - """Creates a new custom domain within an endpoint. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the CDN profile which is unique within the resource group. - Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :param custom_domain_name: Name of the custom domain within an endpoint. Required. - :type custom_domain_name: str - :param custom_domain_properties: Properties required to create a new custom domain. Required. - :type custom_domain_properties: ~azure.mgmt.cdn.models.CustomDomainParameters - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either CustomDomain or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.CustomDomain] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_create( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - custom_domain_name: str, - custom_domain_properties: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.CustomDomain]: - """Creates a new custom domain within an endpoint. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the CDN profile which is unique within the resource group. - Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :param custom_domain_name: Name of the custom domain within an endpoint. Required. - :type custom_domain_name: str - :param custom_domain_properties: Properties required to create a new custom domain. Required. - :type custom_domain_properties: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either CustomDomain or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.CustomDomain] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_create( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - custom_domain_name: str, - custom_domain_properties: Union[_models.CustomDomainParameters, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.CustomDomain]: - """Creates a new custom domain within an endpoint. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the CDN profile which is unique within the resource group. - Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :param custom_domain_name: Name of the custom domain within an endpoint. Required. - :type custom_domain_name: str - :param custom_domain_properties: Properties required to create a new custom domain. Is either a - CustomDomainParameters type or a IO[bytes] type. Required. - :type custom_domain_properties: ~azure.mgmt.cdn.models.CustomDomainParameters or IO[bytes] - :return: An instance of LROPoller that returns either CustomDomain or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.CustomDomain] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CustomDomain] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._create_initial( - resource_group_name=resource_group_name, - profile_name=profile_name, - endpoint_name=endpoint_name, - custom_domain_name=custom_domain_name, - custom_domain_properties=custom_domain_properties, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CustomDomain", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.CustomDomain].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.CustomDomain]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _delete_initial( - self, resource_group_name: str, profile_name: str, endpoint_name: str, custom_domain_name: str, **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - endpoint_name=endpoint_name, - custom_domain_name=custom_domain_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_delete( - self, resource_group_name: str, profile_name: str, endpoint_name: str, custom_domain_name: str, **kwargs: Any - ) -> LROPoller[_models.CustomDomain]: - """Deletes an existing custom domain within an endpoint. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the CDN profile which is unique within the resource group. - Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :param custom_domain_name: Name of the custom domain within an endpoint. Required. - :type custom_domain_name: str - :return: An instance of LROPoller that returns either CustomDomain or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.CustomDomain] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - profile_name=profile_name, - endpoint_name=endpoint_name, - custom_domain_name=custom_domain_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - response_headers = {} - response = pipeline_response.http_response - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = self._deserialize("CustomDomain", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.CustomDomain].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.CustomDomain]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _disable_custom_https_initial( - self, resource_group_name: str, profile_name: str, endpoint_name: str, custom_domain_name: str, **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_disable_custom_https_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - endpoint_name=endpoint_name, - custom_domain_name=custom_domain_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_disable_custom_https( - self, resource_group_name: str, profile_name: str, endpoint_name: str, custom_domain_name: str, **kwargs: Any - ) -> LROPoller[_models.CustomDomain]: - """Disable https delivery of the custom domain. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the CDN profile which is unique within the resource group. - Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :param custom_domain_name: Name of the custom domain within an endpoint. Required. - :type custom_domain_name: str - :return: An instance of LROPoller that returns either CustomDomain or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.CustomDomain] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.CustomDomain] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._disable_custom_https_initial( - resource_group_name=resource_group_name, - profile_name=profile_name, - endpoint_name=endpoint_name, - custom_domain_name=custom_domain_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CustomDomain", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.CustomDomain].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.CustomDomain]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _enable_custom_https_initial( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - custom_domain_name: str, - custom_domain_https_parameters: Optional[Union[_models.CustomDomainHttpsParameters, IO[bytes]]] = None, - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - content_type = content_type if custom_domain_https_parameters else None - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" if custom_domain_https_parameters else None - _json = None - _content = None - if isinstance(custom_domain_https_parameters, (IOBase, bytes)): - _content = custom_domain_https_parameters - else: - if custom_domain_https_parameters is not None: - _json = self._serialize.body(custom_domain_https_parameters, "CustomDomainHttpsParameters") - else: - _json = None - - _request = build_enable_custom_https_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - endpoint_name=endpoint_name, - custom_domain_name=custom_domain_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_enable_custom_https( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - custom_domain_name: str, - custom_domain_https_parameters: Optional[_models.CustomDomainHttpsParameters] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.CustomDomain]: - """Enable https delivery of the custom domain. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the CDN profile which is unique within the resource group. - Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :param custom_domain_name: Name of the custom domain within an endpoint. Required. - :type custom_domain_name: str - :param custom_domain_https_parameters: The configuration specifying how to enable HTTPS for the - custom domain - using CDN managed certificate or user's own certificate. If not specified, - enabling ssl uses CDN managed certificate by default. Default value is None. - :type custom_domain_https_parameters: ~azure.mgmt.cdn.models.CustomDomainHttpsParameters - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either CustomDomain or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.CustomDomain] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_enable_custom_https( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - custom_domain_name: str, - custom_domain_https_parameters: Optional[IO[bytes]] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.CustomDomain]: - """Enable https delivery of the custom domain. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the CDN profile which is unique within the resource group. - Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :param custom_domain_name: Name of the custom domain within an endpoint. Required. - :type custom_domain_name: str - :param custom_domain_https_parameters: The configuration specifying how to enable HTTPS for the - custom domain - using CDN managed certificate or user's own certificate. If not specified, - enabling ssl uses CDN managed certificate by default. Default value is None. - :type custom_domain_https_parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either CustomDomain or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.CustomDomain] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_enable_custom_https( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - custom_domain_name: str, - custom_domain_https_parameters: Optional[Union[_models.CustomDomainHttpsParameters, IO[bytes]]] = None, - **kwargs: Any - ) -> LROPoller[_models.CustomDomain]: - """Enable https delivery of the custom domain. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the CDN profile which is unique within the resource group. - Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :param custom_domain_name: Name of the custom domain within an endpoint. Required. - :type custom_domain_name: str - :param custom_domain_https_parameters: The configuration specifying how to enable HTTPS for the - custom domain - using CDN managed certificate or user's own certificate. If not specified, - enabling ssl uses CDN managed certificate by default. Is either a CustomDomainHttpsParameters - type or a IO[bytes] type. Default value is None. - :type custom_domain_https_parameters: ~azure.mgmt.cdn.models.CustomDomainHttpsParameters or - IO[bytes] - :return: An instance of LROPoller that returns either CustomDomain or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.CustomDomain] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - content_type = content_type if custom_domain_https_parameters else None - cls: ClsType[_models.CustomDomain] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._enable_custom_https_initial( - resource_group_name=resource_group_name, - profile_name=profile_name, - endpoint_name=endpoint_name, - custom_domain_name=custom_domain_name, - custom_domain_https_parameters=custom_domain_https_parameters, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CustomDomain", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.CustomDomain].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.CustomDomain]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_edge_nodes_operations.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_edge_nodes_operations.py deleted file mode 100644 index b51f501f4a01..000000000000 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_edge_nodes_operations.py +++ /dev/null @@ -1,154 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from typing import Any, Callable, Optional, TypeVar -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import CdnManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_request(**kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop("template_url", "/providers/Microsoft.Cdn/edgenodes") - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -class EdgeNodesOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.cdn.CdnManagementClient`'s - :attr:`edge_nodes` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: CdnManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list(self, **kwargs: Any) -> ItemPaged["_models.EdgeNode"]: - """Edgenodes are the global Point of Presence (POP) locations used to deliver CDN content to end - users. - - :return: An iterator like instance of either EdgeNode or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cdn.models.EdgeNode] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.EdgenodeResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_request( - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("EdgenodeResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_endpoints_operations.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_endpoints_operations.py deleted file mode 100644 index 633e066879bc..000000000000 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_endpoints_operations.py +++ /dev/null @@ -1,2084 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression,too-many-lines -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.arm_polling import ARMPolling - -from .. import models as _models -from .._configuration import CdnManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_profile_request( - resource_group_name: str, profile_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, profile_name: str, endpoint_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), - "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_request( - resource_group_name: str, profile_name: str, endpoint_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), - "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_update_request( - resource_group_name: str, profile_name: str, endpoint_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), - "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, profile_name: str, endpoint_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), - "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_start_request( - resource_group_name: str, profile_name: str, endpoint_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/start", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), - "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_stop_request( - resource_group_name: str, profile_name: str, endpoint_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/stop", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), - "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_purge_content_request( - resource_group_name: str, profile_name: str, endpoint_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/purge", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), - "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_load_content_request( - resource_group_name: str, profile_name: str, endpoint_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/load", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), - "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_validate_custom_domain_request( - resource_group_name: str, profile_name: str, endpoint_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/validateCustomDomain", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), - "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_list_resource_usage_request( - resource_group_name: str, profile_name: str, endpoint_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/checkResourceUsage", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), - "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -class EndpointsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.cdn.CdnManagementClient`'s - :attr:`endpoints` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: CdnManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_profile( - self, resource_group_name: str, profile_name: str, **kwargs: Any - ) -> ItemPaged["_models.Endpoint"]: - """Lists existing CDN endpoints. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the CDN profile which is unique within the resource group. - Required. - :type profile_name: str - :return: An iterator like instance of either Endpoint or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cdn.models.Endpoint] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.EndpointListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_profile_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("EndpointListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get(self, resource_group_name: str, profile_name: str, endpoint_name: str, **kwargs: Any) -> _models.Endpoint: - """Gets an existing CDN endpoint with the specified endpoint name under the specified - subscription, resource group and profile. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the CDN profile which is unique within the resource group. - Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :return: Endpoint or the result of cls(response) - :rtype: ~azure.mgmt.cdn.models.Endpoint - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.Endpoint] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - endpoint_name=endpoint_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("Endpoint", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - def _create_initial( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - endpoint: Union[_models.Endpoint, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(endpoint, (IOBase, bytes)): - _content = endpoint - else: - _json = self._serialize.body(endpoint, "Endpoint") - - _request = build_create_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - endpoint_name=endpoint_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_create( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - endpoint: _models.Endpoint, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.Endpoint]: - """Creates a new CDN endpoint with the specified endpoint name under the specified subscription, - resource group and profile. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the CDN profile which is unique within the resource group. - Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :param endpoint: Endpoint properties. Required. - :type endpoint: ~azure.mgmt.cdn.models.Endpoint - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either Endpoint or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.Endpoint] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_create( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - endpoint: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.Endpoint]: - """Creates a new CDN endpoint with the specified endpoint name under the specified subscription, - resource group and profile. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the CDN profile which is unique within the resource group. - Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :param endpoint: Endpoint properties. Required. - :type endpoint: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either Endpoint or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.Endpoint] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_create( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - endpoint: Union[_models.Endpoint, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.Endpoint]: - """Creates a new CDN endpoint with the specified endpoint name under the specified subscription, - resource group and profile. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the CDN profile which is unique within the resource group. - Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :param endpoint: Endpoint properties. Is either a Endpoint type or a IO[bytes] type. Required. - :type endpoint: ~azure.mgmt.cdn.models.Endpoint or IO[bytes] - :return: An instance of LROPoller that returns either Endpoint or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.Endpoint] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.Endpoint] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._create_initial( - resource_group_name=resource_group_name, - profile_name=profile_name, - endpoint_name=endpoint_name, - endpoint=endpoint, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("Endpoint", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.Endpoint].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.Endpoint]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _update_initial( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - endpoint_update_properties: Union[_models.EndpointUpdateParameters, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(endpoint_update_properties, (IOBase, bytes)): - _content = endpoint_update_properties - else: - _json = self._serialize.body(endpoint_update_properties, "EndpointUpdateParameters") - - _request = build_update_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - endpoint_name=endpoint_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_update( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - endpoint_update_properties: _models.EndpointUpdateParameters, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.Endpoint]: - """Updates an existing CDN endpoint with the specified endpoint name under the specified - subscription, resource group and profile. Only tags can be updated after creating an endpoint. - To update origins, use the Update Origin operation. To update origin groups, use the Update - Origin group operation. To update custom domains, use the Update Custom Domain operation. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the CDN profile which is unique within the resource group. - Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :param endpoint_update_properties: Endpoint update properties. Required. - :type endpoint_update_properties: ~azure.mgmt.cdn.models.EndpointUpdateParameters - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either Endpoint or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.Endpoint] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_update( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - endpoint_update_properties: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.Endpoint]: - """Updates an existing CDN endpoint with the specified endpoint name under the specified - subscription, resource group and profile. Only tags can be updated after creating an endpoint. - To update origins, use the Update Origin operation. To update origin groups, use the Update - Origin group operation. To update custom domains, use the Update Custom Domain operation. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the CDN profile which is unique within the resource group. - Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :param endpoint_update_properties: Endpoint update properties. Required. - :type endpoint_update_properties: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either Endpoint or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.Endpoint] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_update( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - endpoint_update_properties: Union[_models.EndpointUpdateParameters, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.Endpoint]: - """Updates an existing CDN endpoint with the specified endpoint name under the specified - subscription, resource group and profile. Only tags can be updated after creating an endpoint. - To update origins, use the Update Origin operation. To update origin groups, use the Update - Origin group operation. To update custom domains, use the Update Custom Domain operation. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the CDN profile which is unique within the resource group. - Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :param endpoint_update_properties: Endpoint update properties. Is either a - EndpointUpdateParameters type or a IO[bytes] type. Required. - :type endpoint_update_properties: ~azure.mgmt.cdn.models.EndpointUpdateParameters or IO[bytes] - :return: An instance of LROPoller that returns either Endpoint or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.Endpoint] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.Endpoint] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._update_initial( - resource_group_name=resource_group_name, - profile_name=profile_name, - endpoint_name=endpoint_name, - endpoint_update_properties=endpoint_update_properties, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("Endpoint", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.Endpoint].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.Endpoint]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _delete_initial( - self, resource_group_name: str, profile_name: str, endpoint_name: str, **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - endpoint_name=endpoint_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_delete( - self, resource_group_name: str, profile_name: str, endpoint_name: str, **kwargs: Any - ) -> LROPoller[None]: - """Deletes an existing CDN endpoint with the specified endpoint name under the specified - subscription, resource group and profile. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the CDN profile which is unique within the resource group. - Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - profile_name=profile_name, - endpoint_name=endpoint_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - def _start_initial( - self, resource_group_name: str, profile_name: str, endpoint_name: str, **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_start_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - endpoint_name=endpoint_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_start( - self, resource_group_name: str, profile_name: str, endpoint_name: str, **kwargs: Any - ) -> LROPoller[_models.Endpoint]: - """Starts an existing CDN endpoint that is on a stopped state. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the CDN profile which is unique within the resource group. - Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :return: An instance of LROPoller that returns either Endpoint or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.Endpoint] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.Endpoint] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._start_initial( - resource_group_name=resource_group_name, - profile_name=profile_name, - endpoint_name=endpoint_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("Endpoint", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.Endpoint].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.Endpoint]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _stop_initial( - self, resource_group_name: str, profile_name: str, endpoint_name: str, **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_stop_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - endpoint_name=endpoint_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_stop( - self, resource_group_name: str, profile_name: str, endpoint_name: str, **kwargs: Any - ) -> LROPoller[_models.Endpoint]: - """Stops an existing running CDN endpoint. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the CDN profile which is unique within the resource group. - Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :return: An instance of LROPoller that returns either Endpoint or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.Endpoint] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.Endpoint] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._stop_initial( - resource_group_name=resource_group_name, - profile_name=profile_name, - endpoint_name=endpoint_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("Endpoint", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.Endpoint].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.Endpoint]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _purge_content_initial( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - content_file_paths: Union[_models.PurgeParameters, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(content_file_paths, (IOBase, bytes)): - _content = content_file_paths - else: - _json = self._serialize.body(content_file_paths, "PurgeParameters") - - _request = build_purge_content_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - endpoint_name=endpoint_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_purge_content( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - content_file_paths: _models.PurgeParameters, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[None]: - """Removes a content from CDN. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the CDN profile which is unique within the resource group. - Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :param content_file_paths: The path to the content to be purged. Path can be a full URL, e.g. - '/pictures/city.png' which removes a single file, or a directory with a wildcard, e.g. - '/pictures/*' which removes all folders and files in the directory. Required. - :type content_file_paths: ~azure.mgmt.cdn.models.PurgeParameters - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_purge_content( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - content_file_paths: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[None]: - """Removes a content from CDN. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the CDN profile which is unique within the resource group. - Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :param content_file_paths: The path to the content to be purged. Path can be a full URL, e.g. - '/pictures/city.png' which removes a single file, or a directory with a wildcard, e.g. - '/pictures/*' which removes all folders and files in the directory. Required. - :type content_file_paths: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_purge_content( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - content_file_paths: Union[_models.PurgeParameters, IO[bytes]], - **kwargs: Any - ) -> LROPoller[None]: - """Removes a content from CDN. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the CDN profile which is unique within the resource group. - Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :param content_file_paths: The path to the content to be purged. Path can be a full URL, e.g. - '/pictures/city.png' which removes a single file, or a directory with a wildcard, e.g. - '/pictures/*' which removes all folders and files in the directory. Is either a PurgeParameters - type or a IO[bytes] type. Required. - :type content_file_paths: ~azure.mgmt.cdn.models.PurgeParameters or IO[bytes] - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._purge_content_initial( - resource_group_name=resource_group_name, - profile_name=profile_name, - endpoint_name=endpoint_name, - content_file_paths=content_file_paths, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - def _load_content_initial( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - content_file_paths: Union[_models.LoadParameters, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(content_file_paths, (IOBase, bytes)): - _content = content_file_paths - else: - _json = self._serialize.body(content_file_paths, "LoadParameters") - - _request = build_load_content_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - endpoint_name=endpoint_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_load_content( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - content_file_paths: _models.LoadParameters, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[None]: - """Pre-loads a content to CDN. Available for Verizon Profiles. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the CDN profile which is unique within the resource group. - Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :param content_file_paths: The path to the content to be loaded. Path should be a full URL, - e.g. ‘/pictures/city.png' which loads a single file. Required. - :type content_file_paths: ~azure.mgmt.cdn.models.LoadParameters - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_load_content( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - content_file_paths: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[None]: - """Pre-loads a content to CDN. Available for Verizon Profiles. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the CDN profile which is unique within the resource group. - Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :param content_file_paths: The path to the content to be loaded. Path should be a full URL, - e.g. ‘/pictures/city.png' which loads a single file. Required. - :type content_file_paths: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_load_content( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - content_file_paths: Union[_models.LoadParameters, IO[bytes]], - **kwargs: Any - ) -> LROPoller[None]: - """Pre-loads a content to CDN. Available for Verizon Profiles. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the CDN profile which is unique within the resource group. - Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :param content_file_paths: The path to the content to be loaded. Path should be a full URL, - e.g. ‘/pictures/city.png' which loads a single file. Is either a LoadParameters type or a - IO[bytes] type. Required. - :type content_file_paths: ~azure.mgmt.cdn.models.LoadParameters or IO[bytes] - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._load_content_initial( - resource_group_name=resource_group_name, - profile_name=profile_name, - endpoint_name=endpoint_name, - content_file_paths=content_file_paths, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - @overload - def validate_custom_domain( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - custom_domain_properties: _models.ValidateCustomDomainInput, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ValidateCustomDomainOutput: - """Validates the custom domain mapping to ensure it maps to the correct CDN endpoint in DNS. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the CDN profile which is unique within the resource group. - Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :param custom_domain_properties: Custom domain to be validated. Required. - :type custom_domain_properties: ~azure.mgmt.cdn.models.ValidateCustomDomainInput - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: ValidateCustomDomainOutput or the result of cls(response) - :rtype: ~azure.mgmt.cdn.models.ValidateCustomDomainOutput - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def validate_custom_domain( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - custom_domain_properties: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ValidateCustomDomainOutput: - """Validates the custom domain mapping to ensure it maps to the correct CDN endpoint in DNS. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the CDN profile which is unique within the resource group. - Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :param custom_domain_properties: Custom domain to be validated. Required. - :type custom_domain_properties: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: ValidateCustomDomainOutput or the result of cls(response) - :rtype: ~azure.mgmt.cdn.models.ValidateCustomDomainOutput - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def validate_custom_domain( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - custom_domain_properties: Union[_models.ValidateCustomDomainInput, IO[bytes]], - **kwargs: Any - ) -> _models.ValidateCustomDomainOutput: - """Validates the custom domain mapping to ensure it maps to the correct CDN endpoint in DNS. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the CDN profile which is unique within the resource group. - Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :param custom_domain_properties: Custom domain to be validated. Is either a - ValidateCustomDomainInput type or a IO[bytes] type. Required. - :type custom_domain_properties: ~azure.mgmt.cdn.models.ValidateCustomDomainInput or IO[bytes] - :return: ValidateCustomDomainOutput or the result of cls(response) - :rtype: ~azure.mgmt.cdn.models.ValidateCustomDomainOutput - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ValidateCustomDomainOutput] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(custom_domain_properties, (IOBase, bytes)): - _content = custom_domain_properties - else: - _json = self._serialize.body(custom_domain_properties, "ValidateCustomDomainInput") - - _request = build_validate_custom_domain_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - endpoint_name=endpoint_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("ValidateCustomDomainOutput", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def list_resource_usage( - self, resource_group_name: str, profile_name: str, endpoint_name: str, **kwargs: Any - ) -> ItemPaged["_models.ResourceUsage"]: - """Checks the quota and usage of geo filters and custom domains under the given endpoint. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the CDN profile which is unique within the resource group. - Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :return: An iterator like instance of either ResourceUsage or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cdn.models.ResourceUsage] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ResourceUsageListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_resource_usage_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - endpoint_name=endpoint_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("ResourceUsageListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_log_analytics_operations.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_log_analytics_operations.py deleted file mode 100644 index 1e73981b0831..000000000000 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_log_analytics_operations.py +++ /dev/null @@ -1,844 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -import datetime -from typing import Any, Callable, Optional, TypeVar, Union - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import CdnManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_get_log_analytics_metrics_request( - resource_group_name: str, - profile_name: str, - subscription_id: str, - *, - metrics: List[Union[str, _models.LogMetric]], - date_time_begin: datetime.datetime, - date_time_end: datetime.datetime, - granularity: Union[str, _models.LogMetricsGranularity], - custom_domains: List[str], - protocols: List[str], - group_by: Optional[List[Union[str, _models.LogMetricsGroupBy]]] = None, - continents: Optional[List[str]] = None, - country_or_regions: Optional[List[str]] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/getLogAnalyticsMetrics", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - _params["metrics"] = [_SERIALIZER.query("metrics", q, "str") if q is not None else "" for q in metrics] - _params["dateTimeBegin"] = _SERIALIZER.query("date_time_begin", date_time_begin, "iso-8601") - _params["dateTimeEnd"] = _SERIALIZER.query("date_time_end", date_time_end, "iso-8601") - _params["granularity"] = _SERIALIZER.query("granularity", granularity, "str") - if group_by is not None: - _params["groupBy"] = [_SERIALIZER.query("group_by", q, "str") if q is not None else "" for q in group_by] - if continents is not None: - _params["continents"] = [_SERIALIZER.query("continents", q, "str") if q is not None else "" for q in continents] - if country_or_regions is not None: - _params["countryOrRegions"] = [ - _SERIALIZER.query("country_or_regions", q, "str") if q is not None else "" for q in country_or_regions - ] - _params["customDomains"] = [ - _SERIALIZER.query("custom_domains", q, "str") if q is not None else "" for q in custom_domains - ] - _params["protocols"] = [_SERIALIZER.query("protocols", q, "str") if q is not None else "" for q in protocols] - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_log_analytics_rankings_request( - resource_group_name: str, - profile_name: str, - subscription_id: str, - *, - rankings: List[Union[str, _models.LogRanking]], - metrics: List[Union[str, _models.LogRankingMetric]], - max_ranking: int, - date_time_begin: datetime.datetime, - date_time_end: datetime.datetime, - custom_domains: Optional[List[str]] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/getLogAnalyticsRankings", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - _params["rankings"] = [_SERIALIZER.query("rankings", q, "str") if q is not None else "" for q in rankings] - _params["metrics"] = [_SERIALIZER.query("metrics", q, "str") if q is not None else "" for q in metrics] - _params["maxRanking"] = _SERIALIZER.query("max_ranking", max_ranking, "int") - _params["dateTimeBegin"] = _SERIALIZER.query("date_time_begin", date_time_begin, "iso-8601") - _params["dateTimeEnd"] = _SERIALIZER.query("date_time_end", date_time_end, "iso-8601") - if custom_domains is not None: - _params["customDomains"] = [ - _SERIALIZER.query("custom_domains", q, "str") if q is not None else "" for q in custom_domains - ] - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_log_analytics_locations_request( # pylint: disable=name-too-long - resource_group_name: str, profile_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/getLogAnalyticsLocations", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_log_analytics_resources_request( # pylint: disable=name-too-long - resource_group_name: str, profile_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/getLogAnalyticsResources", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_waf_log_analytics_metrics_request( # pylint: disable=name-too-long - resource_group_name: str, - profile_name: str, - subscription_id: str, - *, - metrics: List[Union[str, _models.WafMetric]], - date_time_begin: datetime.datetime, - date_time_end: datetime.datetime, - granularity: Union[str, _models.WafGranularity], - actions: Optional[List[Union[str, _models.WafAction]]] = None, - group_by: Optional[List[Union[str, _models.WafRankingGroupBy]]] = None, - rule_types: Optional[List[Union[str, _models.WafRuleType]]] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/getWafLogAnalyticsMetrics", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - _params["metrics"] = [_SERIALIZER.query("metrics", q, "str") if q is not None else "" for q in metrics] - _params["dateTimeBegin"] = _SERIALIZER.query("date_time_begin", date_time_begin, "iso-8601") - _params["dateTimeEnd"] = _SERIALIZER.query("date_time_end", date_time_end, "iso-8601") - _params["granularity"] = _SERIALIZER.query("granularity", granularity, "str") - if actions is not None: - _params["actions"] = [_SERIALIZER.query("actions", q, "str") if q is not None else "" for q in actions] - if group_by is not None: - _params["groupBy"] = [_SERIALIZER.query("group_by", q, "str") if q is not None else "" for q in group_by] - if rule_types is not None: - _params["ruleTypes"] = [_SERIALIZER.query("rule_types", q, "str") if q is not None else "" for q in rule_types] - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_waf_log_analytics_rankings_request( # pylint: disable=name-too-long - resource_group_name: str, - profile_name: str, - subscription_id: str, - *, - metrics: List[Union[str, _models.WafMetric]], - date_time_begin: datetime.datetime, - date_time_end: datetime.datetime, - max_ranking: int, - rankings: List[Union[str, _models.WafRankingType]], - actions: Optional[List[Union[str, _models.WafAction]]] = None, - rule_types: Optional[List[Union[str, _models.WafRuleType]]] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/getWafLogAnalyticsRankings", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - _params["metrics"] = [_SERIALIZER.query("metrics", q, "str") if q is not None else "" for q in metrics] - _params["dateTimeBegin"] = _SERIALIZER.query("date_time_begin", date_time_begin, "iso-8601") - _params["dateTimeEnd"] = _SERIALIZER.query("date_time_end", date_time_end, "iso-8601") - _params["maxRanking"] = _SERIALIZER.query("max_ranking", max_ranking, "int") - _params["rankings"] = [_SERIALIZER.query("rankings", q, "str") if q is not None else "" for q in rankings] - if actions is not None: - _params["actions"] = [_SERIALIZER.query("actions", q, "str") if q is not None else "" for q in actions] - if rule_types is not None: - _params["ruleTypes"] = [_SERIALIZER.query("rule_types", q, "str") if q is not None else "" for q in rule_types] - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -class LogAnalyticsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.cdn.CdnManagementClient`'s - :attr:`log_analytics` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: CdnManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def get_log_analytics_metrics( # pylint: disable=too-many-locals - self, - resource_group_name: str, - profile_name: str, - metrics: List[Union[str, _models.LogMetric]], - date_time_begin: datetime.datetime, - date_time_end: datetime.datetime, - granularity: Union[str, _models.LogMetricsGranularity], - custom_domains: List[str], - protocols: List[str], - group_by: Optional[List[Union[str, _models.LogMetricsGroupBy]]] = None, - continents: Optional[List[str]] = None, - country_or_regions: Optional[List[str]] = None, - **kwargs: Any - ) -> _models.MetricsResponse: - """Get log report for AFD profile. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. which is unique within the resource group. Required. - :type profile_name: str - :param metrics: Required. - :type metrics: list[str or ~azure.mgmt.cdn.models.LogMetric] - :param date_time_begin: Required. - :type date_time_begin: ~datetime.datetime - :param date_time_end: Required. - :type date_time_end: ~datetime.datetime - :param granularity: Known values are: "PT5M", "PT1H", and "P1D". Required. - :type granularity: str or ~azure.mgmt.cdn.models.LogMetricsGranularity - :param custom_domains: Required. - :type custom_domains: list[str] - :param protocols: Required. - :type protocols: list[str] - :param group_by: Default value is None. - :type group_by: list[str or ~azure.mgmt.cdn.models.LogMetricsGroupBy] - :param continents: Default value is None. - :type continents: list[str] - :param country_or_regions: Default value is None. - :type country_or_regions: list[str] - :return: MetricsResponse or the result of cls(response) - :rtype: ~azure.mgmt.cdn.models.MetricsResponse - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.MetricsResponse] = kwargs.pop("cls", None) - - _request = build_get_log_analytics_metrics_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - subscription_id=self._config.subscription_id, - metrics=metrics, - date_time_begin=date_time_begin, - date_time_end=date_time_end, - granularity=granularity, - custom_domains=custom_domains, - protocols=protocols, - group_by=group_by, - continents=continents, - country_or_regions=country_or_regions, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("MetricsResponse", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def get_log_analytics_rankings( - self, - resource_group_name: str, - profile_name: str, - rankings: List[Union[str, _models.LogRanking]], - metrics: List[Union[str, _models.LogRankingMetric]], - max_ranking: int, - date_time_begin: datetime.datetime, - date_time_end: datetime.datetime, - custom_domains: Optional[List[str]] = None, - **kwargs: Any - ) -> _models.RankingsResponse: - """Get log analytics ranking report for AFD profile. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. which is unique within the resource group. Required. - :type profile_name: str - :param rankings: Required. - :type rankings: list[str or ~azure.mgmt.cdn.models.LogRanking] - :param metrics: Required. - :type metrics: list[str or ~azure.mgmt.cdn.models.LogRankingMetric] - :param max_ranking: Required. - :type max_ranking: int - :param date_time_begin: Required. - :type date_time_begin: ~datetime.datetime - :param date_time_end: Required. - :type date_time_end: ~datetime.datetime - :param custom_domains: Default value is None. - :type custom_domains: list[str] - :return: RankingsResponse or the result of cls(response) - :rtype: ~azure.mgmt.cdn.models.RankingsResponse - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.RankingsResponse] = kwargs.pop("cls", None) - - _request = build_get_log_analytics_rankings_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - subscription_id=self._config.subscription_id, - rankings=rankings, - metrics=metrics, - max_ranking=max_ranking, - date_time_begin=date_time_begin, - date_time_end=date_time_end, - custom_domains=custom_domains, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("RankingsResponse", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def get_log_analytics_locations( - self, resource_group_name: str, profile_name: str, **kwargs: Any - ) -> _models.ContinentsResponse: - """Get all available location names for AFD log analytics report. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. which is unique within the resource group. Required. - :type profile_name: str - :return: ContinentsResponse or the result of cls(response) - :rtype: ~azure.mgmt.cdn.models.ContinentsResponse - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ContinentsResponse] = kwargs.pop("cls", None) - - _request = build_get_log_analytics_locations_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("ContinentsResponse", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def get_log_analytics_resources( - self, resource_group_name: str, profile_name: str, **kwargs: Any - ) -> _models.ResourcesResponse: - """Get all endpoints and custom domains available for AFD log report. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. which is unique within the resource group. Required. - :type profile_name: str - :return: ResourcesResponse or the result of cls(response) - :rtype: ~azure.mgmt.cdn.models.ResourcesResponse - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ResourcesResponse] = kwargs.pop("cls", None) - - _request = build_get_log_analytics_resources_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("ResourcesResponse", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def get_waf_log_analytics_metrics( - self, - resource_group_name: str, - profile_name: str, - metrics: List[Union[str, _models.WafMetric]], - date_time_begin: datetime.datetime, - date_time_end: datetime.datetime, - granularity: Union[str, _models.WafGranularity], - actions: Optional[List[Union[str, _models.WafAction]]] = None, - group_by: Optional[List[Union[str, _models.WafRankingGroupBy]]] = None, - rule_types: Optional[List[Union[str, _models.WafRuleType]]] = None, - **kwargs: Any - ) -> _models.WafMetricsResponse: - """Get Waf related log analytics report for AFD profile. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. which is unique within the resource group. Required. - :type profile_name: str - :param metrics: Required. - :type metrics: list[str or ~azure.mgmt.cdn.models.WafMetric] - :param date_time_begin: Required. - :type date_time_begin: ~datetime.datetime - :param date_time_end: Required. - :type date_time_end: ~datetime.datetime - :param granularity: Known values are: "PT5M", "PT1H", and "P1D". Required. - :type granularity: str or ~azure.mgmt.cdn.models.WafGranularity - :param actions: Default value is None. - :type actions: list[str or ~azure.mgmt.cdn.models.WafAction] - :param group_by: Default value is None. - :type group_by: list[str or ~azure.mgmt.cdn.models.WafRankingGroupBy] - :param rule_types: Default value is None. - :type rule_types: list[str or ~azure.mgmt.cdn.models.WafRuleType] - :return: WafMetricsResponse or the result of cls(response) - :rtype: ~azure.mgmt.cdn.models.WafMetricsResponse - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.WafMetricsResponse] = kwargs.pop("cls", None) - - _request = build_get_waf_log_analytics_metrics_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - subscription_id=self._config.subscription_id, - metrics=metrics, - date_time_begin=date_time_begin, - date_time_end=date_time_end, - granularity=granularity, - actions=actions, - group_by=group_by, - rule_types=rule_types, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("WafMetricsResponse", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def get_waf_log_analytics_rankings( - self, - resource_group_name: str, - profile_name: str, - metrics: List[Union[str, _models.WafMetric]], - date_time_begin: datetime.datetime, - date_time_end: datetime.datetime, - max_ranking: int, - rankings: List[Union[str, _models.WafRankingType]], - actions: Optional[List[Union[str, _models.WafAction]]] = None, - rule_types: Optional[List[Union[str, _models.WafRuleType]]] = None, - **kwargs: Any - ) -> _models.WafRankingsResponse: - """Get WAF log analytics charts for AFD profile. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium profile - which is unique within the resource group. which is unique within the resource group. Required. - :type profile_name: str - :param metrics: Required. - :type metrics: list[str or ~azure.mgmt.cdn.models.WafMetric] - :param date_time_begin: Required. - :type date_time_begin: ~datetime.datetime - :param date_time_end: Required. - :type date_time_end: ~datetime.datetime - :param max_ranking: Required. - :type max_ranking: int - :param rankings: Required. - :type rankings: list[str or ~azure.mgmt.cdn.models.WafRankingType] - :param actions: Default value is None. - :type actions: list[str or ~azure.mgmt.cdn.models.WafAction] - :param rule_types: Default value is None. - :type rule_types: list[str or ~azure.mgmt.cdn.models.WafRuleType] - :return: WafRankingsResponse or the result of cls(response) - :rtype: ~azure.mgmt.cdn.models.WafRankingsResponse - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.WafRankingsResponse] = kwargs.pop("cls", None) - - _request = build_get_waf_log_analytics_rankings_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - subscription_id=self._config.subscription_id, - metrics=metrics, - date_time_begin=date_time_begin, - date_time_end=date_time_end, - max_ranking=max_ranking, - rankings=rankings, - actions=actions, - rule_types=rule_types, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("WafRankingsResponse", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_managed_rule_sets_operations.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_managed_rule_sets_operations.py deleted file mode 100644 index 4306878a7d08..000000000000 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_managed_rule_sets_operations.py +++ /dev/null @@ -1,163 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from typing import Any, Callable, Optional, TypeVar -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import CdnManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_request(subscription_id: str, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/providers/Microsoft.Cdn/cdnWebApplicationFirewallManagedRuleSets", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -class ManagedRuleSetsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.cdn.CdnManagementClient`'s - :attr:`managed_rule_sets` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: CdnManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list(self, **kwargs: Any) -> ItemPaged["_models.ManagedRuleSetDefinition"]: - """Lists all available managed rule sets. - - :return: An iterator like instance of either ManagedRuleSetDefinition or the result of - cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cdn.models.ManagedRuleSetDefinition] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ManagedRuleSetDefinitionList] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_request( - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("ManagedRuleSetDefinitionList", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_operations.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_operations.py index a94349df33f4..5e2c5edb4480 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_operations.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_operations.py @@ -1,12 +1,16 @@ +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from collections.abc import MutableMapping -from typing import Any, Callable, Optional, TypeVar +import datetime +from io import IOBase +import json +from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core import PipelineClient @@ -16,28 +20,35 @@ ResourceExistsError, ResourceNotFoundError, ResourceNotModifiedError, + StreamClosedError, + StreamConsumedError, map_error, ) from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod from azure.core.rest import HttpRequest, HttpResponse from azure.core.tracing.decorator import distributed_trace from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling from .. import models as _models -from .._configuration import CdnManagementClientConfiguration +from .._configuration import CdnClientConfiguration +from .._utils.model_base import SdkJSONEncoder, _deserialize, _failsafe_deserialize from .._utils.serialization import Deserializer, Serializer +from .._utils.utils import ClientMixinABC T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +JSON = MutableMapping[str, Any] List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False -def build_list_request(**kwargs: Any) -> HttpRequest: +def build_operations_list_request(**kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) @@ -45,7 +56,7 @@ def build_list_request(**kwargs: Any) -> HttpRequest: accept = _headers.pop("Accept", "application/json") # Construct URL - _url = kwargs.pop("template_url", "/providers/Microsoft.Cdn/operations") + _url = "/providers/Microsoft.Cdn/operations" # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -56,38 +67,20944 @@ def build_list_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) +def build_profiles_get_request( + resource_group_name: str, profile_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_profiles_create_request( + resource_group_name: str, profile_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_profiles_update_request( + resource_group_name: str, profile_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_profiles_delete_request( + resource_group_name: str, profile_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) + + +def build_profiles_list_by_resource_group_request( # pylint: disable=name-too-long + resource_group_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_profiles_list_request(subscription_id: str, **kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.Cdn/profiles" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_profiles_migration_commit_request( + resource_group_name: str, profile_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/migrationCommit" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="POST", url=_url, params=_params, **kwargs) + + +def build_profiles_generate_sso_uri_request( + resource_group_name: str, profile_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/generateSsoUri" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_profiles_list_supported_optimization_types_request( # pylint: disable=name-too-long + resource_group_name: str, profile_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/getSupportedOptimizationTypes" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_profiles_list_resource_usage_request( # pylint: disable=name-too-long + resource_group_name: str, profile_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/checkResourceUsage" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_profiles_cdn_can_migrate_to_afd_request( # pylint: disable=name-too-long + resource_group_name: str, profile_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/cdnCanMigrateToAfd" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_profiles_cdn_migrate_to_afd_request( # pylint: disable=name-too-long + resource_group_name: str, profile_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/cdnMigrateToAfd" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_profiles_migration_abort_request( + resource_group_name: str, profile_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/migrationAbort" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="POST", url=_url, params=_params, **kwargs) + + +def build_profiles_can_migrate_request(resource_group_name: str, subscription_id: str, **kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/canMigrate" + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_profiles_migrate_request(resource_group_name: str, subscription_id: str, **kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/migrate" + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_afd_endpoints_get_request( + resource_group_name: str, profile_name: str, endpoint_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints/{endpointName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), + "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_afd_endpoints_create_request( + resource_group_name: str, profile_name: str, endpoint_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints/{endpointName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), + "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_afd_endpoints_update_request( + resource_group_name: str, profile_name: str, endpoint_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints/{endpointName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), + "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_afd_endpoints_delete_request( + resource_group_name: str, profile_name: str, endpoint_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints/{endpointName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), + "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) + + +def build_afd_endpoints_list_by_profile_request( # pylint: disable=name-too-long + resource_group_name: str, profile_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_afd_endpoints_purge_content_request( # pylint: disable=name-too-long + resource_group_name: str, profile_name: str, endpoint_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints/{endpointName}/purge" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), + "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_afd_endpoints_list_resource_usage_request( # pylint: disable=name-too-long + resource_group_name: str, profile_name: str, endpoint_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints/{endpointName}/usages" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), + "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_afd_endpoints_validate_custom_domain_request( # pylint: disable=name-too-long + resource_group_name: str, profile_name: str, endpoint_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints/{endpointName}/validateCustomDomain" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), + "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_afd_origin_groups_get_request( + resource_group_name: str, profile_name: str, origin_group_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/originGroups/{originGroupName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), + "originGroupName": _SERIALIZER.url("origin_group_name", origin_group_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_afd_origin_groups_create_request( + resource_group_name: str, profile_name: str, origin_group_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/originGroups/{originGroupName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), + "originGroupName": _SERIALIZER.url("origin_group_name", origin_group_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_afd_origin_groups_update_request( + resource_group_name: str, profile_name: str, origin_group_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/originGroups/{originGroupName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), + "originGroupName": _SERIALIZER.url("origin_group_name", origin_group_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_afd_origin_groups_delete_request( + resource_group_name: str, profile_name: str, origin_group_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/originGroups/{originGroupName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), + "originGroupName": _SERIALIZER.url("origin_group_name", origin_group_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) + + +def build_afd_origin_groups_list_by_profile_request( # pylint: disable=name-too-long + resource_group_name: str, profile_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/originGroups" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_afd_origin_groups_list_resource_usage_request( # pylint: disable=name-too-long + resource_group_name: str, profile_name: str, origin_group_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/originGroups/{originGroupName}/usages" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), + "originGroupName": _SERIALIZER.url("origin_group_name", origin_group_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_afd_origins_get_request( + resource_group_name: str, + profile_name: str, + origin_group_name: str, + origin_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/originGroups/{originGroupName}/origins/{originName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), + "originGroupName": _SERIALIZER.url("origin_group_name", origin_group_name, "str"), + "originName": _SERIALIZER.url("origin_name", origin_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_afd_origins_create_request( + resource_group_name: str, + profile_name: str, + origin_group_name: str, + origin_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/originGroups/{originGroupName}/origins/{originName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), + "originGroupName": _SERIALIZER.url("origin_group_name", origin_group_name, "str"), + "originName": _SERIALIZER.url("origin_name", origin_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_afd_origins_update_request( + resource_group_name: str, + profile_name: str, + origin_group_name: str, + origin_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/originGroups/{originGroupName}/origins/{originName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), + "originGroupName": _SERIALIZER.url("origin_group_name", origin_group_name, "str"), + "originName": _SERIALIZER.url("origin_name", origin_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_afd_origins_delete_request( + resource_group_name: str, + profile_name: str, + origin_group_name: str, + origin_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/originGroups/{originGroupName}/origins/{originName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), + "originGroupName": _SERIALIZER.url("origin_group_name", origin_group_name, "str"), + "originName": _SERIALIZER.url("origin_name", origin_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) + + +def build_afd_origins_list_by_origin_group_request( # pylint: disable=name-too-long + resource_group_name: str, profile_name: str, origin_group_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/originGroups/{originGroupName}/origins" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), + "originGroupName": _SERIALIZER.url("origin_group_name", origin_group_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_routes_get_request( + resource_group_name: str, + profile_name: str, + endpoint_name: str, + route_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints/{endpointName}/routes/{routeName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), + "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, "str"), + "routeName": _SERIALIZER.url("route_name", route_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_routes_create_request( + resource_group_name: str, + profile_name: str, + endpoint_name: str, + route_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints/{endpointName}/routes/{routeName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), + "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, "str"), + "routeName": _SERIALIZER.url("route_name", route_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_routes_update_request( + resource_group_name: str, + profile_name: str, + endpoint_name: str, + route_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints/{endpointName}/routes/{routeName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), + "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, "str"), + "routeName": _SERIALIZER.url("route_name", route_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_routes_delete_request( + resource_group_name: str, + profile_name: str, + endpoint_name: str, + route_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints/{endpointName}/routes/{routeName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), + "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, "str"), + "routeName": _SERIALIZER.url("route_name", route_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) + + +def build_routes_list_by_endpoint_request( + resource_group_name: str, profile_name: str, endpoint_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints/{endpointName}/routes" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), + "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_rule_sets_get_request( + resource_group_name: str, profile_name: str, rule_set_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/ruleSets/{ruleSetName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), + "ruleSetName": _SERIALIZER.url("rule_set_name", rule_set_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_rule_sets_create_request( + resource_group_name: str, profile_name: str, rule_set_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/ruleSets/{ruleSetName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), + "ruleSetName": _SERIALIZER.url("rule_set_name", rule_set_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_rule_sets_delete_request( + resource_group_name: str, profile_name: str, rule_set_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/ruleSets/{ruleSetName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), + "ruleSetName": _SERIALIZER.url("rule_set_name", rule_set_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) + + +def build_rule_sets_list_by_profile_request( + resource_group_name: str, profile_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/ruleSets" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_rule_sets_list_resource_usage_request( # pylint: disable=name-too-long + resource_group_name: str, profile_name: str, rule_set_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/ruleSets/{ruleSetName}/usages" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), + "ruleSetName": _SERIALIZER.url("rule_set_name", rule_set_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_rules_get_request( + resource_group_name: str, profile_name: str, rule_set_name: str, rule_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/ruleSets/{ruleSetName}/rules/{ruleName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), + "ruleSetName": _SERIALIZER.url("rule_set_name", rule_set_name, "str"), + "ruleName": _SERIALIZER.url("rule_name", rule_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_rules_create_request( + resource_group_name: str, profile_name: str, rule_set_name: str, rule_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/ruleSets/{ruleSetName}/rules/{ruleName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), + "ruleSetName": _SERIALIZER.url("rule_set_name", rule_set_name, "str"), + "ruleName": _SERIALIZER.url("rule_name", rule_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_rules_update_request( + resource_group_name: str, profile_name: str, rule_set_name: str, rule_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/ruleSets/{ruleSetName}/rules/{ruleName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), + "ruleSetName": _SERIALIZER.url("rule_set_name", rule_set_name, "str"), + "ruleName": _SERIALIZER.url("rule_name", rule_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_rules_delete_request( + resource_group_name: str, profile_name: str, rule_set_name: str, rule_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/ruleSets/{ruleSetName}/rules/{ruleName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), + "ruleSetName": _SERIALIZER.url("rule_set_name", rule_set_name, "str"), + "ruleName": _SERIALIZER.url("rule_name", rule_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) + + +def build_rules_list_by_rule_set_request( + resource_group_name: str, profile_name: str, rule_set_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/ruleSets/{ruleSetName}/rules" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), + "ruleSetName": _SERIALIZER.url("rule_set_name", rule_set_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_security_policies_get_request( + resource_group_name: str, profile_name: str, security_policy_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/securityPolicies/{securityPolicyName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), + "securityPolicyName": _SERIALIZER.url("security_policy_name", security_policy_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_security_policies_create_request( + resource_group_name: str, profile_name: str, security_policy_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/securityPolicies/{securityPolicyName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), + "securityPolicyName": _SERIALIZER.url("security_policy_name", security_policy_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_security_policies_patch_request( + resource_group_name: str, profile_name: str, security_policy_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/securityPolicies/{securityPolicyName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), + "securityPolicyName": _SERIALIZER.url("security_policy_name", security_policy_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_security_policies_delete_request( + resource_group_name: str, profile_name: str, security_policy_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/securityPolicies/{securityPolicyName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), + "securityPolicyName": _SERIALIZER.url("security_policy_name", security_policy_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) + + +def build_security_policies_list_by_profile_request( # pylint: disable=name-too-long + resource_group_name: str, profile_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/securityPolicies" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_secrets_get_request( + resource_group_name: str, profile_name: str, secret_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/secrets/{secretName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), + "secretName": _SERIALIZER.url("secret_name", secret_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_secrets_create_request( + resource_group_name: str, profile_name: str, secret_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/secrets/{secretName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), + "secretName": _SERIALIZER.url("secret_name", secret_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_secrets_delete_request( + resource_group_name: str, profile_name: str, secret_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/secrets/{secretName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), + "secretName": _SERIALIZER.url("secret_name", secret_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) + + +def build_secrets_list_by_profile_request( + resource_group_name: str, profile_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/secrets" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_endpoints_get_request( + resource_group_name: str, profile_name: str, endpoint_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), + "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_endpoints_create_request( + resource_group_name: str, profile_name: str, endpoint_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), + "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_endpoints_update_request( + resource_group_name: str, profile_name: str, endpoint_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), + "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_endpoints_delete_request( + resource_group_name: str, profile_name: str, endpoint_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), + "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) + + +def build_endpoints_list_by_profile_request( + resource_group_name: str, profile_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_endpoints_start_request( + resource_group_name: str, profile_name: str, endpoint_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/start" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), + "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_endpoints_stop_request( + resource_group_name: str, profile_name: str, endpoint_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/stop" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), + "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_endpoints_purge_content_request( + resource_group_name: str, profile_name: str, endpoint_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/purge" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), + "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_endpoints_load_content_request( + resource_group_name: str, profile_name: str, endpoint_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/load" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), + "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_endpoints_validate_custom_domain_request( # pylint: disable=name-too-long + resource_group_name: str, profile_name: str, endpoint_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/validateCustomDomain" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), + "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_endpoints_list_resource_usage_request( # pylint: disable=name-too-long + resource_group_name: str, profile_name: str, endpoint_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/checkResourceUsage" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), + "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_origins_get_request( + resource_group_name: str, + profile_name: str, + endpoint_name: str, + origin_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/origins/{originName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), + "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, "str"), + "originName": _SERIALIZER.url("origin_name", origin_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_origins_create_request( + resource_group_name: str, + profile_name: str, + endpoint_name: str, + origin_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/origins/{originName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), + "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, "str"), + "originName": _SERIALIZER.url("origin_name", origin_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_origins_update_request( + resource_group_name: str, + profile_name: str, + endpoint_name: str, + origin_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/origins/{originName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), + "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, "str"), + "originName": _SERIALIZER.url("origin_name", origin_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_origins_delete_request( + resource_group_name: str, + profile_name: str, + endpoint_name: str, + origin_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/origins/{originName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), + "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, "str"), + "originName": _SERIALIZER.url("origin_name", origin_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) + + +def build_origins_list_by_endpoint_request( + resource_group_name: str, profile_name: str, endpoint_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/origins" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), + "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_origin_groups_get_request( + resource_group_name: str, + profile_name: str, + endpoint_name: str, + origin_group_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/originGroups/{originGroupName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), + "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, "str"), + "originGroupName": _SERIALIZER.url("origin_group_name", origin_group_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_origin_groups_create_request( + resource_group_name: str, + profile_name: str, + endpoint_name: str, + origin_group_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/originGroups/{originGroupName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), + "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, "str"), + "originGroupName": _SERIALIZER.url("origin_group_name", origin_group_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_origin_groups_update_request( + resource_group_name: str, + profile_name: str, + endpoint_name: str, + origin_group_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/originGroups/{originGroupName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), + "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, "str"), + "originGroupName": _SERIALIZER.url("origin_group_name", origin_group_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_origin_groups_delete_request( + resource_group_name: str, + profile_name: str, + endpoint_name: str, + origin_group_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/originGroups/{originGroupName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), + "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, "str"), + "originGroupName": _SERIALIZER.url("origin_group_name", origin_group_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) + + +def build_origin_groups_list_by_endpoint_request( # pylint: disable=name-too-long + resource_group_name: str, profile_name: str, endpoint_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/originGroups" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), + "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_custom_domains_get_request( + resource_group_name: str, + profile_name: str, + endpoint_name: str, + custom_domain_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/customDomains/{customDomainName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), + "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, "str"), + "customDomainName": _SERIALIZER.url("custom_domain_name", custom_domain_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_custom_domains_create_request( + resource_group_name: str, + profile_name: str, + endpoint_name: str, + custom_domain_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/customDomains/{customDomainName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), + "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, "str"), + "customDomainName": _SERIALIZER.url("custom_domain_name", custom_domain_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_custom_domains_delete_request( + resource_group_name: str, + profile_name: str, + endpoint_name: str, + custom_domain_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/customDomains/{customDomainName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), + "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, "str"), + "customDomainName": _SERIALIZER.url("custom_domain_name", custom_domain_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_custom_domains_list_by_endpoint_request( # pylint: disable=name-too-long + resource_group_name: str, profile_name: str, endpoint_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/customDomains" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), + "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_custom_domains_disable_custom_https_request( # pylint: disable=name-too-long + resource_group_name: str, + profile_name: str, + endpoint_name: str, + custom_domain_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/customDomains/{customDomainName}/disableCustomHttps" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), + "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, "str"), + "customDomainName": _SERIALIZER.url("custom_domain_name", custom_domain_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_custom_domains_enable_custom_https_request( # pylint: disable=name-too-long + resource_group_name: str, + profile_name: str, + endpoint_name: str, + custom_domain_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/customDomains/{customDomainName}/enableCustomHttps" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), + "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, "str"), + "customDomainName": _SERIALIZER.url("custom_domain_name", custom_domain_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_afd_custom_domains_get_request( + resource_group_name: str, profile_name: str, custom_domain_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/customDomains/{customDomainName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), + "customDomainName": _SERIALIZER.url("custom_domain_name", custom_domain_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_afd_custom_domains_create_request( + resource_group_name: str, profile_name: str, custom_domain_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/customDomains/{customDomainName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), + "customDomainName": _SERIALIZER.url("custom_domain_name", custom_domain_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_afd_custom_domains_update_request( + resource_group_name: str, profile_name: str, custom_domain_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/customDomains/{customDomainName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), + "customDomainName": _SERIALIZER.url("custom_domain_name", custom_domain_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_afd_custom_domains_delete_request( + resource_group_name: str, profile_name: str, custom_domain_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/customDomains/{customDomainName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), + "customDomainName": _SERIALIZER.url("custom_domain_name", custom_domain_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) + + +def build_afd_custom_domains_list_by_profile_request( # pylint: disable=name-too-long + resource_group_name: str, profile_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/customDomains" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_afd_custom_domains_refresh_validation_token_request( # pylint: disable=name-too-long + resource_group_name: str, profile_name: str, custom_domain_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/customDomains/{customDomainName}/refreshValidationToken" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), + "customDomainName": _SERIALIZER.url("custom_domain_name", custom_domain_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="POST", url=_url, params=_params, **kwargs) + + +def build_afd_profiles_check_endpoint_name_availability_request( # pylint: disable=name-too-long + resource_group_name: str, profile_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/checkEndpointNameAvailability" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_afd_profiles_list_resource_usage_request( # pylint: disable=name-too-long + resource_group_name: str, profile_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/usages" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_afd_profiles_check_host_name_availability_request( # pylint: disable=name-too-long + resource_group_name: str, profile_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/checkHostNameAvailability" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_afd_profiles_validate_secret_request( # pylint: disable=name-too-long + resource_group_name: str, profile_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/validateSecret" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_afd_profiles_upgrade_request( + resource_group_name: str, profile_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/upgrade" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_log_analytics_get_log_analytics_metrics_request( # pylint: disable=name-too-long + resource_group_name: str, + profile_name: str, + subscription_id: str, + *, + metrics: List[Union[str, _models.LogMetric]], + date_time_begin: datetime.datetime, + date_time_end: datetime.datetime, + granularity: Union[str, _models.LogMetricsGranularity], + custom_domains: List[str], + protocols: List[str], + group_by: Optional[List[Union[str, _models.LogMetricsGroupBy]]] = None, + continents: Optional[List[str]] = None, + country_or_regions: Optional[List[str]] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/getLogAnalyticsMetrics" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + _params["metrics"] = [_SERIALIZER.query("metrics", q, "str") if q is not None else "" for q in metrics] + _params["dateTimeBegin"] = _SERIALIZER.query("date_time_begin", date_time_begin, "iso-8601") + _params["dateTimeEnd"] = _SERIALIZER.query("date_time_end", date_time_end, "iso-8601") + _params["granularity"] = _SERIALIZER.query("granularity", granularity, "str") + if group_by is not None: + _params["groupBy"] = [_SERIALIZER.query("group_by", q, "str") if q is not None else "" for q in group_by] + if continents is not None: + _params["continents"] = [_SERIALIZER.query("continents", q, "str") if q is not None else "" for q in continents] + if country_or_regions is not None: + _params["countryOrRegions"] = [ + _SERIALIZER.query("country_or_regions", q, "str") if q is not None else "" for q in country_or_regions + ] + _params["customDomains"] = [ + _SERIALIZER.query("custom_domains", q, "str") if q is not None else "" for q in custom_domains + ] + _params["protocols"] = [_SERIALIZER.query("protocols", q, "str") if q is not None else "" for q in protocols] + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_log_analytics_get_log_analytics_rankings_request( # pylint: disable=name-too-long + resource_group_name: str, + profile_name: str, + subscription_id: str, + *, + rankings: List[Union[str, _models.LogRanking]], + metrics: List[Union[str, _models.LogRankingMetric]], + max_ranking: int, + date_time_begin: datetime.datetime, + date_time_end: datetime.datetime, + custom_domains: Optional[List[str]] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/getLogAnalyticsRankings" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + _params["rankings"] = [_SERIALIZER.query("rankings", q, "str") if q is not None else "" for q in rankings] + _params["metrics"] = [_SERIALIZER.query("metrics", q, "str") if q is not None else "" for q in metrics] + _params["maxRanking"] = _SERIALIZER.query("max_ranking", max_ranking, "int") + _params["dateTimeBegin"] = _SERIALIZER.query("date_time_begin", date_time_begin, "iso-8601") + _params["dateTimeEnd"] = _SERIALIZER.query("date_time_end", date_time_end, "iso-8601") + if custom_domains is not None: + _params["customDomains"] = [ + _SERIALIZER.query("custom_domains", q, "str") if q is not None else "" for q in custom_domains + ] + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_log_analytics_get_log_analytics_locations_request( # pylint: disable=name-too-long + resource_group_name: str, profile_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/getLogAnalyticsLocations" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_log_analytics_get_log_analytics_resources_request( # pylint: disable=name-too-long + resource_group_name: str, profile_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/getLogAnalyticsResources" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_log_analytics_get_waf_log_analytics_metrics_request( # pylint: disable=name-too-long + resource_group_name: str, + profile_name: str, + subscription_id: str, + *, + metrics: List[Union[str, _models.WafMetric]], + date_time_begin: datetime.datetime, + date_time_end: datetime.datetime, + granularity: Union[str, _models.WafGranularity], + actions: Optional[List[Union[str, _models.WafAction]]] = None, + group_by: Optional[List[Union[str, _models.WafRankingGroupBy]]] = None, + rule_types: Optional[List[Union[str, _models.WafRuleType]]] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/getWafLogAnalyticsMetrics" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + _params["metrics"] = [_SERIALIZER.query("metrics", q, "str") if q is not None else "" for q in metrics] + _params["dateTimeBegin"] = _SERIALIZER.query("date_time_begin", date_time_begin, "iso-8601") + _params["dateTimeEnd"] = _SERIALIZER.query("date_time_end", date_time_end, "iso-8601") + _params["granularity"] = _SERIALIZER.query("granularity", granularity, "str") + if actions is not None: + _params["actions"] = [_SERIALIZER.query("actions", q, "str") if q is not None else "" for q in actions] + if group_by is not None: + _params["groupBy"] = [_SERIALIZER.query("group_by", q, "str") if q is not None else "" for q in group_by] + if rule_types is not None: + _params["ruleTypes"] = [_SERIALIZER.query("rule_types", q, "str") if q is not None else "" for q in rule_types] + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_log_analytics_get_waf_log_analytics_rankings_request( # pylint: disable=name-too-long + resource_group_name: str, + profile_name: str, + subscription_id: str, + *, + metrics: List[Union[str, _models.WafMetric]], + date_time_begin: datetime.datetime, + date_time_end: datetime.datetime, + max_ranking: int, + rankings: List[Union[str, _models.WafRankingType]], + actions: Optional[List[Union[str, _models.WafAction]]] = None, + rule_types: Optional[List[Union[str, _models.WafRuleType]]] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/getWafLogAnalyticsRankings" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + _params["metrics"] = [_SERIALIZER.query("metrics", q, "str") if q is not None else "" for q in metrics] + _params["dateTimeBegin"] = _SERIALIZER.query("date_time_begin", date_time_begin, "iso-8601") + _params["dateTimeEnd"] = _SERIALIZER.query("date_time_end", date_time_end, "iso-8601") + _params["maxRanking"] = _SERIALIZER.query("max_ranking", max_ranking, "int") + _params["rankings"] = [_SERIALIZER.query("rankings", q, "str") if q is not None else "" for q in rankings] + if actions is not None: + _params["actions"] = [_SERIALIZER.query("actions", q, "str") if q is not None else "" for q in actions] + if rule_types is not None: + _params["ruleTypes"] = [_SERIALIZER.query("rule_types", q, "str") if q is not None else "" for q in rule_types] + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_policies_get_request( + resource_group_name: str, policy_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/cdnWebApplicationFirewallPolicies/{policyName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "policyName": _SERIALIZER.url("policy_name", policy_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_policies_create_or_update_request( + resource_group_name: str, policy_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/cdnWebApplicationFirewallPolicies/{policyName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "policyName": _SERIALIZER.url("policy_name", policy_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_policies_update_request( + resource_group_name: str, policy_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/cdnWebApplicationFirewallPolicies/{policyName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "policyName": _SERIALIZER.url("policy_name", policy_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_policies_delete_request( + resource_group_name: str, policy_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/cdnWebApplicationFirewallPolicies/{policyName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "policyName": _SERIALIZER.url("policy_name", policy_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) + + +def build_policies_list_request(resource_group_name: str, subscription_id: str, **kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/cdnWebApplicationFirewallPolicies" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_resource_usage_list_request(subscription_id: str, **kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.Cdn/checkResourceUsage" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_edge_nodes_list_request(**kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/providers/Microsoft.Cdn/edgenodes" + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_managed_rule_sets_list_request(subscription_id: str, **kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.Cdn/cdnWebApplicationFirewallManagedRuleSets" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_cdn_check_endpoint_name_availability_request( # pylint: disable=name-too-long + resource_group_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/checkEndpointNameAvailability" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_cdn_check_name_availability_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/providers/Microsoft.Cdn/checkNameAvailability" + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_cdn_check_name_availability_with_subscription_request( # pylint: disable=name-too-long + subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.Cdn/checkNameAvailability" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_cdn_validate_probe_request(subscription_id: str, **kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.Cdn/validateProbe" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + class Operations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~azure.mgmt.cdn.CdnManagementClient`'s - :attr:`operations` attribute. + :class:`~azure.mgmt.cdn.CdnClient`'s + :attr:`operations` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CdnClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list(self, **kwargs: Any) -> ItemPaged["_models.Operation"]: + """List the operations for the provider. + + :return: An iterator like instance of Operation + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cdn.models.Operation] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.Operation]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_operations_list_request( + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.Operation], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class ProfilesOperations: # pylint: disable=too-many-public-methods + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.cdn.CdnClient`'s + :attr:`profiles` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CdnClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get(self, resource_group_name: str, profile_name: str, **kwargs: Any) -> _models.Profile: + """Gets an Azure Front Door Standard or Azure Front Door Premium or CDN profile with the specified + profile name under the specified subscription and resource group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :return: Profile. The Profile is compatible with MutableMapping + :rtype: ~azure.mgmt.cdn.models.Profile + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.Profile] = kwargs.pop("cls", None) + + _request = build_profiles_get_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.Profile, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + def _create_initial( + self, + resource_group_name: str, + profile_name: str, + profile: Union[_models.Profile, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(profile, (IOBase, bytes)): + _content = profile + else: + _content = json.dumps(profile, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_profiles_create_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 201: + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_create( + self, + resource_group_name: str, + profile_name: str, + profile: _models.Profile, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.Profile]: + """Creates a new Azure Front Door Standard or Azure Front Door Premium or CDN profile with a + profile name under the specified subscription and resource group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param profile: Profile properties needed to create a new profile. Required. + :type profile: ~azure.mgmt.cdn.models.Profile + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns Profile. The Profile is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.Profile] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create( + self, + resource_group_name: str, + profile_name: str, + profile: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.Profile]: + """Creates a new Azure Front Door Standard or Azure Front Door Premium or CDN profile with a + profile name under the specified subscription and resource group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param profile: Profile properties needed to create a new profile. Required. + :type profile: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns Profile. The Profile is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.Profile] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create( + self, + resource_group_name: str, + profile_name: str, + profile: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.Profile]: + """Creates a new Azure Front Door Standard or Azure Front Door Premium or CDN profile with a + profile name under the specified subscription and resource group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param profile: Profile properties needed to create a new profile. Required. + :type profile: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns Profile. The Profile is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.Profile] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_create( + self, + resource_group_name: str, + profile_name: str, + profile: Union[_models.Profile, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.Profile]: + """Creates a new Azure Front Door Standard or Azure Front Door Premium or CDN profile with a + profile name under the specified subscription and resource group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param profile: Profile properties needed to create a new profile. Is one of the following + types: Profile, JSON, IO[bytes] Required. + :type profile: ~azure.mgmt.cdn.models.Profile or JSON or IO[bytes] + :return: An instance of LROPoller that returns Profile. The Profile is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.Profile] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.Profile] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._create_initial( + resource_group_name=resource_group_name, + profile_name=profile_name, + profile=profile, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.Profile, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.Profile].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.Profile]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _update_initial( + self, + resource_group_name: str, + profile_name: str, + profile_update_parameters: Union[_models.ProfileUpdateParameters, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(profile_update_parameters, (IOBase, bytes)): + _content = profile_update_parameters + else: + _content = json.dumps(profile_update_parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_profiles_update_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_update( + self, + resource_group_name: str, + profile_name: str, + profile_update_parameters: _models.ProfileUpdateParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.Profile]: + """Updates an existing Azure Front Door Standard or Azure Front Door Premium or CDN profile with + the specified profile name under the specified subscription and resource group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param profile_update_parameters: Profile properties needed to update an existing profile. + Required. + :type profile_update_parameters: ~azure.mgmt.cdn.models.ProfileUpdateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns Profile. The Profile is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.Profile] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update( + self, + resource_group_name: str, + profile_name: str, + profile_update_parameters: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.Profile]: + """Updates an existing Azure Front Door Standard or Azure Front Door Premium or CDN profile with + the specified profile name under the specified subscription and resource group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param profile_update_parameters: Profile properties needed to update an existing profile. + Required. + :type profile_update_parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns Profile. The Profile is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.Profile] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update( + self, + resource_group_name: str, + profile_name: str, + profile_update_parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.Profile]: + """Updates an existing Azure Front Door Standard or Azure Front Door Premium or CDN profile with + the specified profile name under the specified subscription and resource group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param profile_update_parameters: Profile properties needed to update an existing profile. + Required. + :type profile_update_parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns Profile. The Profile is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.Profile] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_update( + self, + resource_group_name: str, + profile_name: str, + profile_update_parameters: Union[_models.ProfileUpdateParameters, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.Profile]: + """Updates an existing Azure Front Door Standard or Azure Front Door Premium or CDN profile with + the specified profile name under the specified subscription and resource group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param profile_update_parameters: Profile properties needed to update an existing profile. Is + one of the following types: ProfileUpdateParameters, JSON, IO[bytes] Required. + :type profile_update_parameters: ~azure.mgmt.cdn.models.ProfileUpdateParameters or JSON or + IO[bytes] + :return: An instance of LROPoller that returns Profile. The Profile is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.Profile] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.Profile] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._update_initial( + resource_group_name=resource_group_name, + profile_name=profile_name, + profile_update_parameters=profile_update_parameters, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.Profile, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.Profile].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.Profile]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _delete_initial(self, resource_group_name: str, profile_name: str, **kwargs: Any) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_profiles_delete_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_delete(self, resource_group_name: str, profile_name: str, **kwargs: Any) -> LROPoller[None]: + """Deletes an existing Azure Front Door Standard or Azure Front Door Premium or CDN profile with + the specified parameters. Deleting a profile will result in the deletion of all of the + sub-resources including endpoints, origins and custom domains. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + profile_name=profile_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> ItemPaged["_models.Profile"]: + """Lists all of the Azure Front Door Standard, Azure Front Door Premium, and CDN profiles within a + resource group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: An iterator like instance of Profile + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cdn.models.Profile] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.Profile]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_profiles_list_by_resource_group_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.Profile], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @distributed_trace + def list(self, **kwargs: Any) -> ItemPaged["_models.Profile"]: + """Lists all of the Azure Front Door Standard, Azure Front Door Premium, and CDN profiles within + an Azure subscription. + + :return: An iterator like instance of Profile + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cdn.models.Profile] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.Profile]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_profiles_list_request( + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.Profile], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + def _migration_commit_initial(self, resource_group_name: str, profile_name: str, **kwargs: Any) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_profiles_migration_commit_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_migration_commit(self, resource_group_name: str, profile_name: str, **kwargs: Any) -> LROPoller[None]: + """Commit the migrated Azure Frontdoor(Standard/Premium) profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._migration_commit_initial( + resource_group_name=resource_group_name, + profile_name=profile_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def generate_sso_uri(self, resource_group_name: str, profile_name: str, **kwargs: Any) -> _models.SsoUri: + """Generates a dynamic SSO URI used to sign in to the CDN supplemental portal. Supplemental portal + is used to configure advanced feature capabilities that are not yet available in the Azure + portal, such as core reports in a standard profile; rules engine, advanced HTTP reports, and + real-time stats and alerts in a premium profile. The SSO URI changes approximately every 10 + minutes. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :return: SsoUri. The SsoUri is compatible with MutableMapping + :rtype: ~azure.mgmt.cdn.models.SsoUri + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.SsoUri] = kwargs.pop("cls", None) + + _request = build_profiles_generate_sso_uri_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.SsoUri, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def list_supported_optimization_types( + self, resource_group_name: str, profile_name: str, **kwargs: Any + ) -> _models.SupportedOptimizationTypesListResult: + """Gets the supported optimization types for the current profile. A user can create an endpoint + with an optimization type from the listed values. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :return: SupportedOptimizationTypesListResult. The SupportedOptimizationTypesListResult is + compatible with MutableMapping + :rtype: ~azure.mgmt.cdn.models.SupportedOptimizationTypesListResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.SupportedOptimizationTypesListResult] = kwargs.pop("cls", None) + + _request = build_profiles_list_supported_optimization_types_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.SupportedOptimizationTypesListResult, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def list_resource_usage( + self, resource_group_name: str, profile_name: str, **kwargs: Any + ) -> ItemPaged["_models.ResourceUsage"]: + """Checks the quota and actual usage of endpoints under the given Azure Front Door Standard or + Azure Front Door Premium or CDN profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :return: An iterator like instance of ResourceUsage + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cdn.models.ResourceUsage] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.ResourceUsage]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_profiles_list_resource_usage_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.ResourceUsage], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + def _cdn_can_migrate_to_afd_initial( + self, resource_group_name: str, profile_name: str, **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_profiles_cdn_can_migrate_to_afd_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_cdn_can_migrate_to_afd( + self, resource_group_name: str, profile_name: str, **kwargs: Any + ) -> LROPoller[_models.CanMigrateResult]: + """Checks if CDN profile can be migrated to Azure Frontdoor(Standard/Premium) profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :return: An instance of LROPoller that returns CanMigrateResult. The CanMigrateResult is + compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.CanMigrateResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.CanMigrateResult] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._cdn_can_migrate_to_afd_initial( + resource_group_name=resource_group_name, + profile_name=profile_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.CanMigrateResult, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.CanMigrateResult].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.CanMigrateResult]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _cdn_migrate_to_afd_initial( + self, + resource_group_name: str, + profile_name: str, + migration_parameters: Union[_models.CdnMigrationToAfdParameters, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(migration_parameters, (IOBase, bytes)): + _content = migration_parameters + else: + _content = json.dumps(migration_parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_profiles_cdn_migrate_to_afd_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_cdn_migrate_to_afd( + self, + resource_group_name: str, + profile_name: str, + migration_parameters: _models.CdnMigrationToAfdParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.MigrateResult]: + """Migrate the CDN profile to Azure Frontdoor(Standard/Premium) profile. This step prepares the + profile for migration and will be followed by Commit to finalize the migration. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param migration_parameters: Properties needed to migrate the profile. Required. + :type migration_parameters: ~azure.mgmt.cdn.models.CdnMigrationToAfdParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns MigrateResult. The MigrateResult is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.MigrateResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_cdn_migrate_to_afd( + self, + resource_group_name: str, + profile_name: str, + migration_parameters: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.MigrateResult]: + """Migrate the CDN profile to Azure Frontdoor(Standard/Premium) profile. This step prepares the + profile for migration and will be followed by Commit to finalize the migration. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param migration_parameters: Properties needed to migrate the profile. Required. + :type migration_parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns MigrateResult. The MigrateResult is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.MigrateResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_cdn_migrate_to_afd( + self, + resource_group_name: str, + profile_name: str, + migration_parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.MigrateResult]: + """Migrate the CDN profile to Azure Frontdoor(Standard/Premium) profile. This step prepares the + profile for migration and will be followed by Commit to finalize the migration. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param migration_parameters: Properties needed to migrate the profile. Required. + :type migration_parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns MigrateResult. The MigrateResult is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.MigrateResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_cdn_migrate_to_afd( + self, + resource_group_name: str, + profile_name: str, + migration_parameters: Union[_models.CdnMigrationToAfdParameters, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.MigrateResult]: + """Migrate the CDN profile to Azure Frontdoor(Standard/Premium) profile. This step prepares the + profile for migration and will be followed by Commit to finalize the migration. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param migration_parameters: Properties needed to migrate the profile. Is one of the following + types: CdnMigrationToAfdParameters, JSON, IO[bytes] Required. + :type migration_parameters: ~azure.mgmt.cdn.models.CdnMigrationToAfdParameters or JSON or + IO[bytes] + :return: An instance of LROPoller that returns MigrateResult. The MigrateResult is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.MigrateResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.MigrateResult] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._cdn_migrate_to_afd_initial( + resource_group_name=resource_group_name, + profile_name=profile_name, + migration_parameters=migration_parameters, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.MigrateResult, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.MigrateResult].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.MigrateResult]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _migration_abort_initial(self, resource_group_name: str, profile_name: str, **kwargs: Any) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_profiles_migration_abort_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_migration_abort(self, resource_group_name: str, profile_name: str, **kwargs: Any) -> LROPoller[None]: + """Abort the migration to Azure Frontdoor Premium/Standard. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._migration_abort_initial( + resource_group_name=resource_group_name, + profile_name=profile_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + def _can_migrate_initial( + self, + resource_group_name: str, + can_migrate_parameters: Union[_models.CanMigrateParameters, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(can_migrate_parameters, (IOBase, bytes)): + _content = can_migrate_parameters + else: + _content = json.dumps(can_migrate_parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_profiles_can_migrate_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_can_migrate( + self, + resource_group_name: str, + can_migrate_parameters: _models.CanMigrateParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.CanMigrateResult]: + """Checks if CDN profile can be migrated to Azure Frontdoor(Standard/Premium) profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param can_migrate_parameters: Properties needed to check if cdn profile or classic frontdoor + can be migrated. Required. + :type can_migrate_parameters: ~azure.mgmt.cdn.models.CanMigrateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns CanMigrateResult. The CanMigrateResult is + compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.CanMigrateResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_can_migrate( + self, + resource_group_name: str, + can_migrate_parameters: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.CanMigrateResult]: + """Checks if CDN profile can be migrated to Azure Frontdoor(Standard/Premium) profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param can_migrate_parameters: Properties needed to check if cdn profile or classic frontdoor + can be migrated. Required. + :type can_migrate_parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns CanMigrateResult. The CanMigrateResult is + compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.CanMigrateResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_can_migrate( + self, + resource_group_name: str, + can_migrate_parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.CanMigrateResult]: + """Checks if CDN profile can be migrated to Azure Frontdoor(Standard/Premium) profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param can_migrate_parameters: Properties needed to check if cdn profile or classic frontdoor + can be migrated. Required. + :type can_migrate_parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns CanMigrateResult. The CanMigrateResult is + compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.CanMigrateResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_can_migrate( + self, + resource_group_name: str, + can_migrate_parameters: Union[_models.CanMigrateParameters, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.CanMigrateResult]: + """Checks if CDN profile can be migrated to Azure Frontdoor(Standard/Premium) profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param can_migrate_parameters: Properties needed to check if cdn profile or classic frontdoor + can be migrated. Is one of the following types: CanMigrateParameters, JSON, IO[bytes] Required. + :type can_migrate_parameters: ~azure.mgmt.cdn.models.CanMigrateParameters or JSON or IO[bytes] + :return: An instance of LROPoller that returns CanMigrateResult. The CanMigrateResult is + compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.CanMigrateResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.CanMigrateResult] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._can_migrate_initial( + resource_group_name=resource_group_name, + can_migrate_parameters=can_migrate_parameters, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.CanMigrateResult, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.CanMigrateResult].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.CanMigrateResult]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _migrate_initial( + self, + resource_group_name: str, + migration_parameters: Union[_models.MigrationParameters, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(migration_parameters, (IOBase, bytes)): + _content = migration_parameters + else: + _content = json.dumps(migration_parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_profiles_migrate_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_migrate( + self, + resource_group_name: str, + migration_parameters: _models.MigrationParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.MigrateResult]: + """Migrate the CDN profile to Azure Frontdoor(Standard/Premium) profile. The change need to be + committed after this. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param migration_parameters: Properties needed to migrate the profile. Required. + :type migration_parameters: ~azure.mgmt.cdn.models.MigrationParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns MigrateResult. The MigrateResult is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.MigrateResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_migrate( + self, + resource_group_name: str, + migration_parameters: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.MigrateResult]: + """Migrate the CDN profile to Azure Frontdoor(Standard/Premium) profile. The change need to be + committed after this. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param migration_parameters: Properties needed to migrate the profile. Required. + :type migration_parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns MigrateResult. The MigrateResult is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.MigrateResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_migrate( + self, + resource_group_name: str, + migration_parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.MigrateResult]: + """Migrate the CDN profile to Azure Frontdoor(Standard/Premium) profile. The change need to be + committed after this. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param migration_parameters: Properties needed to migrate the profile. Required. + :type migration_parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns MigrateResult. The MigrateResult is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.MigrateResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_migrate( + self, + resource_group_name: str, + migration_parameters: Union[_models.MigrationParameters, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.MigrateResult]: + """Migrate the CDN profile to Azure Frontdoor(Standard/Premium) profile. The change need to be + committed after this. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param migration_parameters: Properties needed to migrate the profile. Is one of the following + types: MigrationParameters, JSON, IO[bytes] Required. + :type migration_parameters: ~azure.mgmt.cdn.models.MigrationParameters or JSON or IO[bytes] + :return: An instance of LROPoller that returns MigrateResult. The MigrateResult is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.MigrateResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.MigrateResult] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._migrate_initial( + resource_group_name=resource_group_name, + migration_parameters=migration_parameters, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.MigrateResult, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.MigrateResult].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.MigrateResult]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + +class AFDEndpointsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.cdn.CdnClient`'s + :attr:`afd_endpoints` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CdnClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get( + self, resource_group_name: str, profile_name: str, endpoint_name: str, **kwargs: Any + ) -> _models.AFDEndpoint: + """Gets an existing AzureFrontDoor endpoint with the specified endpoint name under the specified + subscription, resource group and profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :return: AFDEndpoint. The AFDEndpoint is compatible with MutableMapping + :rtype: ~azure.mgmt.cdn.models.AFDEndpoint + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.AFDEndpoint] = kwargs.pop("cls", None) + + _request = build_afd_endpoints_get_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.AFDEndpoint, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + def _create_initial( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + endpoint: Union[_models.AFDEndpoint, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(endpoint, (IOBase, bytes)): + _content = endpoint + else: + _content = json.dumps(endpoint, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_afd_endpoints_create_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 201: + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_create( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + endpoint: _models.AFDEndpoint, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.AFDEndpoint]: + """Creates a new AzureFrontDoor endpoint with the specified endpoint name under the specified + subscription, resource group and profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param endpoint: Endpoint properties. Required. + :type endpoint: ~azure.mgmt.cdn.models.AFDEndpoint + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns AFDEndpoint. The AFDEndpoint is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.AFDEndpoint] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + endpoint: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.AFDEndpoint]: + """Creates a new AzureFrontDoor endpoint with the specified endpoint name under the specified + subscription, resource group and profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param endpoint: Endpoint properties. Required. + :type endpoint: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns AFDEndpoint. The AFDEndpoint is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.AFDEndpoint] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + endpoint: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.AFDEndpoint]: + """Creates a new AzureFrontDoor endpoint with the specified endpoint name under the specified + subscription, resource group and profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param endpoint: Endpoint properties. Required. + :type endpoint: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns AFDEndpoint. The AFDEndpoint is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.AFDEndpoint] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_create( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + endpoint: Union[_models.AFDEndpoint, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.AFDEndpoint]: + """Creates a new AzureFrontDoor endpoint with the specified endpoint name under the specified + subscription, resource group and profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param endpoint: Endpoint properties. Is one of the following types: AFDEndpoint, JSON, + IO[bytes] Required. + :type endpoint: ~azure.mgmt.cdn.models.AFDEndpoint or JSON or IO[bytes] + :return: An instance of LROPoller that returns AFDEndpoint. The AFDEndpoint is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.AFDEndpoint] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.AFDEndpoint] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._create_initial( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + endpoint=endpoint, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.AFDEndpoint, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.AFDEndpoint].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.AFDEndpoint]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _update_initial( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + endpoint_update_properties: Union[_models.AFDEndpointUpdateParameters, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(endpoint_update_properties, (IOBase, bytes)): + _content = endpoint_update_properties + else: + _content = json.dumps(endpoint_update_properties, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_afd_endpoints_update_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_update( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + endpoint_update_properties: _models.AFDEndpointUpdateParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.AFDEndpoint]: + """Updates an existing AzureFrontDoor endpoint with the specified endpoint name under the + specified subscription, resource group and profile. Only tags can be updated after creating an + endpoint. To update origins, use the Update Origin operation. To update origin groups, use the + Update Origin group operation. To update domains, use the Update Custom Domain operation. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param endpoint_update_properties: Endpoint update properties. Required. + :type endpoint_update_properties: ~azure.mgmt.cdn.models.AFDEndpointUpdateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns AFDEndpoint. The AFDEndpoint is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.AFDEndpoint] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + endpoint_update_properties: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.AFDEndpoint]: + """Updates an existing AzureFrontDoor endpoint with the specified endpoint name under the + specified subscription, resource group and profile. Only tags can be updated after creating an + endpoint. To update origins, use the Update Origin operation. To update origin groups, use the + Update Origin group operation. To update domains, use the Update Custom Domain operation. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param endpoint_update_properties: Endpoint update properties. Required. + :type endpoint_update_properties: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns AFDEndpoint. The AFDEndpoint is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.AFDEndpoint] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + endpoint_update_properties: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.AFDEndpoint]: + """Updates an existing AzureFrontDoor endpoint with the specified endpoint name under the + specified subscription, resource group and profile. Only tags can be updated after creating an + endpoint. To update origins, use the Update Origin operation. To update origin groups, use the + Update Origin group operation. To update domains, use the Update Custom Domain operation. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param endpoint_update_properties: Endpoint update properties. Required. + :type endpoint_update_properties: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns AFDEndpoint. The AFDEndpoint is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.AFDEndpoint] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_update( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + endpoint_update_properties: Union[_models.AFDEndpointUpdateParameters, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.AFDEndpoint]: + """Updates an existing AzureFrontDoor endpoint with the specified endpoint name under the + specified subscription, resource group and profile. Only tags can be updated after creating an + endpoint. To update origins, use the Update Origin operation. To update origin groups, use the + Update Origin group operation. To update domains, use the Update Custom Domain operation. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param endpoint_update_properties: Endpoint update properties. Is one of the following types: + AFDEndpointUpdateParameters, JSON, IO[bytes] Required. + :type endpoint_update_properties: ~azure.mgmt.cdn.models.AFDEndpointUpdateParameters or JSON or + IO[bytes] + :return: An instance of LROPoller that returns AFDEndpoint. The AFDEndpoint is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.AFDEndpoint] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.AFDEndpoint] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._update_initial( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + endpoint_update_properties=endpoint_update_properties, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.AFDEndpoint, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.AFDEndpoint].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.AFDEndpoint]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _delete_initial( + self, resource_group_name: str, profile_name: str, endpoint_name: str, **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_afd_endpoints_delete_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_delete( + self, resource_group_name: str, profile_name: str, endpoint_name: str, **kwargs: Any + ) -> LROPoller[None]: + """Deletes an existing AzureFrontDoor endpoint with the specified endpoint name under the + specified subscription, resource group and profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_by_profile( + self, resource_group_name: str, profile_name: str, **kwargs: Any + ) -> ItemPaged["_models.AFDEndpoint"]: + """Lists existing AzureFrontDoor endpoints. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :return: An iterator like instance of AFDEndpoint + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cdn.models.AFDEndpoint] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.AFDEndpoint]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_afd_endpoints_list_by_profile_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.AFDEndpoint], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + def _purge_content_initial( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + contents: Union[_models.AfdPurgeParameters, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(contents, (IOBase, bytes)): + _content = contents + else: + _content = json.dumps(contents, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_afd_endpoints_purge_content_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_purge_content( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + contents: _models.AfdPurgeParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: + """Removes a content from AzureFrontDoor. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param contents: The list of paths to the content and the list of linked domains to be purged. + Path can be a full URL, e.g. '/pictures/city.png' which removes a single file, or a directory + with a wildcard, e.g. '/pictures/*' which removes all folders and files in the directory. + Required. + :type contents: ~azure.mgmt.cdn.models.AfdPurgeParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_purge_content( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + contents: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: + """Removes a content from AzureFrontDoor. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param contents: The list of paths to the content and the list of linked domains to be purged. + Path can be a full URL, e.g. '/pictures/city.png' which removes a single file, or a directory + with a wildcard, e.g. '/pictures/*' which removes all folders and files in the directory. + Required. + :type contents: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_purge_content( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + contents: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: + """Removes a content from AzureFrontDoor. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param contents: The list of paths to the content and the list of linked domains to be purged. + Path can be a full URL, e.g. '/pictures/city.png' which removes a single file, or a directory + with a wildcard, e.g. '/pictures/*' which removes all folders and files in the directory. + Required. + :type contents: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_purge_content( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + contents: Union[_models.AfdPurgeParameters, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[None]: + """Removes a content from AzureFrontDoor. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param contents: The list of paths to the content and the list of linked domains to be purged. + Path can be a full URL, e.g. '/pictures/city.png' which removes a single file, or a directory + with a wildcard, e.g. '/pictures/*' which removes all folders and files in the directory. Is + one of the following types: AfdPurgeParameters, JSON, IO[bytes] Required. + :type contents: ~azure.mgmt.cdn.models.AfdPurgeParameters or JSON or IO[bytes] + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._purge_content_initial( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + contents=contents, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_resource_usage( + self, resource_group_name: str, profile_name: str, endpoint_name: str, **kwargs: Any + ) -> ItemPaged["_models.Usage"]: + """Checks the quota and actual usage of endpoints under the given Azure Front Door profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :return: An iterator like instance of Usage + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cdn.models.Usage] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.Usage]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_afd_endpoints_list_resource_usage_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.Usage], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @overload + def validate_custom_domain( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + custom_domain_properties: _models.ValidateCustomDomainInput, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ValidateCustomDomainOutput: + """Validates the custom domain mapping to ensure it maps to the correct Azure Front Door endpoint + in DNS. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param custom_domain_properties: Custom domain to be validated. Required. + :type custom_domain_properties: ~azure.mgmt.cdn.models.ValidateCustomDomainInput + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ValidateCustomDomainOutput. The ValidateCustomDomainOutput is compatible with + MutableMapping + :rtype: ~azure.mgmt.cdn.models.ValidateCustomDomainOutput + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def validate_custom_domain( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + custom_domain_properties: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ValidateCustomDomainOutput: + """Validates the custom domain mapping to ensure it maps to the correct Azure Front Door endpoint + in DNS. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param custom_domain_properties: Custom domain to be validated. Required. + :type custom_domain_properties: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ValidateCustomDomainOutput. The ValidateCustomDomainOutput is compatible with + MutableMapping + :rtype: ~azure.mgmt.cdn.models.ValidateCustomDomainOutput + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def validate_custom_domain( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + custom_domain_properties: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ValidateCustomDomainOutput: + """Validates the custom domain mapping to ensure it maps to the correct Azure Front Door endpoint + in DNS. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param custom_domain_properties: Custom domain to be validated. Required. + :type custom_domain_properties: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: ValidateCustomDomainOutput. The ValidateCustomDomainOutput is compatible with + MutableMapping + :rtype: ~azure.mgmt.cdn.models.ValidateCustomDomainOutput + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def validate_custom_domain( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + custom_domain_properties: Union[_models.ValidateCustomDomainInput, JSON, IO[bytes]], + **kwargs: Any + ) -> _models.ValidateCustomDomainOutput: + """Validates the custom domain mapping to ensure it maps to the correct Azure Front Door endpoint + in DNS. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param custom_domain_properties: Custom domain to be validated. Is one of the following types: + ValidateCustomDomainInput, JSON, IO[bytes] Required. + :type custom_domain_properties: ~azure.mgmt.cdn.models.ValidateCustomDomainInput or JSON or + IO[bytes] + :return: ValidateCustomDomainOutput. The ValidateCustomDomainOutput is compatible with + MutableMapping + :rtype: ~azure.mgmt.cdn.models.ValidateCustomDomainOutput + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ValidateCustomDomainOutput] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(custom_domain_properties, (IOBase, bytes)): + _content = custom_domain_properties + else: + _content = json.dumps(custom_domain_properties, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_afd_endpoints_validate_custom_domain_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ValidateCustomDomainOutput, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + +class AFDOriginGroupsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.cdn.CdnClient`'s + :attr:`afd_origin_groups` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CdnClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get( + self, resource_group_name: str, profile_name: str, origin_group_name: str, **kwargs: Any + ) -> _models.AFDOriginGroup: + """Gets an existing origin group within a profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param origin_group_name: Name of the origin group which is unique within the endpoint. + Required. + :type origin_group_name: str + :return: AFDOriginGroup. The AFDOriginGroup is compatible with MutableMapping + :rtype: ~azure.mgmt.cdn.models.AFDOriginGroup + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.AFDOriginGroup] = kwargs.pop("cls", None) + + _request = build_afd_origin_groups_get_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + origin_group_name=origin_group_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.AFDOriginGroup, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + def _create_initial( + self, + resource_group_name: str, + profile_name: str, + origin_group_name: str, + origin_group: Union[_models.AFDOriginGroup, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(origin_group, (IOBase, bytes)): + _content = origin_group + else: + _content = json.dumps(origin_group, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_afd_origin_groups_create_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + origin_group_name=origin_group_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 201: + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_create( + self, + resource_group_name: str, + profile_name: str, + origin_group_name: str, + origin_group: _models.AFDOriginGroup, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.AFDOriginGroup]: + """Creates a new origin group within the specified profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param origin_group_name: Name of the origin group which is unique within the endpoint. + Required. + :type origin_group_name: str + :param origin_group: Origin group properties. Required. + :type origin_group: ~azure.mgmt.cdn.models.AFDOriginGroup + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns AFDOriginGroup. The AFDOriginGroup is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.AFDOriginGroup] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create( + self, + resource_group_name: str, + profile_name: str, + origin_group_name: str, + origin_group: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.AFDOriginGroup]: + """Creates a new origin group within the specified profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param origin_group_name: Name of the origin group which is unique within the endpoint. + Required. + :type origin_group_name: str + :param origin_group: Origin group properties. Required. + :type origin_group: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns AFDOriginGroup. The AFDOriginGroup is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.AFDOriginGroup] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create( + self, + resource_group_name: str, + profile_name: str, + origin_group_name: str, + origin_group: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.AFDOriginGroup]: + """Creates a new origin group within the specified profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param origin_group_name: Name of the origin group which is unique within the endpoint. + Required. + :type origin_group_name: str + :param origin_group: Origin group properties. Required. + :type origin_group: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns AFDOriginGroup. The AFDOriginGroup is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.AFDOriginGroup] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_create( + self, + resource_group_name: str, + profile_name: str, + origin_group_name: str, + origin_group: Union[_models.AFDOriginGroup, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.AFDOriginGroup]: + """Creates a new origin group within the specified profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param origin_group_name: Name of the origin group which is unique within the endpoint. + Required. + :type origin_group_name: str + :param origin_group: Origin group properties. Is one of the following types: AFDOriginGroup, + JSON, IO[bytes] Required. + :type origin_group: ~azure.mgmt.cdn.models.AFDOriginGroup or JSON or IO[bytes] + :return: An instance of LROPoller that returns AFDOriginGroup. The AFDOriginGroup is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.AFDOriginGroup] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.AFDOriginGroup] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._create_initial( + resource_group_name=resource_group_name, + profile_name=profile_name, + origin_group_name=origin_group_name, + origin_group=origin_group, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.AFDOriginGroup, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.AFDOriginGroup].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.AFDOriginGroup]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _update_initial( + self, + resource_group_name: str, + profile_name: str, + origin_group_name: str, + origin_group_update_properties: Union[_models.AFDOriginGroupUpdateParameters, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(origin_group_update_properties, (IOBase, bytes)): + _content = origin_group_update_properties + else: + _content = json.dumps(origin_group_update_properties, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_afd_origin_groups_update_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + origin_group_name=origin_group_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_update( + self, + resource_group_name: str, + profile_name: str, + origin_group_name: str, + origin_group_update_properties: _models.AFDOriginGroupUpdateParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.AFDOriginGroup]: + """Updates an existing origin group within a profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param origin_group_name: Name of the origin group which is unique within the endpoint. + Required. + :type origin_group_name: str + :param origin_group_update_properties: Origin group properties. Required. + :type origin_group_update_properties: ~azure.mgmt.cdn.models.AFDOriginGroupUpdateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns AFDOriginGroup. The AFDOriginGroup is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.AFDOriginGroup] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update( + self, + resource_group_name: str, + profile_name: str, + origin_group_name: str, + origin_group_update_properties: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.AFDOriginGroup]: + """Updates an existing origin group within a profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param origin_group_name: Name of the origin group which is unique within the endpoint. + Required. + :type origin_group_name: str + :param origin_group_update_properties: Origin group properties. Required. + :type origin_group_update_properties: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns AFDOriginGroup. The AFDOriginGroup is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.AFDOriginGroup] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update( + self, + resource_group_name: str, + profile_name: str, + origin_group_name: str, + origin_group_update_properties: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.AFDOriginGroup]: + """Updates an existing origin group within a profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param origin_group_name: Name of the origin group which is unique within the endpoint. + Required. + :type origin_group_name: str + :param origin_group_update_properties: Origin group properties. Required. + :type origin_group_update_properties: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns AFDOriginGroup. The AFDOriginGroup is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.AFDOriginGroup] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_update( + self, + resource_group_name: str, + profile_name: str, + origin_group_name: str, + origin_group_update_properties: Union[_models.AFDOriginGroupUpdateParameters, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.AFDOriginGroup]: + """Updates an existing origin group within a profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param origin_group_name: Name of the origin group which is unique within the endpoint. + Required. + :type origin_group_name: str + :param origin_group_update_properties: Origin group properties. Is one of the following types: + AFDOriginGroupUpdateParameters, JSON, IO[bytes] Required. + :type origin_group_update_properties: ~azure.mgmt.cdn.models.AFDOriginGroupUpdateParameters or + JSON or IO[bytes] + :return: An instance of LROPoller that returns AFDOriginGroup. The AFDOriginGroup is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.AFDOriginGroup] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.AFDOriginGroup] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._update_initial( + resource_group_name=resource_group_name, + profile_name=profile_name, + origin_group_name=origin_group_name, + origin_group_update_properties=origin_group_update_properties, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.AFDOriginGroup, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.AFDOriginGroup].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.AFDOriginGroup]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _delete_initial( + self, resource_group_name: str, profile_name: str, origin_group_name: str, **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_afd_origin_groups_delete_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + origin_group_name=origin_group_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_delete( + self, resource_group_name: str, profile_name: str, origin_group_name: str, **kwargs: Any + ) -> LROPoller[None]: + """Deletes an existing origin group within a profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param origin_group_name: Name of the origin group which is unique within the endpoint. + Required. + :type origin_group_name: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + profile_name=profile_name, + origin_group_name=origin_group_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_by_profile( + self, resource_group_name: str, profile_name: str, **kwargs: Any + ) -> ItemPaged["_models.AFDOriginGroup"]: + """Lists all of the existing origin groups within a profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :return: An iterator like instance of AFDOriginGroup + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cdn.models.AFDOriginGroup] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.AFDOriginGroup]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_afd_origin_groups_list_by_profile_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.AFDOriginGroup], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @distributed_trace + def list_resource_usage( + self, resource_group_name: str, profile_name: str, origin_group_name: str, **kwargs: Any + ) -> ItemPaged["_models.Usage"]: + """Checks the quota and actual usage of endpoints under the given Azure Front Door profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param origin_group_name: Name of the origin group which is unique within the endpoint. + Required. + :type origin_group_name: str + :return: An iterator like instance of Usage + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cdn.models.Usage] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.Usage]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_afd_origin_groups_list_resource_usage_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + origin_group_name=origin_group_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.Usage], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class AFDOriginsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.cdn.CdnClient`'s + :attr:`afd_origins` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CdnClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get( + self, resource_group_name: str, profile_name: str, origin_group_name: str, origin_name: str, **kwargs: Any + ) -> _models.AFDOrigin: + """Gets an existing origin within an origin group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param origin_group_name: Name of the origin group which is unique within the endpoint. + Required. + :type origin_group_name: str + :param origin_name: Name of the origin which is unique within the profile. Required. + :type origin_name: str + :return: AFDOrigin. The AFDOrigin is compatible with MutableMapping + :rtype: ~azure.mgmt.cdn.models.AFDOrigin + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.AFDOrigin] = kwargs.pop("cls", None) + + _request = build_afd_origins_get_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + origin_group_name=origin_group_name, + origin_name=origin_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.AFDOrigin, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + def _create_initial( + self, + resource_group_name: str, + profile_name: str, + origin_group_name: str, + origin_name: str, + origin: Union[_models.AFDOrigin, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(origin, (IOBase, bytes)): + _content = origin + else: + _content = json.dumps(origin, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_afd_origins_create_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + origin_group_name=origin_group_name, + origin_name=origin_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 201: + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_create( + self, + resource_group_name: str, + profile_name: str, + origin_group_name: str, + origin_name: str, + origin: _models.AFDOrigin, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.AFDOrigin]: + """Creates a new origin within the specified origin group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param origin_group_name: Name of the origin group which is unique within the endpoint. + Required. + :type origin_group_name: str + :param origin_name: Name of the origin which is unique within the profile. Required. + :type origin_name: str + :param origin: Origin properties. Required. + :type origin: ~azure.mgmt.cdn.models.AFDOrigin + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns AFDOrigin. The AFDOrigin is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.AFDOrigin] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create( + self, + resource_group_name: str, + profile_name: str, + origin_group_name: str, + origin_name: str, + origin: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.AFDOrigin]: + """Creates a new origin within the specified origin group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param origin_group_name: Name of the origin group which is unique within the endpoint. + Required. + :type origin_group_name: str + :param origin_name: Name of the origin which is unique within the profile. Required. + :type origin_name: str + :param origin: Origin properties. Required. + :type origin: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns AFDOrigin. The AFDOrigin is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.AFDOrigin] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create( + self, + resource_group_name: str, + profile_name: str, + origin_group_name: str, + origin_name: str, + origin: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.AFDOrigin]: + """Creates a new origin within the specified origin group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param origin_group_name: Name of the origin group which is unique within the endpoint. + Required. + :type origin_group_name: str + :param origin_name: Name of the origin which is unique within the profile. Required. + :type origin_name: str + :param origin: Origin properties. Required. + :type origin: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns AFDOrigin. The AFDOrigin is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.AFDOrigin] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_create( + self, + resource_group_name: str, + profile_name: str, + origin_group_name: str, + origin_name: str, + origin: Union[_models.AFDOrigin, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.AFDOrigin]: + """Creates a new origin within the specified origin group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param origin_group_name: Name of the origin group which is unique within the endpoint. + Required. + :type origin_group_name: str + :param origin_name: Name of the origin which is unique within the profile. Required. + :type origin_name: str + :param origin: Origin properties. Is one of the following types: AFDOrigin, JSON, IO[bytes] + Required. + :type origin: ~azure.mgmt.cdn.models.AFDOrigin or JSON or IO[bytes] + :return: An instance of LROPoller that returns AFDOrigin. The AFDOrigin is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.AFDOrigin] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.AFDOrigin] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._create_initial( + resource_group_name=resource_group_name, + profile_name=profile_name, + origin_group_name=origin_group_name, + origin_name=origin_name, + origin=origin, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.AFDOrigin, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.AFDOrigin].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.AFDOrigin]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _update_initial( + self, + resource_group_name: str, + profile_name: str, + origin_group_name: str, + origin_name: str, + origin_update_properties: Union[_models.AFDOriginUpdateParameters, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(origin_update_properties, (IOBase, bytes)): + _content = origin_update_properties + else: + _content = json.dumps(origin_update_properties, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_afd_origins_update_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + origin_group_name=origin_group_name, + origin_name=origin_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_update( + self, + resource_group_name: str, + profile_name: str, + origin_group_name: str, + origin_name: str, + origin_update_properties: _models.AFDOriginUpdateParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.AFDOrigin]: + """Updates an existing origin within an origin group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param origin_group_name: Name of the origin group which is unique within the endpoint. + Required. + :type origin_group_name: str + :param origin_name: Name of the origin which is unique within the profile. Required. + :type origin_name: str + :param origin_update_properties: Origin properties. Required. + :type origin_update_properties: ~azure.mgmt.cdn.models.AFDOriginUpdateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns AFDOrigin. The AFDOrigin is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.AFDOrigin] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update( + self, + resource_group_name: str, + profile_name: str, + origin_group_name: str, + origin_name: str, + origin_update_properties: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.AFDOrigin]: + """Updates an existing origin within an origin group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param origin_group_name: Name of the origin group which is unique within the endpoint. + Required. + :type origin_group_name: str + :param origin_name: Name of the origin which is unique within the profile. Required. + :type origin_name: str + :param origin_update_properties: Origin properties. Required. + :type origin_update_properties: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns AFDOrigin. The AFDOrigin is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.AFDOrigin] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update( + self, + resource_group_name: str, + profile_name: str, + origin_group_name: str, + origin_name: str, + origin_update_properties: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.AFDOrigin]: + """Updates an existing origin within an origin group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param origin_group_name: Name of the origin group which is unique within the endpoint. + Required. + :type origin_group_name: str + :param origin_name: Name of the origin which is unique within the profile. Required. + :type origin_name: str + :param origin_update_properties: Origin properties. Required. + :type origin_update_properties: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns AFDOrigin. The AFDOrigin is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.AFDOrigin] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_update( + self, + resource_group_name: str, + profile_name: str, + origin_group_name: str, + origin_name: str, + origin_update_properties: Union[_models.AFDOriginUpdateParameters, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.AFDOrigin]: + """Updates an existing origin within an origin group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param origin_group_name: Name of the origin group which is unique within the endpoint. + Required. + :type origin_group_name: str + :param origin_name: Name of the origin which is unique within the profile. Required. + :type origin_name: str + :param origin_update_properties: Origin properties. Is one of the following types: + AFDOriginUpdateParameters, JSON, IO[bytes] Required. + :type origin_update_properties: ~azure.mgmt.cdn.models.AFDOriginUpdateParameters or JSON or + IO[bytes] + :return: An instance of LROPoller that returns AFDOrigin. The AFDOrigin is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.AFDOrigin] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.AFDOrigin] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._update_initial( + resource_group_name=resource_group_name, + profile_name=profile_name, + origin_group_name=origin_group_name, + origin_name=origin_name, + origin_update_properties=origin_update_properties, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.AFDOrigin, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.AFDOrigin].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.AFDOrigin]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _delete_initial( + self, resource_group_name: str, profile_name: str, origin_group_name: str, origin_name: str, **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_afd_origins_delete_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + origin_group_name=origin_group_name, + origin_name=origin_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_delete( + self, resource_group_name: str, profile_name: str, origin_group_name: str, origin_name: str, **kwargs: Any + ) -> LROPoller[None]: + """Deletes an existing origin within an origin group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param origin_group_name: Name of the origin group which is unique within the endpoint. + Required. + :type origin_group_name: str + :param origin_name: Name of the origin which is unique within the profile. Required. + :type origin_name: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + profile_name=profile_name, + origin_group_name=origin_group_name, + origin_name=origin_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_by_origin_group( + self, resource_group_name: str, profile_name: str, origin_group_name: str, **kwargs: Any + ) -> ItemPaged["_models.AFDOrigin"]: + """Lists all of the existing origins within an origin group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param origin_group_name: Name of the origin group which is unique within the endpoint. + Required. + :type origin_group_name: str + :return: An iterator like instance of AFDOrigin + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cdn.models.AFDOrigin] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.AFDOrigin]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_afd_origins_list_by_origin_group_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + origin_group_name=origin_group_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.AFDOrigin], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class RoutesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.cdn.CdnClient`'s + :attr:`routes` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CdnClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get( + self, resource_group_name: str, profile_name: str, endpoint_name: str, route_name: str, **kwargs: Any + ) -> _models.Route: + """Gets an existing route with the specified route name under the specified subscription, resource + group, profile, and AzureFrontDoor endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param route_name: Name of the routing rule. Required. + :type route_name: str + :return: Route. The Route is compatible with MutableMapping + :rtype: ~azure.mgmt.cdn.models.Route + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.Route] = kwargs.pop("cls", None) + + _request = build_routes_get_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + route_name=route_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.Route, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + def _create_initial( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + route_name: str, + route: Union[_models.Route, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(route, (IOBase, bytes)): + _content = route + else: + _content = json.dumps(route, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_routes_create_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + route_name=route_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 201: + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_create( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + route_name: str, + route: _models.Route, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.Route]: + """Creates a new route with the specified route name under the specified subscription, resource + group, profile, and AzureFrontDoor endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param route_name: Name of the routing rule. Required. + :type route_name: str + :param route: Route properties. Required. + :type route: ~azure.mgmt.cdn.models.Route + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns Route. The Route is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.Route] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + route_name: str, + route: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.Route]: + """Creates a new route with the specified route name under the specified subscription, resource + group, profile, and AzureFrontDoor endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param route_name: Name of the routing rule. Required. + :type route_name: str + :param route: Route properties. Required. + :type route: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns Route. The Route is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.Route] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + route_name: str, + route: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.Route]: + """Creates a new route with the specified route name under the specified subscription, resource + group, profile, and AzureFrontDoor endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param route_name: Name of the routing rule. Required. + :type route_name: str + :param route: Route properties. Required. + :type route: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns Route. The Route is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.Route] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_create( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + route_name: str, + route: Union[_models.Route, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.Route]: + """Creates a new route with the specified route name under the specified subscription, resource + group, profile, and AzureFrontDoor endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param route_name: Name of the routing rule. Required. + :type route_name: str + :param route: Route properties. Is one of the following types: Route, JSON, IO[bytes] Required. + :type route: ~azure.mgmt.cdn.models.Route or JSON or IO[bytes] + :return: An instance of LROPoller that returns Route. The Route is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.Route] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.Route] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._create_initial( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + route_name=route_name, + route=route, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.Route, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.Route].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.Route]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _update_initial( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + route_name: str, + route_update_properties: Union[_models.RouteUpdateParameters, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(route_update_properties, (IOBase, bytes)): + _content = route_update_properties + else: + _content = json.dumps(route_update_properties, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_routes_update_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + route_name=route_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_update( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + route_name: str, + route_update_properties: _models.RouteUpdateParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.Route]: + """Updates an existing route with the specified route name under the specified subscription, + resource group, profile, and AzureFrontDoor endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param route_name: Name of the routing rule. Required. + :type route_name: str + :param route_update_properties: Route update properties. Required. + :type route_update_properties: ~azure.mgmt.cdn.models.RouteUpdateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns Route. The Route is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.Route] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + route_name: str, + route_update_properties: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.Route]: + """Updates an existing route with the specified route name under the specified subscription, + resource group, profile, and AzureFrontDoor endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param route_name: Name of the routing rule. Required. + :type route_name: str + :param route_update_properties: Route update properties. Required. + :type route_update_properties: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns Route. The Route is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.Route] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + route_name: str, + route_update_properties: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.Route]: + """Updates an existing route with the specified route name under the specified subscription, + resource group, profile, and AzureFrontDoor endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param route_name: Name of the routing rule. Required. + :type route_name: str + :param route_update_properties: Route update properties. Required. + :type route_update_properties: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns Route. The Route is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.Route] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_update( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + route_name: str, + route_update_properties: Union[_models.RouteUpdateParameters, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.Route]: + """Updates an existing route with the specified route name under the specified subscription, + resource group, profile, and AzureFrontDoor endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param route_name: Name of the routing rule. Required. + :type route_name: str + :param route_update_properties: Route update properties. Is one of the following types: + RouteUpdateParameters, JSON, IO[bytes] Required. + :type route_update_properties: ~azure.mgmt.cdn.models.RouteUpdateParameters or JSON or + IO[bytes] + :return: An instance of LROPoller that returns Route. The Route is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.Route] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.Route] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._update_initial( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + route_name=route_name, + route_update_properties=route_update_properties, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.Route, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.Route].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.Route]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _delete_initial( + self, resource_group_name: str, profile_name: str, endpoint_name: str, route_name: str, **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_routes_delete_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + route_name=route_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_delete( + self, resource_group_name: str, profile_name: str, endpoint_name: str, route_name: str, **kwargs: Any + ) -> LROPoller[None]: + """Deletes an existing route with the specified route name under the specified subscription, + resource group, profile, and AzureFrontDoor endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param route_name: Name of the routing rule. Required. + :type route_name: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + route_name=route_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_by_endpoint( + self, resource_group_name: str, profile_name: str, endpoint_name: str, **kwargs: Any + ) -> ItemPaged["_models.Route"]: + """Lists all of the existing origins within a profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :return: An iterator like instance of Route + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cdn.models.Route] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.Route]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_routes_list_by_endpoint_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.Route], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class RuleSetsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.cdn.CdnClient`'s + :attr:`rule_sets` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CdnClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get(self, resource_group_name: str, profile_name: str, rule_set_name: str, **kwargs: Any) -> _models.RuleSet: + """Gets an existing AzureFrontDoor rule set with the specified rule set name under the specified + subscription, resource group and profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param rule_set_name: Name of the rule set under the profile which is unique globally. + Required. + :type rule_set_name: str + :return: RuleSet. The RuleSet is compatible with MutableMapping + :rtype: ~azure.mgmt.cdn.models.RuleSet + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.RuleSet] = kwargs.pop("cls", None) + + _request = build_rule_sets_get_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + rule_set_name=rule_set_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.RuleSet, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def create(self, resource_group_name: str, profile_name: str, rule_set_name: str, **kwargs: Any) -> _models.RuleSet: + """Creates a new rule set within the specified profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param rule_set_name: Name of the rule set under the profile which is unique globally. + Required. + :type rule_set_name: str + :return: RuleSet. The RuleSet is compatible with MutableMapping + :rtype: ~azure.mgmt.cdn.models.RuleSet + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.RuleSet] = kwargs.pop("cls", None) + + _request = build_rule_sets_create_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + rule_set_name=rule_set_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 201: + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.RuleSet, response.json()) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + def _delete_initial( + self, resource_group_name: str, profile_name: str, rule_set_name: str, **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_rule_sets_delete_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + rule_set_name=rule_set_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_delete( + self, resource_group_name: str, profile_name: str, rule_set_name: str, **kwargs: Any + ) -> LROPoller[None]: + """Deletes an existing AzureFrontDoor rule set with the specified rule set name under the + specified subscription, resource group and profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param rule_set_name: Name of the rule set under the profile which is unique globally. + Required. + :type rule_set_name: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + profile_name=profile_name, + rule_set_name=rule_set_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_by_profile( + self, resource_group_name: str, profile_name: str, **kwargs: Any + ) -> ItemPaged["_models.RuleSet"]: + """Lists existing AzureFrontDoor rule sets within a profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :return: An iterator like instance of RuleSet + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cdn.models.RuleSet] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.RuleSet]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_rule_sets_list_by_profile_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.RuleSet], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @distributed_trace + def list_resource_usage( + self, resource_group_name: str, profile_name: str, rule_set_name: str, **kwargs: Any + ) -> ItemPaged["_models.Usage"]: + """Checks the quota and actual usage of endpoints under the given Azure Front Door profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param rule_set_name: Name of the rule set under the profile which is unique globally. + Required. + :type rule_set_name: str + :return: An iterator like instance of Usage + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cdn.models.Usage] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.Usage]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_rule_sets_list_resource_usage_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + rule_set_name=rule_set_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.Usage], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class RulesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.cdn.CdnClient`'s + :attr:`rules` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CdnClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get( + self, resource_group_name: str, profile_name: str, rule_set_name: str, rule_name: str, **kwargs: Any + ) -> _models.Rule: + """Gets an existing delivery rule within a rule set. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param rule_set_name: Name of the rule set under the profile which is unique globally. + Required. + :type rule_set_name: str + :param rule_name: Name of the delivery rule which is unique within the endpoint. Required. + :type rule_name: str + :return: Rule. The Rule is compatible with MutableMapping + :rtype: ~azure.mgmt.cdn.models.Rule + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.Rule] = kwargs.pop("cls", None) + + _request = build_rules_get_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + rule_set_name=rule_set_name, + rule_name=rule_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.Rule, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + def _create_initial( + self, + resource_group_name: str, + profile_name: str, + rule_set_name: str, + rule_name: str, + rule: Union[_models.Rule, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(rule, (IOBase, bytes)): + _content = rule + else: + _content = json.dumps(rule, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_rules_create_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + rule_set_name=rule_set_name, + rule_name=rule_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 201: + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_create( + self, + resource_group_name: str, + profile_name: str, + rule_set_name: str, + rule_name: str, + rule: _models.Rule, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.Rule]: + """Creates a new delivery rule within the specified rule set. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param rule_set_name: Name of the rule set under the profile which is unique globally. + Required. + :type rule_set_name: str + :param rule_name: Name of the delivery rule which is unique within the endpoint. Required. + :type rule_name: str + :param rule: The delivery rule properties. Required. + :type rule: ~azure.mgmt.cdn.models.Rule + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns Rule. The Rule is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.Rule] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create( + self, + resource_group_name: str, + profile_name: str, + rule_set_name: str, + rule_name: str, + rule: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.Rule]: + """Creates a new delivery rule within the specified rule set. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param rule_set_name: Name of the rule set under the profile which is unique globally. + Required. + :type rule_set_name: str + :param rule_name: Name of the delivery rule which is unique within the endpoint. Required. + :type rule_name: str + :param rule: The delivery rule properties. Required. + :type rule: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns Rule. The Rule is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.Rule] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create( + self, + resource_group_name: str, + profile_name: str, + rule_set_name: str, + rule_name: str, + rule: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.Rule]: + """Creates a new delivery rule within the specified rule set. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param rule_set_name: Name of the rule set under the profile which is unique globally. + Required. + :type rule_set_name: str + :param rule_name: Name of the delivery rule which is unique within the endpoint. Required. + :type rule_name: str + :param rule: The delivery rule properties. Required. + :type rule: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns Rule. The Rule is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.Rule] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_create( + self, + resource_group_name: str, + profile_name: str, + rule_set_name: str, + rule_name: str, + rule: Union[_models.Rule, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.Rule]: + """Creates a new delivery rule within the specified rule set. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param rule_set_name: Name of the rule set under the profile which is unique globally. + Required. + :type rule_set_name: str + :param rule_name: Name of the delivery rule which is unique within the endpoint. Required. + :type rule_name: str + :param rule: The delivery rule properties. Is one of the following types: Rule, JSON, IO[bytes] + Required. + :type rule: ~azure.mgmt.cdn.models.Rule or JSON or IO[bytes] + :return: An instance of LROPoller that returns Rule. The Rule is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.Rule] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.Rule] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._create_initial( + resource_group_name=resource_group_name, + profile_name=profile_name, + rule_set_name=rule_set_name, + rule_name=rule_name, + rule=rule, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.Rule, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.Rule].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.Rule]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _update_initial( + self, + resource_group_name: str, + profile_name: str, + rule_set_name: str, + rule_name: str, + rule_update_properties: Union[_models.RuleUpdateParameters, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(rule_update_properties, (IOBase, bytes)): + _content = rule_update_properties + else: + _content = json.dumps(rule_update_properties, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_rules_update_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + rule_set_name=rule_set_name, + rule_name=rule_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_update( + self, + resource_group_name: str, + profile_name: str, + rule_set_name: str, + rule_name: str, + rule_update_properties: _models.RuleUpdateParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.Rule]: + """Updates an existing delivery rule within a rule set. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param rule_set_name: Name of the rule set under the profile which is unique globally. + Required. + :type rule_set_name: str + :param rule_name: Name of the delivery rule which is unique within the endpoint. Required. + :type rule_name: str + :param rule_update_properties: Delivery rule properties. Required. + :type rule_update_properties: ~azure.mgmt.cdn.models.RuleUpdateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns Rule. The Rule is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.Rule] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update( + self, + resource_group_name: str, + profile_name: str, + rule_set_name: str, + rule_name: str, + rule_update_properties: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.Rule]: + """Updates an existing delivery rule within a rule set. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param rule_set_name: Name of the rule set under the profile which is unique globally. + Required. + :type rule_set_name: str + :param rule_name: Name of the delivery rule which is unique within the endpoint. Required. + :type rule_name: str + :param rule_update_properties: Delivery rule properties. Required. + :type rule_update_properties: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns Rule. The Rule is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.Rule] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update( + self, + resource_group_name: str, + profile_name: str, + rule_set_name: str, + rule_name: str, + rule_update_properties: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.Rule]: + """Updates an existing delivery rule within a rule set. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param rule_set_name: Name of the rule set under the profile which is unique globally. + Required. + :type rule_set_name: str + :param rule_name: Name of the delivery rule which is unique within the endpoint. Required. + :type rule_name: str + :param rule_update_properties: Delivery rule properties. Required. + :type rule_update_properties: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns Rule. The Rule is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.Rule] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_update( + self, + resource_group_name: str, + profile_name: str, + rule_set_name: str, + rule_name: str, + rule_update_properties: Union[_models.RuleUpdateParameters, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.Rule]: + """Updates an existing delivery rule within a rule set. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param rule_set_name: Name of the rule set under the profile which is unique globally. + Required. + :type rule_set_name: str + :param rule_name: Name of the delivery rule which is unique within the endpoint. Required. + :type rule_name: str + :param rule_update_properties: Delivery rule properties. Is one of the following types: + RuleUpdateParameters, JSON, IO[bytes] Required. + :type rule_update_properties: ~azure.mgmt.cdn.models.RuleUpdateParameters or JSON or IO[bytes] + :return: An instance of LROPoller that returns Rule. The Rule is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.Rule] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.Rule] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._update_initial( + resource_group_name=resource_group_name, + profile_name=profile_name, + rule_set_name=rule_set_name, + rule_name=rule_name, + rule_update_properties=rule_update_properties, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.Rule, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.Rule].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.Rule]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _delete_initial( + self, resource_group_name: str, profile_name: str, rule_set_name: str, rule_name: str, **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_rules_delete_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + rule_set_name=rule_set_name, + rule_name=rule_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_delete( + self, resource_group_name: str, profile_name: str, rule_set_name: str, rule_name: str, **kwargs: Any + ) -> LROPoller[None]: + """Deletes an existing delivery rule within a rule set. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param rule_set_name: Name of the rule set under the profile which is unique globally. + Required. + :type rule_set_name: str + :param rule_name: Name of the delivery rule which is unique within the endpoint. Required. + :type rule_name: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + profile_name=profile_name, + rule_set_name=rule_set_name, + rule_name=rule_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_by_rule_set( + self, resource_group_name: str, profile_name: str, rule_set_name: str, **kwargs: Any + ) -> ItemPaged["_models.Rule"]: + """Lists all of the existing delivery rules within a rule set. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param rule_set_name: Name of the rule set under the profile which is unique globally. + Required. + :type rule_set_name: str + :return: An iterator like instance of Rule + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cdn.models.Rule] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.Rule]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_rules_list_by_rule_set_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + rule_set_name=rule_set_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.Rule], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class SecurityPoliciesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.cdn.CdnClient`'s + :attr:`security_policies` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CdnClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get( + self, resource_group_name: str, profile_name: str, security_policy_name: str, **kwargs: Any + ) -> _models.SecurityPolicy: + """Gets an existing security policy within a profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param security_policy_name: Name of the security policy under the profile. Required. + :type security_policy_name: str + :return: SecurityPolicy. The SecurityPolicy is compatible with MutableMapping + :rtype: ~azure.mgmt.cdn.models.SecurityPolicy + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.SecurityPolicy] = kwargs.pop("cls", None) + + _request = build_security_policies_get_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + security_policy_name=security_policy_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.SecurityPolicy, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + def _create_initial( + self, + resource_group_name: str, + profile_name: str, + security_policy_name: str, + security_policy: Union[_models.SecurityPolicy, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(security_policy, (IOBase, bytes)): + _content = security_policy + else: + _content = json.dumps(security_policy, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_security_policies_create_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + security_policy_name=security_policy_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 201: + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_create( + self, + resource_group_name: str, + profile_name: str, + security_policy_name: str, + security_policy: _models.SecurityPolicy, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.SecurityPolicy]: + """Creates a new security policy within the specified profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param security_policy_name: Name of the security policy under the profile. Required. + :type security_policy_name: str + :param security_policy: The security policy properties. Required. + :type security_policy: ~azure.mgmt.cdn.models.SecurityPolicy + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns SecurityPolicy. The SecurityPolicy is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.SecurityPolicy] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create( + self, + resource_group_name: str, + profile_name: str, + security_policy_name: str, + security_policy: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.SecurityPolicy]: + """Creates a new security policy within the specified profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param security_policy_name: Name of the security policy under the profile. Required. + :type security_policy_name: str + :param security_policy: The security policy properties. Required. + :type security_policy: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns SecurityPolicy. The SecurityPolicy is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.SecurityPolicy] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create( + self, + resource_group_name: str, + profile_name: str, + security_policy_name: str, + security_policy: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.SecurityPolicy]: + """Creates a new security policy within the specified profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param security_policy_name: Name of the security policy under the profile. Required. + :type security_policy_name: str + :param security_policy: The security policy properties. Required. + :type security_policy: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns SecurityPolicy. The SecurityPolicy is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.SecurityPolicy] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_create( + self, + resource_group_name: str, + profile_name: str, + security_policy_name: str, + security_policy: Union[_models.SecurityPolicy, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.SecurityPolicy]: + """Creates a new security policy within the specified profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param security_policy_name: Name of the security policy under the profile. Required. + :type security_policy_name: str + :param security_policy: The security policy properties. Is one of the following types: + SecurityPolicy, JSON, IO[bytes] Required. + :type security_policy: ~azure.mgmt.cdn.models.SecurityPolicy or JSON or IO[bytes] + :return: An instance of LROPoller that returns SecurityPolicy. The SecurityPolicy is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.SecurityPolicy] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.SecurityPolicy] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._create_initial( + resource_group_name=resource_group_name, + profile_name=profile_name, + security_policy_name=security_policy_name, + security_policy=security_policy, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.SecurityPolicy, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.SecurityPolicy].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.SecurityPolicy]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _patch_initial( + self, + resource_group_name: str, + profile_name: str, + security_policy_name: str, + security_policy_update_properties: Union[_models.SecurityPolicyUpdateParameters, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(security_policy_update_properties, (IOBase, bytes)): + _content = security_policy_update_properties + else: + _content = json.dumps(security_policy_update_properties, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_security_policies_patch_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + security_policy_name=security_policy_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_patch( + self, + resource_group_name: str, + profile_name: str, + security_policy_name: str, + security_policy_update_properties: _models.SecurityPolicyUpdateParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.SecurityPolicy]: + """Updates an existing security policy within a profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param security_policy_name: Name of the security policy under the profile. Required. + :type security_policy_name: str + :param security_policy_update_properties: Security policy update properties. Required. + :type security_policy_update_properties: ~azure.mgmt.cdn.models.SecurityPolicyUpdateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns SecurityPolicy. The SecurityPolicy is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.SecurityPolicy] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_patch( + self, + resource_group_name: str, + profile_name: str, + security_policy_name: str, + security_policy_update_properties: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.SecurityPolicy]: + """Updates an existing security policy within a profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param security_policy_name: Name of the security policy under the profile. Required. + :type security_policy_name: str + :param security_policy_update_properties: Security policy update properties. Required. + :type security_policy_update_properties: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns SecurityPolicy. The SecurityPolicy is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.SecurityPolicy] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_patch( + self, + resource_group_name: str, + profile_name: str, + security_policy_name: str, + security_policy_update_properties: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.SecurityPolicy]: + """Updates an existing security policy within a profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param security_policy_name: Name of the security policy under the profile. Required. + :type security_policy_name: str + :param security_policy_update_properties: Security policy update properties. Required. + :type security_policy_update_properties: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns SecurityPolicy. The SecurityPolicy is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.SecurityPolicy] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_patch( + self, + resource_group_name: str, + profile_name: str, + security_policy_name: str, + security_policy_update_properties: Union[_models.SecurityPolicyUpdateParameters, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.SecurityPolicy]: + """Updates an existing security policy within a profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param security_policy_name: Name of the security policy under the profile. Required. + :type security_policy_name: str + :param security_policy_update_properties: Security policy update properties. Is one of the + following types: SecurityPolicyUpdateParameters, JSON, IO[bytes] Required. + :type security_policy_update_properties: ~azure.mgmt.cdn.models.SecurityPolicyUpdateParameters + or JSON or IO[bytes] + :return: An instance of LROPoller that returns SecurityPolicy. The SecurityPolicy is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.SecurityPolicy] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.SecurityPolicy] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._patch_initial( + resource_group_name=resource_group_name, + profile_name=profile_name, + security_policy_name=security_policy_name, + security_policy_update_properties=security_policy_update_properties, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.SecurityPolicy, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.SecurityPolicy].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.SecurityPolicy]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _delete_initial( + self, resource_group_name: str, profile_name: str, security_policy_name: str, **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_security_policies_delete_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + security_policy_name=security_policy_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_delete( + self, resource_group_name: str, profile_name: str, security_policy_name: str, **kwargs: Any + ) -> LROPoller[None]: + """Deletes an existing security policy within profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param security_policy_name: Name of the security policy under the profile. Required. + :type security_policy_name: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + profile_name=profile_name, + security_policy_name=security_policy_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_by_profile( + self, resource_group_name: str, profile_name: str, **kwargs: Any + ) -> ItemPaged["_models.SecurityPolicy"]: + """Lists security policies associated with the profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :return: An iterator like instance of SecurityPolicy + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cdn.models.SecurityPolicy] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.SecurityPolicy]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_security_policies_list_by_profile_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.SecurityPolicy], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class SecretsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.cdn.CdnClient`'s + :attr:`secrets` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CdnClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get(self, resource_group_name: str, profile_name: str, secret_name: str, **kwargs: Any) -> _models.Secret: + """Gets an existing Secret within a profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param secret_name: Name of the Secret under the profile. Required. + :type secret_name: str + :return: Secret. The Secret is compatible with MutableMapping + :rtype: ~azure.mgmt.cdn.models.Secret + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.Secret] = kwargs.pop("cls", None) + + _request = build_secrets_get_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + secret_name=secret_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.Secret, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + def _create_initial( + self, + resource_group_name: str, + profile_name: str, + secret_name: str, + secret: Union[_models.Secret, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(secret, (IOBase, bytes)): + _content = secret + else: + _content = json.dumps(secret, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_secrets_create_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + secret_name=secret_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 201: + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_create( + self, + resource_group_name: str, + profile_name: str, + secret_name: str, + secret: _models.Secret, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.Secret]: + """Creates a new Secret within the specified profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param secret_name: Name of the Secret under the profile. Required. + :type secret_name: str + :param secret: The Secret properties. Required. + :type secret: ~azure.mgmt.cdn.models.Secret + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns Secret. The Secret is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.Secret] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create( + self, + resource_group_name: str, + profile_name: str, + secret_name: str, + secret: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.Secret]: + """Creates a new Secret within the specified profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param secret_name: Name of the Secret under the profile. Required. + :type secret_name: str + :param secret: The Secret properties. Required. + :type secret: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns Secret. The Secret is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.Secret] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create( + self, + resource_group_name: str, + profile_name: str, + secret_name: str, + secret: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.Secret]: + """Creates a new Secret within the specified profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param secret_name: Name of the Secret under the profile. Required. + :type secret_name: str + :param secret: The Secret properties. Required. + :type secret: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns Secret. The Secret is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.Secret] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_create( + self, + resource_group_name: str, + profile_name: str, + secret_name: str, + secret: Union[_models.Secret, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.Secret]: + """Creates a new Secret within the specified profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param secret_name: Name of the Secret under the profile. Required. + :type secret_name: str + :param secret: The Secret properties. Is one of the following types: Secret, JSON, IO[bytes] + Required. + :type secret: ~azure.mgmt.cdn.models.Secret or JSON or IO[bytes] + :return: An instance of LROPoller that returns Secret. The Secret is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.Secret] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.Secret] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._create_initial( + resource_group_name=resource_group_name, + profile_name=profile_name, + secret_name=secret_name, + secret=secret, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.Secret, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.Secret].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.Secret]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _delete_initial( + self, resource_group_name: str, profile_name: str, secret_name: str, **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_secrets_delete_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + secret_name=secret_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_delete( + self, resource_group_name: str, profile_name: str, secret_name: str, **kwargs: Any + ) -> LROPoller[None]: + """Deletes an existing Secret within profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param secret_name: Name of the Secret under the profile. Required. + :type secret_name: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + profile_name=profile_name, + secret_name=secret_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_by_profile( + self, resource_group_name: str, profile_name: str, **kwargs: Any + ) -> ItemPaged["_models.Secret"]: + """Lists existing AzureFrontDoor secrets. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :return: An iterator like instance of Secret + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cdn.models.Secret] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.Secret]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_secrets_list_by_profile_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.Secret], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class EndpointsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.cdn.CdnClient`'s + :attr:`endpoints` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CdnClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get(self, resource_group_name: str, profile_name: str, endpoint_name: str, **kwargs: Any) -> _models.Endpoint: + """Gets an existing CDN endpoint with the specified endpoint name under the specified + subscription, resource group and profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :return: Endpoint. The Endpoint is compatible with MutableMapping + :rtype: ~azure.mgmt.cdn.models.Endpoint + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.Endpoint] = kwargs.pop("cls", None) + + _request = build_endpoints_get_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.Endpoint, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + def _create_initial( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + endpoint: Union[_models.Endpoint, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(endpoint, (IOBase, bytes)): + _content = endpoint + else: + _content = json.dumps(endpoint, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_endpoints_create_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 201: + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_create( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + endpoint: _models.Endpoint, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.Endpoint]: + """Creates a new CDN endpoint with the specified endpoint name under the specified subscription, + resource group and profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param endpoint: Endpoint properties. Required. + :type endpoint: ~azure.mgmt.cdn.models.Endpoint + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns Endpoint. The Endpoint is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.Endpoint] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + endpoint: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.Endpoint]: + """Creates a new CDN endpoint with the specified endpoint name under the specified subscription, + resource group and profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param endpoint: Endpoint properties. Required. + :type endpoint: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns Endpoint. The Endpoint is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.Endpoint] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + endpoint: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.Endpoint]: + """Creates a new CDN endpoint with the specified endpoint name under the specified subscription, + resource group and profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param endpoint: Endpoint properties. Required. + :type endpoint: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns Endpoint. The Endpoint is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.Endpoint] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_create( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + endpoint: Union[_models.Endpoint, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.Endpoint]: + """Creates a new CDN endpoint with the specified endpoint name under the specified subscription, + resource group and profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param endpoint: Endpoint properties. Is one of the following types: Endpoint, JSON, IO[bytes] + Required. + :type endpoint: ~azure.mgmt.cdn.models.Endpoint or JSON or IO[bytes] + :return: An instance of LROPoller that returns Endpoint. The Endpoint is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.Endpoint] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.Endpoint] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._create_initial( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + endpoint=endpoint, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.Endpoint, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.Endpoint].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.Endpoint]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _update_initial( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + endpoint_update_properties: Union[_models.EndpointUpdateParameters, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(endpoint_update_properties, (IOBase, bytes)): + _content = endpoint_update_properties + else: + _content = json.dumps(endpoint_update_properties, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_endpoints_update_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_update( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + endpoint_update_properties: _models.EndpointUpdateParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.Endpoint]: + """Updates an existing CDN endpoint with the specified endpoint name under the specified + subscription, resource group and profile. Only tags can be updated after creating an endpoint. + To update origins, use the Update Origin operation. To update origin groups, use the Update + Origin group operation. To update custom domains, use the Update Custom Domain operation. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param endpoint_update_properties: Endpoint update properties. Required. + :type endpoint_update_properties: ~azure.mgmt.cdn.models.EndpointUpdateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns Endpoint. The Endpoint is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.Endpoint] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + endpoint_update_properties: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.Endpoint]: + """Updates an existing CDN endpoint with the specified endpoint name under the specified + subscription, resource group and profile. Only tags can be updated after creating an endpoint. + To update origins, use the Update Origin operation. To update origin groups, use the Update + Origin group operation. To update custom domains, use the Update Custom Domain operation. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param endpoint_update_properties: Endpoint update properties. Required. + :type endpoint_update_properties: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns Endpoint. The Endpoint is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.Endpoint] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + endpoint_update_properties: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.Endpoint]: + """Updates an existing CDN endpoint with the specified endpoint name under the specified + subscription, resource group and profile. Only tags can be updated after creating an endpoint. + To update origins, use the Update Origin operation. To update origin groups, use the Update + Origin group operation. To update custom domains, use the Update Custom Domain operation. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param endpoint_update_properties: Endpoint update properties. Required. + :type endpoint_update_properties: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns Endpoint. The Endpoint is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.Endpoint] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_update( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + endpoint_update_properties: Union[_models.EndpointUpdateParameters, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.Endpoint]: + """Updates an existing CDN endpoint with the specified endpoint name under the specified + subscription, resource group and profile. Only tags can be updated after creating an endpoint. + To update origins, use the Update Origin operation. To update origin groups, use the Update + Origin group operation. To update custom domains, use the Update Custom Domain operation. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param endpoint_update_properties: Endpoint update properties. Is one of the following types: + EndpointUpdateParameters, JSON, IO[bytes] Required. + :type endpoint_update_properties: ~azure.mgmt.cdn.models.EndpointUpdateParameters or JSON or + IO[bytes] + :return: An instance of LROPoller that returns Endpoint. The Endpoint is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.Endpoint] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.Endpoint] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._update_initial( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + endpoint_update_properties=endpoint_update_properties, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.Endpoint, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.Endpoint].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.Endpoint]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _delete_initial( + self, resource_group_name: str, profile_name: str, endpoint_name: str, **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_endpoints_delete_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_delete( + self, resource_group_name: str, profile_name: str, endpoint_name: str, **kwargs: Any + ) -> LROPoller[None]: + """Deletes an existing CDN endpoint with the specified endpoint name under the specified + subscription, resource group and profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_by_profile( + self, resource_group_name: str, profile_name: str, **kwargs: Any + ) -> ItemPaged["_models.Endpoint"]: + """Lists existing CDN endpoints. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :return: An iterator like instance of Endpoint + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cdn.models.Endpoint] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.Endpoint]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_endpoints_list_by_profile_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.Endpoint], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + def _start_initial( + self, resource_group_name: str, profile_name: str, endpoint_name: str, **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_endpoints_start_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_start( + self, resource_group_name: str, profile_name: str, endpoint_name: str, **kwargs: Any + ) -> LROPoller[_models.Endpoint]: + """Starts an existing CDN endpoint that is on a stopped state. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :return: An instance of LROPoller that returns Endpoint. The Endpoint is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.Endpoint] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.Endpoint] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._start_initial( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response_headers = {} + response = pipeline_response.http_response + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = _deserialize(_models.Endpoint, response.json()) + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.Endpoint].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.Endpoint]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _stop_initial( + self, resource_group_name: str, profile_name: str, endpoint_name: str, **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_endpoints_stop_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_stop( + self, resource_group_name: str, profile_name: str, endpoint_name: str, **kwargs: Any + ) -> LROPoller[_models.Endpoint]: + """Stops an existing running CDN endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :return: An instance of LROPoller that returns Endpoint. The Endpoint is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.Endpoint] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.Endpoint] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._stop_initial( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response_headers = {} + response = pipeline_response.http_response + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = _deserialize(_models.Endpoint, response.json()) + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.Endpoint].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.Endpoint]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _purge_content_initial( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + content_file_paths: Union[_models.PurgeParameters, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(content_file_paths, (IOBase, bytes)): + _content = content_file_paths + else: + _content = json.dumps(content_file_paths, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_endpoints_purge_content_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_purge_content( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + content_file_paths: _models.PurgeParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: + """Removes a content from CDN. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param content_file_paths: The path to the content to be purged. Path can be a full URL, e.g. + '/pictures/city.png' which removes a single file, or a directory with a wildcard, e.g. + '/pictures/*' which removes all folders and files in the directory. Required. + :type content_file_paths: ~azure.mgmt.cdn.models.PurgeParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_purge_content( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + content_file_paths: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: + """Removes a content from CDN. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param content_file_paths: The path to the content to be purged. Path can be a full URL, e.g. + '/pictures/city.png' which removes a single file, or a directory with a wildcard, e.g. + '/pictures/*' which removes all folders and files in the directory. Required. + :type content_file_paths: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_purge_content( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + content_file_paths: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: + """Removes a content from CDN. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param content_file_paths: The path to the content to be purged. Path can be a full URL, e.g. + '/pictures/city.png' which removes a single file, or a directory with a wildcard, e.g. + '/pictures/*' which removes all folders and files in the directory. Required. + :type content_file_paths: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_purge_content( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + content_file_paths: Union[_models.PurgeParameters, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[None]: + """Removes a content from CDN. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param content_file_paths: The path to the content to be purged. Path can be a full URL, e.g. + '/pictures/city.png' which removes a single file, or a directory with a wildcard, e.g. + '/pictures/*' which removes all folders and files in the directory. Is one of the following + types: PurgeParameters, JSON, IO[bytes] Required. + :type content_file_paths: ~azure.mgmt.cdn.models.PurgeParameters or JSON or IO[bytes] + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._purge_content_initial( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + content_file_paths=content_file_paths, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + def _load_content_initial( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + content_file_paths: Union[_models.LoadParameters, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(content_file_paths, (IOBase, bytes)): + _content = content_file_paths + else: + _content = json.dumps(content_file_paths, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_endpoints_load_content_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_load_content( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + content_file_paths: _models.LoadParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: + """Pre-loads a content to CDN. Available for Verizon Profiles. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param content_file_paths: The path to the content to be loaded. Path should be a full URL, + e.g. ‘/pictures/city.png' which loads a single file. Required. + :type content_file_paths: ~azure.mgmt.cdn.models.LoadParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_load_content( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + content_file_paths: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: + """Pre-loads a content to CDN. Available for Verizon Profiles. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param content_file_paths: The path to the content to be loaded. Path should be a full URL, + e.g. ‘/pictures/city.png' which loads a single file. Required. + :type content_file_paths: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_load_content( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + content_file_paths: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: + """Pre-loads a content to CDN. Available for Verizon Profiles. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param content_file_paths: The path to the content to be loaded. Path should be a full URL, + e.g. ‘/pictures/city.png' which loads a single file. Required. + :type content_file_paths: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_load_content( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + content_file_paths: Union[_models.LoadParameters, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[None]: + """Pre-loads a content to CDN. Available for Verizon Profiles. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param content_file_paths: The path to the content to be loaded. Path should be a full URL, + e.g. ‘/pictures/city.png' which loads a single file. Is one of the following types: + LoadParameters, JSON, IO[bytes] Required. + :type content_file_paths: ~azure.mgmt.cdn.models.LoadParameters or JSON or IO[bytes] + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._load_content_initial( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + content_file_paths=content_file_paths, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @overload + def validate_custom_domain( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + custom_domain_properties: _models.ValidateCustomDomainInput, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ValidateCustomDomainOutput: + """Validates the custom domain mapping to ensure it maps to the correct CDN endpoint in DNS. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param custom_domain_properties: Custom domain to be validated. Required. + :type custom_domain_properties: ~azure.mgmt.cdn.models.ValidateCustomDomainInput + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ValidateCustomDomainOutput. The ValidateCustomDomainOutput is compatible with + MutableMapping + :rtype: ~azure.mgmt.cdn.models.ValidateCustomDomainOutput + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def validate_custom_domain( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + custom_domain_properties: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ValidateCustomDomainOutput: + """Validates the custom domain mapping to ensure it maps to the correct CDN endpoint in DNS. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param custom_domain_properties: Custom domain to be validated. Required. + :type custom_domain_properties: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ValidateCustomDomainOutput. The ValidateCustomDomainOutput is compatible with + MutableMapping + :rtype: ~azure.mgmt.cdn.models.ValidateCustomDomainOutput + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def validate_custom_domain( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + custom_domain_properties: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ValidateCustomDomainOutput: + """Validates the custom domain mapping to ensure it maps to the correct CDN endpoint in DNS. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param custom_domain_properties: Custom domain to be validated. Required. + :type custom_domain_properties: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: ValidateCustomDomainOutput. The ValidateCustomDomainOutput is compatible with + MutableMapping + :rtype: ~azure.mgmt.cdn.models.ValidateCustomDomainOutput + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def validate_custom_domain( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + custom_domain_properties: Union[_models.ValidateCustomDomainInput, JSON, IO[bytes]], + **kwargs: Any + ) -> _models.ValidateCustomDomainOutput: + """Validates the custom domain mapping to ensure it maps to the correct CDN endpoint in DNS. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param custom_domain_properties: Custom domain to be validated. Is one of the following types: + ValidateCustomDomainInput, JSON, IO[bytes] Required. + :type custom_domain_properties: ~azure.mgmt.cdn.models.ValidateCustomDomainInput or JSON or + IO[bytes] + :return: ValidateCustomDomainOutput. The ValidateCustomDomainOutput is compatible with + MutableMapping + :rtype: ~azure.mgmt.cdn.models.ValidateCustomDomainOutput + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ValidateCustomDomainOutput] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(custom_domain_properties, (IOBase, bytes)): + _content = custom_domain_properties + else: + _content = json.dumps(custom_domain_properties, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_endpoints_validate_custom_domain_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ValidateCustomDomainOutput, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def list_resource_usage( + self, resource_group_name: str, profile_name: str, endpoint_name: str, **kwargs: Any + ) -> ItemPaged["_models.ResourceUsage"]: + """Checks the quota and usage of geo filters and custom domains under the given endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :return: An iterator like instance of ResourceUsage + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cdn.models.ResourceUsage] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.ResourceUsage]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_endpoints_list_resource_usage_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.ResourceUsage], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class OriginsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.cdn.CdnClient`'s + :attr:`origins` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CdnClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get( + self, resource_group_name: str, profile_name: str, endpoint_name: str, origin_name: str, **kwargs: Any + ) -> _models.Origin: + """Gets an existing origin within an endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param origin_name: Name of the origin which is unique within the endpoint. Required. + :type origin_name: str + :return: Origin. The Origin is compatible with MutableMapping + :rtype: ~azure.mgmt.cdn.models.Origin + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.Origin] = kwargs.pop("cls", None) + + _request = build_origins_get_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + origin_name=origin_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.Origin, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + def _create_initial( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + origin_name: str, + origin: Union[_models.Origin, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(origin, (IOBase, bytes)): + _content = origin + else: + _content = json.dumps(origin, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_origins_create_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + origin_name=origin_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 201: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_create( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + origin_name: str, + origin: _models.Origin, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.Origin]: + """Creates a new origin within the specified endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param origin_name: Name of the origin which is unique within the endpoint. Required. + :type origin_name: str + :param origin: Origin properties. Required. + :type origin: ~azure.mgmt.cdn.models.Origin + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns Origin. The Origin is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.Origin] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + origin_name: str, + origin: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.Origin]: + """Creates a new origin within the specified endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param origin_name: Name of the origin which is unique within the endpoint. Required. + :type origin_name: str + :param origin: Origin properties. Required. + :type origin: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns Origin. The Origin is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.Origin] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + origin_name: str, + origin: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.Origin]: + """Creates a new origin within the specified endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param origin_name: Name of the origin which is unique within the endpoint. Required. + :type origin_name: str + :param origin: Origin properties. Required. + :type origin: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns Origin. The Origin is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.Origin] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_create( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + origin_name: str, + origin: Union[_models.Origin, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.Origin]: + """Creates a new origin within the specified endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param origin_name: Name of the origin which is unique within the endpoint. Required. + :type origin_name: str + :param origin: Origin properties. Is one of the following types: Origin, JSON, IO[bytes] + Required. + :type origin: ~azure.mgmt.cdn.models.Origin or JSON or IO[bytes] + :return: An instance of LROPoller that returns Origin. The Origin is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.Origin] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.Origin] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._create_initial( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + origin_name=origin_name, + origin=origin, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.Origin, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.Origin].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.Origin]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _update_initial( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + origin_name: str, + origin_update_properties: Union[_models.OriginUpdateParameters, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(origin_update_properties, (IOBase, bytes)): + _content = origin_update_properties + else: + _content = json.dumps(origin_update_properties, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_origins_update_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + origin_name=origin_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_update( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + origin_name: str, + origin_update_properties: _models.OriginUpdateParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.Origin]: + """Updates an existing origin within an endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param origin_name: Name of the origin which is unique within the endpoint. Required. + :type origin_name: str + :param origin_update_properties: Origin properties. Required. + :type origin_update_properties: ~azure.mgmt.cdn.models.OriginUpdateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns Origin. The Origin is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.Origin] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + origin_name: str, + origin_update_properties: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.Origin]: + """Updates an existing origin within an endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param origin_name: Name of the origin which is unique within the endpoint. Required. + :type origin_name: str + :param origin_update_properties: Origin properties. Required. + :type origin_update_properties: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns Origin. The Origin is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.Origin] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + origin_name: str, + origin_update_properties: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.Origin]: + """Updates an existing origin within an endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param origin_name: Name of the origin which is unique within the endpoint. Required. + :type origin_name: str + :param origin_update_properties: Origin properties. Required. + :type origin_update_properties: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns Origin. The Origin is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.Origin] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_update( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + origin_name: str, + origin_update_properties: Union[_models.OriginUpdateParameters, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.Origin]: + """Updates an existing origin within an endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param origin_name: Name of the origin which is unique within the endpoint. Required. + :type origin_name: str + :param origin_update_properties: Origin properties. Is one of the following types: + OriginUpdateParameters, JSON, IO[bytes] Required. + :type origin_update_properties: ~azure.mgmt.cdn.models.OriginUpdateParameters or JSON or + IO[bytes] + :return: An instance of LROPoller that returns Origin. The Origin is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.Origin] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.Origin] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._update_initial( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + origin_name=origin_name, + origin_update_properties=origin_update_properties, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.Origin, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.Origin].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.Origin]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _delete_initial( + self, resource_group_name: str, profile_name: str, endpoint_name: str, origin_name: str, **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_origins_delete_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + origin_name=origin_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_delete( + self, resource_group_name: str, profile_name: str, endpoint_name: str, origin_name: str, **kwargs: Any + ) -> LROPoller[None]: + """Deletes an existing origin within an endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param origin_name: Name of the origin which is unique within the endpoint. Required. + :type origin_name: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + origin_name=origin_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_by_endpoint( + self, resource_group_name: str, profile_name: str, endpoint_name: str, **kwargs: Any + ) -> ItemPaged["_models.Origin"]: + """Lists all of the existing origins within an endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :return: An iterator like instance of Origin + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cdn.models.Origin] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.Origin]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_origins_list_by_endpoint_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.Origin], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class OriginGroupsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.cdn.CdnClient`'s + :attr:`origin_groups` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CdnClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get( + self, resource_group_name: str, profile_name: str, endpoint_name: str, origin_group_name: str, **kwargs: Any + ) -> _models.OriginGroup: + """Gets an existing origin group within an endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param origin_group_name: Name of the origin group which is unique within the endpoint. + Required. + :type origin_group_name: str + :return: OriginGroup. The OriginGroup is compatible with MutableMapping + :rtype: ~azure.mgmt.cdn.models.OriginGroup + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.OriginGroup] = kwargs.pop("cls", None) + + _request = build_origin_groups_get_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + origin_group_name=origin_group_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.OriginGroup, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + def _create_initial( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + origin_group_name: str, + origin_group: Union[_models.OriginGroup, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(origin_group, (IOBase, bytes)): + _content = origin_group + else: + _content = json.dumps(origin_group, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_origin_groups_create_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + origin_group_name=origin_group_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 201: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_create( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + origin_group_name: str, + origin_group: _models.OriginGroup, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.OriginGroup]: + """Creates a new origin group within the specified endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param origin_group_name: Name of the origin group which is unique within the endpoint. + Required. + :type origin_group_name: str + :param origin_group: Origin group properties. Required. + :type origin_group: ~azure.mgmt.cdn.models.OriginGroup + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns OriginGroup. The OriginGroup is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.OriginGroup] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + origin_group_name: str, + origin_group: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.OriginGroup]: + """Creates a new origin group within the specified endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param origin_group_name: Name of the origin group which is unique within the endpoint. + Required. + :type origin_group_name: str + :param origin_group: Origin group properties. Required. + :type origin_group: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns OriginGroup. The OriginGroup is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.OriginGroup] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + origin_group_name: str, + origin_group: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.OriginGroup]: + """Creates a new origin group within the specified endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param origin_group_name: Name of the origin group which is unique within the endpoint. + Required. + :type origin_group_name: str + :param origin_group: Origin group properties. Required. + :type origin_group: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns OriginGroup. The OriginGroup is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.OriginGroup] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_create( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + origin_group_name: str, + origin_group: Union[_models.OriginGroup, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.OriginGroup]: + """Creates a new origin group within the specified endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param origin_group_name: Name of the origin group which is unique within the endpoint. + Required. + :type origin_group_name: str + :param origin_group: Origin group properties. Is one of the following types: OriginGroup, JSON, + IO[bytes] Required. + :type origin_group: ~azure.mgmt.cdn.models.OriginGroup or JSON or IO[bytes] + :return: An instance of LROPoller that returns OriginGroup. The OriginGroup is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.OriginGroup] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.OriginGroup] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._create_initial( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + origin_group_name=origin_group_name, + origin_group=origin_group, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.OriginGroup, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.OriginGroup].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.OriginGroup]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _update_initial( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + origin_group_name: str, + origin_group_update_properties: Union[_models.OriginGroupUpdateParameters, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(origin_group_update_properties, (IOBase, bytes)): + _content = origin_group_update_properties + else: + _content = json.dumps(origin_group_update_properties, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_origin_groups_update_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + origin_group_name=origin_group_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_update( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + origin_group_name: str, + origin_group_update_properties: _models.OriginGroupUpdateParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.OriginGroup]: + """Updates an existing origin group within an endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param origin_group_name: Name of the origin group which is unique within the endpoint. + Required. + :type origin_group_name: str + :param origin_group_update_properties: Origin group properties. Required. + :type origin_group_update_properties: ~azure.mgmt.cdn.models.OriginGroupUpdateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns OriginGroup. The OriginGroup is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.OriginGroup] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + origin_group_name: str, + origin_group_update_properties: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.OriginGroup]: + """Updates an existing origin group within an endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param origin_group_name: Name of the origin group which is unique within the endpoint. + Required. + :type origin_group_name: str + :param origin_group_update_properties: Origin group properties. Required. + :type origin_group_update_properties: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns OriginGroup. The OriginGroup is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.OriginGroup] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + origin_group_name: str, + origin_group_update_properties: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.OriginGroup]: + """Updates an existing origin group within an endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param origin_group_name: Name of the origin group which is unique within the endpoint. + Required. + :type origin_group_name: str + :param origin_group_update_properties: Origin group properties. Required. + :type origin_group_update_properties: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns OriginGroup. The OriginGroup is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.OriginGroup] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_update( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + origin_group_name: str, + origin_group_update_properties: Union[_models.OriginGroupUpdateParameters, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.OriginGroup]: + """Updates an existing origin group within an endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param origin_group_name: Name of the origin group which is unique within the endpoint. + Required. + :type origin_group_name: str + :param origin_group_update_properties: Origin group properties. Is one of the following types: + OriginGroupUpdateParameters, JSON, IO[bytes] Required. + :type origin_group_update_properties: ~azure.mgmt.cdn.models.OriginGroupUpdateParameters or + JSON or IO[bytes] + :return: An instance of LROPoller that returns OriginGroup. The OriginGroup is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.OriginGroup] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.OriginGroup] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._update_initial( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + origin_group_name=origin_group_name, + origin_group_update_properties=origin_group_update_properties, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.OriginGroup, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.OriginGroup].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.OriginGroup]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _delete_initial( + self, resource_group_name: str, profile_name: str, endpoint_name: str, origin_group_name: str, **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_origin_groups_delete_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + origin_group_name=origin_group_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_delete( + self, resource_group_name: str, profile_name: str, endpoint_name: str, origin_group_name: str, **kwargs: Any + ) -> LROPoller[None]: + """Deletes an existing origin group within an endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param origin_group_name: Name of the origin group which is unique within the endpoint. + Required. + :type origin_group_name: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + origin_group_name=origin_group_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_by_endpoint( + self, resource_group_name: str, profile_name: str, endpoint_name: str, **kwargs: Any + ) -> ItemPaged["_models.OriginGroup"]: + """Lists all of the existing origin groups within an endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :return: An iterator like instance of OriginGroup + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cdn.models.OriginGroup] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.OriginGroup]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_origin_groups_list_by_endpoint_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.OriginGroup], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class CustomDomainsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.cdn.CdnClient`'s + :attr:`custom_domains` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CdnClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get( + self, resource_group_name: str, profile_name: str, endpoint_name: str, custom_domain_name: str, **kwargs: Any + ) -> _models.CustomDomain: + """Gets an existing custom domain within an endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param custom_domain_name: Name of the custom domain within an endpoint. Required. + :type custom_domain_name: str + :return: CustomDomain. The CustomDomain is compatible with MutableMapping + :rtype: ~azure.mgmt.cdn.models.CustomDomain + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.CustomDomain] = kwargs.pop("cls", None) + + _request = build_custom_domains_get_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + custom_domain_name=custom_domain_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.CustomDomain, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + def _create_initial( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + custom_domain_name: str, + custom_domain_properties: Union[_models.CustomDomainParameters, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(custom_domain_properties, (IOBase, bytes)): + _content = custom_domain_properties + else: + _content = json.dumps(custom_domain_properties, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_custom_domains_create_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + custom_domain_name=custom_domain_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 201: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_create( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + custom_domain_name: str, + custom_domain_properties: _models.CustomDomainParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.CustomDomain]: + """Creates a new custom domain within an endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param custom_domain_name: Name of the custom domain within an endpoint. Required. + :type custom_domain_name: str + :param custom_domain_properties: Properties required to create a new custom domain. Required. + :type custom_domain_properties: ~azure.mgmt.cdn.models.CustomDomainParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns CustomDomain. The CustomDomain is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.CustomDomain] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + custom_domain_name: str, + custom_domain_properties: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.CustomDomain]: + """Creates a new custom domain within an endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param custom_domain_name: Name of the custom domain within an endpoint. Required. + :type custom_domain_name: str + :param custom_domain_properties: Properties required to create a new custom domain. Required. + :type custom_domain_properties: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns CustomDomain. The CustomDomain is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.CustomDomain] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + custom_domain_name: str, + custom_domain_properties: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.CustomDomain]: + """Creates a new custom domain within an endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param custom_domain_name: Name of the custom domain within an endpoint. Required. + :type custom_domain_name: str + :param custom_domain_properties: Properties required to create a new custom domain. Required. + :type custom_domain_properties: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns CustomDomain. The CustomDomain is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.CustomDomain] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_create( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + custom_domain_name: str, + custom_domain_properties: Union[_models.CustomDomainParameters, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.CustomDomain]: + """Creates a new custom domain within an endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param custom_domain_name: Name of the custom domain within an endpoint. Required. + :type custom_domain_name: str + :param custom_domain_properties: Properties required to create a new custom domain. Is one of + the following types: CustomDomainParameters, JSON, IO[bytes] Required. + :type custom_domain_properties: ~azure.mgmt.cdn.models.CustomDomainParameters or JSON or + IO[bytes] + :return: An instance of LROPoller that returns CustomDomain. The CustomDomain is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.CustomDomain] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.CustomDomain] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._create_initial( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + custom_domain_name=custom_domain_name, + custom_domain_properties=custom_domain_properties, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.CustomDomain, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.CustomDomain].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.CustomDomain]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _delete_initial( + self, resource_group_name: str, profile_name: str, endpoint_name: str, custom_domain_name: str, **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_custom_domains_delete_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + custom_domain_name=custom_domain_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_delete( + self, resource_group_name: str, profile_name: str, endpoint_name: str, custom_domain_name: str, **kwargs: Any + ) -> LROPoller[_models.CustomDomain]: + """Deletes an existing custom domain within an endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param custom_domain_name: Name of the custom domain within an endpoint. Required. + :type custom_domain_name: str + :return: An instance of LROPoller that returns CustomDomain. The CustomDomain is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.CustomDomain] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.CustomDomain] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + custom_domain_name=custom_domain_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.CustomDomain, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.CustomDomain].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.CustomDomain]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @distributed_trace + def list_by_endpoint( + self, resource_group_name: str, profile_name: str, endpoint_name: str, **kwargs: Any + ) -> ItemPaged["_models.CustomDomain"]: + """Lists all of the existing custom domains within an endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :return: An iterator like instance of CustomDomain + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cdn.models.CustomDomain] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.CustomDomain]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_custom_domains_list_by_endpoint_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.CustomDomain], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + def _disable_custom_https_initial( + self, resource_group_name: str, profile_name: str, endpoint_name: str, custom_domain_name: str, **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_custom_domains_disable_custom_https_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + custom_domain_name=custom_domain_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_disable_custom_https( + self, resource_group_name: str, profile_name: str, endpoint_name: str, custom_domain_name: str, **kwargs: Any + ) -> LROPoller[_models.CustomDomain]: + """Disable https delivery of the custom domain. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param custom_domain_name: Name of the custom domain within an endpoint. Required. + :type custom_domain_name: str + :return: An instance of LROPoller that returns CustomDomain. The CustomDomain is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.CustomDomain] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.CustomDomain] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._disable_custom_https_initial( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + custom_domain_name=custom_domain_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.CustomDomain, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.CustomDomain].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.CustomDomain]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _enable_custom_https_initial( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + custom_domain_name: str, + custom_domain_https_parameters: Optional[Union[_models.CustomDomainHttpsParameters, JSON, IO[bytes]]] = None, + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + content_type = content_type if custom_domain_https_parameters else None + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" if custom_domain_https_parameters else None + _content = None + if isinstance(custom_domain_https_parameters, (IOBase, bytes)): + _content = custom_domain_https_parameters + else: + if custom_domain_https_parameters is not None: + _content = json.dumps(custom_domain_https_parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + else: + _content = None + + _request = build_custom_domains_enable_custom_https_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + custom_domain_name=custom_domain_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_enable_custom_https( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + custom_domain_name: str, + custom_domain_https_parameters: Optional[_models.CustomDomainHttpsParameters] = None, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.CustomDomain]: + """Enable https delivery of the custom domain. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param custom_domain_name: Name of the custom domain within an endpoint. Required. + :type custom_domain_name: str + :param custom_domain_https_parameters: The configuration specifying how to enable HTTPS for the + custom domain - using CDN managed certificate or user's own certificate. If not specified, + enabling ssl uses CDN managed certificate by default. Default value is None. + :type custom_domain_https_parameters: ~azure.mgmt.cdn.models.CustomDomainHttpsParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns CustomDomain. The CustomDomain is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.CustomDomain] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_enable_custom_https( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + custom_domain_name: str, + custom_domain_https_parameters: Optional[JSON] = None, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.CustomDomain]: + """Enable https delivery of the custom domain. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param custom_domain_name: Name of the custom domain within an endpoint. Required. + :type custom_domain_name: str + :param custom_domain_https_parameters: The configuration specifying how to enable HTTPS for the + custom domain - using CDN managed certificate or user's own certificate. If not specified, + enabling ssl uses CDN managed certificate by default. Default value is None. + :type custom_domain_https_parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns CustomDomain. The CustomDomain is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.CustomDomain] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_enable_custom_https( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + custom_domain_name: str, + custom_domain_https_parameters: Optional[IO[bytes]] = None, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.CustomDomain]: + """Enable https delivery of the custom domain. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param custom_domain_name: Name of the custom domain within an endpoint. Required. + :type custom_domain_name: str + :param custom_domain_https_parameters: The configuration specifying how to enable HTTPS for the + custom domain - using CDN managed certificate or user's own certificate. If not specified, + enabling ssl uses CDN managed certificate by default. Default value is None. + :type custom_domain_https_parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns CustomDomain. The CustomDomain is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.CustomDomain] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_enable_custom_https( + self, + resource_group_name: str, + profile_name: str, + endpoint_name: str, + custom_domain_name: str, + custom_domain_https_parameters: Optional[Union[_models.CustomDomainHttpsParameters, JSON, IO[bytes]]] = None, + **kwargs: Any + ) -> LROPoller[_models.CustomDomain]: + """Enable https delivery of the custom domain. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + Required. + :type endpoint_name: str + :param custom_domain_name: Name of the custom domain within an endpoint. Required. + :type custom_domain_name: str + :param custom_domain_https_parameters: The configuration specifying how to enable HTTPS for the + custom domain - using CDN managed certificate or user's own certificate. If not specified, + enabling ssl uses CDN managed certificate by default. Is one of the following types: + CustomDomainHttpsParameters, JSON, IO[bytes] Default value is None. + :type custom_domain_https_parameters: ~azure.mgmt.cdn.models.CustomDomainHttpsParameters or + JSON or IO[bytes] + :return: An instance of LROPoller that returns CustomDomain. The CustomDomain is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.CustomDomain] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + content_type = content_type if custom_domain_https_parameters else None + cls: ClsType[_models.CustomDomain] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._enable_custom_https_initial( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + custom_domain_name=custom_domain_name, + custom_domain_https_parameters=custom_domain_https_parameters, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.CustomDomain, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.CustomDomain].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.CustomDomain]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + +class AFDCustomDomainsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.cdn.CdnClient`'s + :attr:`afd_custom_domains` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CdnClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get( + self, resource_group_name: str, profile_name: str, custom_domain_name: str, **kwargs: Any + ) -> _models.AFDDomain: + """Gets an existing AzureFrontDoor domain with the specified domain name under the specified + subscription, resource group and profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param custom_domain_name: Name of the domain under the profile which is unique globally. + Required. + :type custom_domain_name: str + :return: AFDDomain. The AFDDomain is compatible with MutableMapping + :rtype: ~azure.mgmt.cdn.models.AFDDomain + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.AFDDomain] = kwargs.pop("cls", None) + + _request = build_afd_custom_domains_get_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + custom_domain_name=custom_domain_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.AFDDomain, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + def _create_initial( + self, + resource_group_name: str, + profile_name: str, + custom_domain_name: str, + custom_domain: Union[_models.AFDDomain, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(custom_domain, (IOBase, bytes)): + _content = custom_domain + else: + _content = json.dumps(custom_domain, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_afd_custom_domains_create_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + custom_domain_name=custom_domain_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 201: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_create( + self, + resource_group_name: str, + profile_name: str, + custom_domain_name: str, + custom_domain: _models.AFDDomain, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.AFDDomain]: + """Creates a new domain within the specified profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param custom_domain_name: Name of the domain under the profile which is unique globally. + Required. + :type custom_domain_name: str + :param custom_domain: Domain properties. Required. + :type custom_domain: ~azure.mgmt.cdn.models.AFDDomain + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns AFDDomain. The AFDDomain is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.AFDDomain] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create( + self, + resource_group_name: str, + profile_name: str, + custom_domain_name: str, + custom_domain: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.AFDDomain]: + """Creates a new domain within the specified profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param custom_domain_name: Name of the domain under the profile which is unique globally. + Required. + :type custom_domain_name: str + :param custom_domain: Domain properties. Required. + :type custom_domain: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns AFDDomain. The AFDDomain is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.AFDDomain] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create( + self, + resource_group_name: str, + profile_name: str, + custom_domain_name: str, + custom_domain: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.AFDDomain]: + """Creates a new domain within the specified profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param custom_domain_name: Name of the domain under the profile which is unique globally. + Required. + :type custom_domain_name: str + :param custom_domain: Domain properties. Required. + :type custom_domain: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns AFDDomain. The AFDDomain is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.AFDDomain] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_create( + self, + resource_group_name: str, + profile_name: str, + custom_domain_name: str, + custom_domain: Union[_models.AFDDomain, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.AFDDomain]: + """Creates a new domain within the specified profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param custom_domain_name: Name of the domain under the profile which is unique globally. + Required. + :type custom_domain_name: str + :param custom_domain: Domain properties. Is one of the following types: AFDDomain, JSON, + IO[bytes] Required. + :type custom_domain: ~azure.mgmt.cdn.models.AFDDomain or JSON or IO[bytes] + :return: An instance of LROPoller that returns AFDDomain. The AFDDomain is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.AFDDomain] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.AFDDomain] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._create_initial( + resource_group_name=resource_group_name, + profile_name=profile_name, + custom_domain_name=custom_domain_name, + custom_domain=custom_domain, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.AFDDomain, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.AFDDomain].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.AFDDomain]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _update_initial( + self, + resource_group_name: str, + profile_name: str, + custom_domain_name: str, + custom_domain_update_properties: Union[_models.AFDDomainUpdateParameters, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(custom_domain_update_properties, (IOBase, bytes)): + _content = custom_domain_update_properties + else: + _content = json.dumps(custom_domain_update_properties, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_afd_custom_domains_update_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + custom_domain_name=custom_domain_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_update( + self, + resource_group_name: str, + profile_name: str, + custom_domain_name: str, + custom_domain_update_properties: _models.AFDDomainUpdateParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.AFDDomain]: + """Updates an existing domain within a profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param custom_domain_name: Name of the domain under the profile which is unique globally. + Required. + :type custom_domain_name: str + :param custom_domain_update_properties: Domain properties. Required. + :type custom_domain_update_properties: ~azure.mgmt.cdn.models.AFDDomainUpdateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns AFDDomain. The AFDDomain is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.AFDDomain] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update( + self, + resource_group_name: str, + profile_name: str, + custom_domain_name: str, + custom_domain_update_properties: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.AFDDomain]: + """Updates an existing domain within a profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param custom_domain_name: Name of the domain under the profile which is unique globally. + Required. + :type custom_domain_name: str + :param custom_domain_update_properties: Domain properties. Required. + :type custom_domain_update_properties: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns AFDDomain. The AFDDomain is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.AFDDomain] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update( + self, + resource_group_name: str, + profile_name: str, + custom_domain_name: str, + custom_domain_update_properties: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.AFDDomain]: + """Updates an existing domain within a profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param custom_domain_name: Name of the domain under the profile which is unique globally. + Required. + :type custom_domain_name: str + :param custom_domain_update_properties: Domain properties. Required. + :type custom_domain_update_properties: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns AFDDomain. The AFDDomain is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.AFDDomain] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_update( + self, + resource_group_name: str, + profile_name: str, + custom_domain_name: str, + custom_domain_update_properties: Union[_models.AFDDomainUpdateParameters, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.AFDDomain]: + """Updates an existing domain within a profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param custom_domain_name: Name of the domain under the profile which is unique globally. + Required. + :type custom_domain_name: str + :param custom_domain_update_properties: Domain properties. Is one of the following types: + AFDDomainUpdateParameters, JSON, IO[bytes] Required. + :type custom_domain_update_properties: ~azure.mgmt.cdn.models.AFDDomainUpdateParameters or JSON + or IO[bytes] + :return: An instance of LROPoller that returns AFDDomain. The AFDDomain is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.AFDDomain] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.AFDDomain] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._update_initial( + resource_group_name=resource_group_name, + profile_name=profile_name, + custom_domain_name=custom_domain_name, + custom_domain_update_properties=custom_domain_update_properties, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.AFDDomain, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.AFDDomain].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.AFDDomain]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _delete_initial( + self, resource_group_name: str, profile_name: str, custom_domain_name: str, **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_afd_custom_domains_delete_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + custom_domain_name=custom_domain_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_delete( + self, resource_group_name: str, profile_name: str, custom_domain_name: str, **kwargs: Any + ) -> LROPoller[None]: + """Deletes an existing AzureFrontDoor domain with the specified domain name under the specified + subscription, resource group and profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param custom_domain_name: Name of the domain under the profile which is unique globally. + Required. + :type custom_domain_name: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + profile_name=profile_name, + custom_domain_name=custom_domain_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_by_profile( + self, resource_group_name: str, profile_name: str, **kwargs: Any + ) -> ItemPaged["_models.AFDDomain"]: + """Lists existing AzureFrontDoor domains. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :return: An iterator like instance of AFDDomain + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cdn.models.AFDDomain] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.AFDDomain]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_afd_custom_domains_list_by_profile_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.AFDDomain], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + def _refresh_validation_token_initial( + self, resource_group_name: str, profile_name: str, custom_domain_name: str, **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_afd_custom_domains_refresh_validation_token_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + custom_domain_name=custom_domain_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_refresh_validation_token( + self, resource_group_name: str, profile_name: str, custom_domain_name: str, **kwargs: Any + ) -> LROPoller[None]: + """Updates the domain validation token. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param custom_domain_name: Name of the domain under the profile which is unique globally. + Required. + :type custom_domain_name: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._refresh_validation_token_initial( + resource_group_name=resource_group_name, + profile_name=profile_name, + custom_domain_name=custom_domain_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + +class AFDProfilesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.cdn.CdnClient`'s + :attr:`afd_profiles` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CdnClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @overload + def check_endpoint_name_availability( + self, + resource_group_name: str, + profile_name: str, + check_endpoint_name_availability_input: _models.CheckEndpointNameAvailabilityInput, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CheckEndpointNameAvailabilityOutput: + """Check the availability of an afdx endpoint name, and return the globally unique endpoint host + name. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param check_endpoint_name_availability_input: Input to check. Required. + :type check_endpoint_name_availability_input: + ~azure.mgmt.cdn.models.CheckEndpointNameAvailabilityInput + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: CheckEndpointNameAvailabilityOutput. The CheckEndpointNameAvailabilityOutput is + compatible with MutableMapping + :rtype: ~azure.mgmt.cdn.models.CheckEndpointNameAvailabilityOutput + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def check_endpoint_name_availability( + self, + resource_group_name: str, + profile_name: str, + check_endpoint_name_availability_input: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CheckEndpointNameAvailabilityOutput: + """Check the availability of an afdx endpoint name, and return the globally unique endpoint host + name. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param check_endpoint_name_availability_input: Input to check. Required. + :type check_endpoint_name_availability_input: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: CheckEndpointNameAvailabilityOutput. The CheckEndpointNameAvailabilityOutput is + compatible with MutableMapping + :rtype: ~azure.mgmt.cdn.models.CheckEndpointNameAvailabilityOutput + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def check_endpoint_name_availability( + self, + resource_group_name: str, + profile_name: str, + check_endpoint_name_availability_input: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CheckEndpointNameAvailabilityOutput: + """Check the availability of an afdx endpoint name, and return the globally unique endpoint host + name. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param check_endpoint_name_availability_input: Input to check. Required. + :type check_endpoint_name_availability_input: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: CheckEndpointNameAvailabilityOutput. The CheckEndpointNameAvailabilityOutput is + compatible with MutableMapping + :rtype: ~azure.mgmt.cdn.models.CheckEndpointNameAvailabilityOutput + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def check_endpoint_name_availability( + self, + resource_group_name: str, + profile_name: str, + check_endpoint_name_availability_input: Union[_models.CheckEndpointNameAvailabilityInput, JSON, IO[bytes]], + **kwargs: Any + ) -> _models.CheckEndpointNameAvailabilityOutput: + """Check the availability of an afdx endpoint name, and return the globally unique endpoint host + name. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param check_endpoint_name_availability_input: Input to check. Is one of the following types: + CheckEndpointNameAvailabilityInput, JSON, IO[bytes] Required. + :type check_endpoint_name_availability_input: + ~azure.mgmt.cdn.models.CheckEndpointNameAvailabilityInput or JSON or IO[bytes] + :return: CheckEndpointNameAvailabilityOutput. The CheckEndpointNameAvailabilityOutput is + compatible with MutableMapping + :rtype: ~azure.mgmt.cdn.models.CheckEndpointNameAvailabilityOutput + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.CheckEndpointNameAvailabilityOutput] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(check_endpoint_name_availability_input, (IOBase, bytes)): + _content = check_endpoint_name_availability_input + else: + _content = json.dumps(check_endpoint_name_availability_input, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_afd_profiles_check_endpoint_name_availability_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.CheckEndpointNameAvailabilityOutput, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def list_resource_usage( + self, resource_group_name: str, profile_name: str, **kwargs: Any + ) -> ItemPaged["_models.Usage"]: + """Checks the quota and actual usage of endpoints under the given Azure Front Door profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :return: An iterator like instance of Usage + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cdn.models.Usage] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.Usage]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_afd_profiles_list_resource_usage_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.Usage], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @overload + def check_host_name_availability( + self, + resource_group_name: str, + profile_name: str, + check_host_name_availability_input: _models.CheckHostNameAvailabilityInput, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CheckNameAvailabilityOutput: + """Validates the custom domain mapping to ensure it maps to the correct Azure Front Door endpoint + in DNS. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param check_host_name_availability_input: Custom domain to be validated. Required. + :type check_host_name_availability_input: ~azure.mgmt.cdn.models.CheckHostNameAvailabilityInput + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: CheckNameAvailabilityOutput. The CheckNameAvailabilityOutput is compatible with + MutableMapping + :rtype: ~azure.mgmt.cdn.models.CheckNameAvailabilityOutput + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def check_host_name_availability( + self, + resource_group_name: str, + profile_name: str, + check_host_name_availability_input: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CheckNameAvailabilityOutput: + """Validates the custom domain mapping to ensure it maps to the correct Azure Front Door endpoint + in DNS. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param check_host_name_availability_input: Custom domain to be validated. Required. + :type check_host_name_availability_input: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: CheckNameAvailabilityOutput. The CheckNameAvailabilityOutput is compatible with + MutableMapping + :rtype: ~azure.mgmt.cdn.models.CheckNameAvailabilityOutput + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def check_host_name_availability( + self, + resource_group_name: str, + profile_name: str, + check_host_name_availability_input: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CheckNameAvailabilityOutput: + """Validates the custom domain mapping to ensure it maps to the correct Azure Front Door endpoint + in DNS. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param check_host_name_availability_input: Custom domain to be validated. Required. + :type check_host_name_availability_input: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: CheckNameAvailabilityOutput. The CheckNameAvailabilityOutput is compatible with + MutableMapping + :rtype: ~azure.mgmt.cdn.models.CheckNameAvailabilityOutput + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def check_host_name_availability( + self, + resource_group_name: str, + profile_name: str, + check_host_name_availability_input: Union[_models.CheckHostNameAvailabilityInput, JSON, IO[bytes]], + **kwargs: Any + ) -> _models.CheckNameAvailabilityOutput: + """Validates the custom domain mapping to ensure it maps to the correct Azure Front Door endpoint + in DNS. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param check_host_name_availability_input: Custom domain to be validated. Is one of the + following types: CheckHostNameAvailabilityInput, JSON, IO[bytes] Required. + :type check_host_name_availability_input: ~azure.mgmt.cdn.models.CheckHostNameAvailabilityInput + or JSON or IO[bytes] + :return: CheckNameAvailabilityOutput. The CheckNameAvailabilityOutput is compatible with + MutableMapping + :rtype: ~azure.mgmt.cdn.models.CheckNameAvailabilityOutput + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.CheckNameAvailabilityOutput] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(check_host_name_availability_input, (IOBase, bytes)): + _content = check_host_name_availability_input + else: + _content = json.dumps(check_host_name_availability_input, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_afd_profiles_check_host_name_availability_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.CheckNameAvailabilityOutput, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + def validate_secret( + self, + resource_group_name: str, + profile_name: str, + validate_secret_input: _models.ValidateSecretInput, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ValidateSecretOutput: + """Validate a Secret in the profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param validate_secret_input: The Secret source. Required. + :type validate_secret_input: ~azure.mgmt.cdn.models.ValidateSecretInput + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ValidateSecretOutput. The ValidateSecretOutput is compatible with MutableMapping + :rtype: ~azure.mgmt.cdn.models.ValidateSecretOutput + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def validate_secret( + self, + resource_group_name: str, + profile_name: str, + validate_secret_input: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ValidateSecretOutput: + """Validate a Secret in the profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param validate_secret_input: The Secret source. Required. + :type validate_secret_input: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ValidateSecretOutput. The ValidateSecretOutput is compatible with MutableMapping + :rtype: ~azure.mgmt.cdn.models.ValidateSecretOutput + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def validate_secret( + self, + resource_group_name: str, + profile_name: str, + validate_secret_input: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ValidateSecretOutput: + """Validate a Secret in the profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param validate_secret_input: The Secret source. Required. + :type validate_secret_input: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: ValidateSecretOutput. The ValidateSecretOutput is compatible with MutableMapping + :rtype: ~azure.mgmt.cdn.models.ValidateSecretOutput + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def validate_secret( + self, + resource_group_name: str, + profile_name: str, + validate_secret_input: Union[_models.ValidateSecretInput, JSON, IO[bytes]], + **kwargs: Any + ) -> _models.ValidateSecretOutput: + """Validate a Secret in the profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param validate_secret_input: The Secret source. Is one of the following types: + ValidateSecretInput, JSON, IO[bytes] Required. + :type validate_secret_input: ~azure.mgmt.cdn.models.ValidateSecretInput or JSON or IO[bytes] + :return: ValidateSecretOutput. The ValidateSecretOutput is compatible with MutableMapping + :rtype: ~azure.mgmt.cdn.models.ValidateSecretOutput + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ValidateSecretOutput] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(validate_secret_input, (IOBase, bytes)): + _content = validate_secret_input + else: + _content = json.dumps(validate_secret_input, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_afd_profiles_validate_secret_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ValidateSecretOutput, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + def _upgrade_initial( + self, + resource_group_name: str, + profile_name: str, + profile_upgrade_parameters: Union[_models.ProfileUpgradeParameters, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(profile_upgrade_parameters, (IOBase, bytes)): + _content = profile_upgrade_parameters + else: + _content = json.dumps(profile_upgrade_parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_afd_profiles_upgrade_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_upgrade( + self, + resource_group_name: str, + profile_name: str, + profile_upgrade_parameters: _models.ProfileUpgradeParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.Profile]: + """Upgrade a profile from Standard_AzureFrontDoor to Premium_AzureFrontDoor. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param profile_upgrade_parameters: Profile upgrade input parameter. Required. + :type profile_upgrade_parameters: ~azure.mgmt.cdn.models.ProfileUpgradeParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns Profile. The Profile is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.Profile] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_upgrade( + self, + resource_group_name: str, + profile_name: str, + profile_upgrade_parameters: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.Profile]: + """Upgrade a profile from Standard_AzureFrontDoor to Premium_AzureFrontDoor. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param profile_upgrade_parameters: Profile upgrade input parameter. Required. + :type profile_upgrade_parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns Profile. The Profile is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.Profile] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_upgrade( + self, + resource_group_name: str, + profile_name: str, + profile_upgrade_parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.Profile]: + """Upgrade a profile from Standard_AzureFrontDoor to Premium_AzureFrontDoor. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param profile_upgrade_parameters: Profile upgrade input parameter. Required. + :type profile_upgrade_parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns Profile. The Profile is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.Profile] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_upgrade( + self, + resource_group_name: str, + profile_name: str, + profile_upgrade_parameters: Union[_models.ProfileUpgradeParameters, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.Profile]: + """Upgrade a profile from Standard_AzureFrontDoor to Premium_AzureFrontDoor. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :param profile_upgrade_parameters: Profile upgrade input parameter. Is one of the following + types: ProfileUpgradeParameters, JSON, IO[bytes] Required. + :type profile_upgrade_parameters: ~azure.mgmt.cdn.models.ProfileUpgradeParameters or JSON or + IO[bytes] + :return: An instance of LROPoller that returns Profile. The Profile is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.Profile] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.Profile] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._upgrade_initial( + resource_group_name=resource_group_name, + profile_name=profile_name, + profile_upgrade_parameters=profile_upgrade_parameters, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.Profile, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.Profile].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.Profile]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + +class LogAnalyticsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.cdn.CdnClient`'s + :attr:`log_analytics` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CdnClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get_log_analytics_metrics( + self, + resource_group_name: str, + profile_name: str, + *, + metrics: List[Union[str, _models.LogMetric]], + date_time_begin: datetime.datetime, + date_time_end: datetime.datetime, + granularity: Union[str, _models.LogMetricsGranularity], + custom_domains: List[str], + protocols: List[str], + group_by: Optional[List[Union[str, _models.LogMetricsGroupBy]]] = None, + continents: Optional[List[str]] = None, + country_or_regions: Optional[List[str]] = None, + **kwargs: Any + ) -> _models.MetricsResponse: + """Get log report for AFD profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :keyword metrics: Required. + :paramtype metrics: list[str or ~azure.mgmt.cdn.models.LogMetric] + :keyword date_time_begin: Required. + :paramtype date_time_begin: ~datetime.datetime + :keyword date_time_end: Required. + :paramtype date_time_end: ~datetime.datetime + :keyword granularity: Known values are: "PT5M", "PT1H", and "P1D". Required. + :paramtype granularity: str or ~azure.mgmt.cdn.models.LogMetricsGranularity + :keyword custom_domains: Required. + :paramtype custom_domains: list[str] + :keyword protocols: Required. + :paramtype protocols: list[str] + :keyword group_by: Default value is None. + :paramtype group_by: list[str or ~azure.mgmt.cdn.models.LogMetricsGroupBy] + :keyword continents: Default value is None. + :paramtype continents: list[str] + :keyword country_or_regions: Default value is None. + :paramtype country_or_regions: list[str] + :return: MetricsResponse. The MetricsResponse is compatible with MutableMapping + :rtype: ~azure.mgmt.cdn.models.MetricsResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.MetricsResponse] = kwargs.pop("cls", None) + + _request = build_log_analytics_get_log_analytics_metrics_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + subscription_id=self._config.subscription_id, + metrics=metrics, + date_time_begin=date_time_begin, + date_time_end=date_time_end, + granularity=granularity, + custom_domains=custom_domains, + protocols=protocols, + group_by=group_by, + continents=continents, + country_or_regions=country_or_regions, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.MetricsResponse, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def get_log_analytics_rankings( + self, + resource_group_name: str, + profile_name: str, + *, + rankings: List[Union[str, _models.LogRanking]], + metrics: List[Union[str, _models.LogRankingMetric]], + max_ranking: int, + date_time_begin: datetime.datetime, + date_time_end: datetime.datetime, + custom_domains: Optional[List[str]] = None, + **kwargs: Any + ) -> _models.RankingsResponse: + """Get log analytics ranking report for AFD profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :keyword rankings: Required. + :paramtype rankings: list[str or ~azure.mgmt.cdn.models.LogRanking] + :keyword metrics: Required. + :paramtype metrics: list[str or ~azure.mgmt.cdn.models.LogRankingMetric] + :keyword max_ranking: Required. + :paramtype max_ranking: int + :keyword date_time_begin: Required. + :paramtype date_time_begin: ~datetime.datetime + :keyword date_time_end: Required. + :paramtype date_time_end: ~datetime.datetime + :keyword custom_domains: Default value is None. + :paramtype custom_domains: list[str] + :return: RankingsResponse. The RankingsResponse is compatible with MutableMapping + :rtype: ~azure.mgmt.cdn.models.RankingsResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.RankingsResponse] = kwargs.pop("cls", None) + + _request = build_log_analytics_get_log_analytics_rankings_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + subscription_id=self._config.subscription_id, + rankings=rankings, + metrics=metrics, + max_ranking=max_ranking, + date_time_begin=date_time_begin, + date_time_end=date_time_end, + custom_domains=custom_domains, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.RankingsResponse, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def get_log_analytics_locations( + self, resource_group_name: str, profile_name: str, **kwargs: Any + ) -> _models.ContinentsResponse: + """Get all available location names for AFD log analytics report. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :return: ContinentsResponse. The ContinentsResponse is compatible with MutableMapping + :rtype: ~azure.mgmt.cdn.models.ContinentsResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.ContinentsResponse] = kwargs.pop("cls", None) + + _request = build_log_analytics_get_log_analytics_locations_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ContinentsResponse, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def get_log_analytics_resources( + self, resource_group_name: str, profile_name: str, **kwargs: Any + ) -> _models.ResourcesResponse: + """Get all endpoints and custom domains available for AFD log report. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :return: ResourcesResponse. The ResourcesResponse is compatible with MutableMapping + :rtype: ~azure.mgmt.cdn.models.ResourcesResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.ResourcesResponse] = kwargs.pop("cls", None) + + _request = build_log_analytics_get_log_analytics_resources_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ResourcesResponse, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def get_waf_log_analytics_metrics( + self, + resource_group_name: str, + profile_name: str, + *, + metrics: List[Union[str, _models.WafMetric]], + date_time_begin: datetime.datetime, + date_time_end: datetime.datetime, + granularity: Union[str, _models.WafGranularity], + actions: Optional[List[Union[str, _models.WafAction]]] = None, + group_by: Optional[List[Union[str, _models.WafRankingGroupBy]]] = None, + rule_types: Optional[List[Union[str, _models.WafRuleType]]] = None, + **kwargs: Any + ) -> _models.WafMetricsResponse: + """Get Waf related log analytics report for AFD profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :keyword metrics: Required. + :paramtype metrics: list[str or ~azure.mgmt.cdn.models.WafMetric] + :keyword date_time_begin: Required. + :paramtype date_time_begin: ~datetime.datetime + :keyword date_time_end: Required. + :paramtype date_time_end: ~datetime.datetime + :keyword granularity: Known values are: "PT5M", "PT1H", and "P1D". Required. + :paramtype granularity: str or ~azure.mgmt.cdn.models.WafGranularity + :keyword actions: Default value is None. + :paramtype actions: list[str or ~azure.mgmt.cdn.models.WafAction] + :keyword group_by: Default value is None. + :paramtype group_by: list[str or ~azure.mgmt.cdn.models.WafRankingGroupBy] + :keyword rule_types: Default value is None. + :paramtype rule_types: list[str or ~azure.mgmt.cdn.models.WafRuleType] + :return: WafMetricsResponse. The WafMetricsResponse is compatible with MutableMapping + :rtype: ~azure.mgmt.cdn.models.WafMetricsResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.WafMetricsResponse] = kwargs.pop("cls", None) + + _request = build_log_analytics_get_waf_log_analytics_metrics_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + subscription_id=self._config.subscription_id, + metrics=metrics, + date_time_begin=date_time_begin, + date_time_end=date_time_end, + granularity=granularity, + actions=actions, + group_by=group_by, + rule_types=rule_types, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.WafMetricsResponse, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def get_waf_log_analytics_rankings( + self, + resource_group_name: str, + profile_name: str, + *, + metrics: List[Union[str, _models.WafMetric]], + date_time_begin: datetime.datetime, + date_time_end: datetime.datetime, + max_ranking: int, + rankings: List[Union[str, _models.WafRankingType]], + actions: Optional[List[Union[str, _models.WafAction]]] = None, + rule_types: Optional[List[Union[str, _models.WafRuleType]]] = None, + **kwargs: Any + ) -> _models.WafRankingsResponse: + """Get WAF log analytics charts for AFD profile. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN + profile which is unique within the resource group. Required. + :type profile_name: str + :keyword metrics: Required. + :paramtype metrics: list[str or ~azure.mgmt.cdn.models.WafMetric] + :keyword date_time_begin: Required. + :paramtype date_time_begin: ~datetime.datetime + :keyword date_time_end: Required. + :paramtype date_time_end: ~datetime.datetime + :keyword max_ranking: Required. + :paramtype max_ranking: int + :keyword rankings: Required. + :paramtype rankings: list[str or ~azure.mgmt.cdn.models.WafRankingType] + :keyword actions: Default value is None. + :paramtype actions: list[str or ~azure.mgmt.cdn.models.WafAction] + :keyword rule_types: Default value is None. + :paramtype rule_types: list[str or ~azure.mgmt.cdn.models.WafRuleType] + :return: WafRankingsResponse. The WafRankingsResponse is compatible with MutableMapping + :rtype: ~azure.mgmt.cdn.models.WafRankingsResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.WafRankingsResponse] = kwargs.pop("cls", None) + + _request = build_log_analytics_get_waf_log_analytics_rankings_request( + resource_group_name=resource_group_name, + profile_name=profile_name, + subscription_id=self._config.subscription_id, + metrics=metrics, + date_time_begin=date_time_begin, + date_time_end=date_time_end, + max_ranking=max_ranking, + rankings=rankings, + actions=actions, + rule_types=rule_types, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.WafRankingsResponse, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + +class PoliciesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.cdn.CdnClient`'s + :attr:`policies` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CdnClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get(self, resource_group_name: str, policy_name: str, **kwargs: Any) -> _models.CdnWebApplicationFirewallPolicy: + """Retrieve protection policy with specified name within a resource group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param policy_name: The name of the CdnWebApplicationFirewallPolicy. Required. + :type policy_name: str + :return: CdnWebApplicationFirewallPolicy. The CdnWebApplicationFirewallPolicy is compatible + with MutableMapping + :rtype: ~azure.mgmt.cdn.models.CdnWebApplicationFirewallPolicy + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.CdnWebApplicationFirewallPolicy] = kwargs.pop("cls", None) + + _request = build_policies_get_request( + resource_group_name=resource_group_name, + policy_name=policy_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.CdnWebApplicationFirewallPolicy, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + def _create_or_update_initial( + self, + resource_group_name: str, + policy_name: str, + cdn_web_application_firewall_policy: Union[_models.CdnWebApplicationFirewallPolicy, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(cdn_web_application_firewall_policy, (IOBase, bytes)): + _content = cdn_web_application_firewall_policy + else: + _content = json.dumps(cdn_web_application_firewall_policy, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_policies_create_or_update_request( + resource_group_name=resource_group_name, + policy_name=policy_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 201: + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + policy_name: str, + cdn_web_application_firewall_policy: _models.CdnWebApplicationFirewallPolicy, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.CdnWebApplicationFirewallPolicy]: + """Create or update policy with specified rule set name within a resource group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param policy_name: The name of the CdnWebApplicationFirewallPolicy. Required. + :type policy_name: str + :param cdn_web_application_firewall_policy: Policy to be created. Required. + :type cdn_web_application_firewall_policy: + ~azure.mgmt.cdn.models.CdnWebApplicationFirewallPolicy + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns CdnWebApplicationFirewallPolicy. The + CdnWebApplicationFirewallPolicy is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.CdnWebApplicationFirewallPolicy] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + policy_name: str, + cdn_web_application_firewall_policy: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.CdnWebApplicationFirewallPolicy]: + """Create or update policy with specified rule set name within a resource group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param policy_name: The name of the CdnWebApplicationFirewallPolicy. Required. + :type policy_name: str + :param cdn_web_application_firewall_policy: Policy to be created. Required. + :type cdn_web_application_firewall_policy: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns CdnWebApplicationFirewallPolicy. The + CdnWebApplicationFirewallPolicy is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.CdnWebApplicationFirewallPolicy] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + policy_name: str, + cdn_web_application_firewall_policy: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.CdnWebApplicationFirewallPolicy]: + """Create or update policy with specified rule set name within a resource group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param policy_name: The name of the CdnWebApplicationFirewallPolicy. Required. + :type policy_name: str + :param cdn_web_application_firewall_policy: Policy to be created. Required. + :type cdn_web_application_firewall_policy: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns CdnWebApplicationFirewallPolicy. The + CdnWebApplicationFirewallPolicy is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.CdnWebApplicationFirewallPolicy] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_create_or_update( + self, + resource_group_name: str, + policy_name: str, + cdn_web_application_firewall_policy: Union[_models.CdnWebApplicationFirewallPolicy, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.CdnWebApplicationFirewallPolicy]: + """Create or update policy with specified rule set name within a resource group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param policy_name: The name of the CdnWebApplicationFirewallPolicy. Required. + :type policy_name: str + :param cdn_web_application_firewall_policy: Policy to be created. Is one of the following + types: CdnWebApplicationFirewallPolicy, JSON, IO[bytes] Required. + :type cdn_web_application_firewall_policy: + ~azure.mgmt.cdn.models.CdnWebApplicationFirewallPolicy or JSON or IO[bytes] + :return: An instance of LROPoller that returns CdnWebApplicationFirewallPolicy. The + CdnWebApplicationFirewallPolicy is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.CdnWebApplicationFirewallPolicy] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.CdnWebApplicationFirewallPolicy] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + policy_name=policy_name, + cdn_web_application_firewall_policy=cdn_web_application_firewall_policy, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.CdnWebApplicationFirewallPolicy, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.CdnWebApplicationFirewallPolicy].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.CdnWebApplicationFirewallPolicy]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _update_initial( + self, + resource_group_name: str, + policy_name: str, + cdn_web_application_firewall_policy_patch_parameters: Union[ + _models.CdnWebApplicationFirewallPolicyPatchParameters, JSON, IO[bytes] + ], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(cdn_web_application_firewall_policy_patch_parameters, (IOBase, bytes)): + _content = cdn_web_application_firewall_policy_patch_parameters + else: + _content = json.dumps(cdn_web_application_firewall_policy_patch_parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_policies_update_request( + resource_group_name=resource_group_name, + policy_name=policy_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_update( + self, + resource_group_name: str, + policy_name: str, + cdn_web_application_firewall_policy_patch_parameters: _models.CdnWebApplicationFirewallPolicyPatchParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.CdnWebApplicationFirewallPolicy]: + """Update an existing CdnWebApplicationFirewallPolicy with the specified policy name under the + specified subscription and resource group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param policy_name: The name of the CdnWebApplicationFirewallPolicy. Required. + :type policy_name: str + :param cdn_web_application_firewall_policy_patch_parameters: CdnWebApplicationFirewallPolicy + parameters to be patched. Required. + :type cdn_web_application_firewall_policy_patch_parameters: + ~azure.mgmt.cdn.models.CdnWebApplicationFirewallPolicyPatchParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns CdnWebApplicationFirewallPolicy. The + CdnWebApplicationFirewallPolicy is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.CdnWebApplicationFirewallPolicy] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update( + self, + resource_group_name: str, + policy_name: str, + cdn_web_application_firewall_policy_patch_parameters: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.CdnWebApplicationFirewallPolicy]: + """Update an existing CdnWebApplicationFirewallPolicy with the specified policy name under the + specified subscription and resource group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param policy_name: The name of the CdnWebApplicationFirewallPolicy. Required. + :type policy_name: str + :param cdn_web_application_firewall_policy_patch_parameters: CdnWebApplicationFirewallPolicy + parameters to be patched. Required. + :type cdn_web_application_firewall_policy_patch_parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns CdnWebApplicationFirewallPolicy. The + CdnWebApplicationFirewallPolicy is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.CdnWebApplicationFirewallPolicy] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update( + self, + resource_group_name: str, + policy_name: str, + cdn_web_application_firewall_policy_patch_parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.CdnWebApplicationFirewallPolicy]: + """Update an existing CdnWebApplicationFirewallPolicy with the specified policy name under the + specified subscription and resource group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param policy_name: The name of the CdnWebApplicationFirewallPolicy. Required. + :type policy_name: str + :param cdn_web_application_firewall_policy_patch_parameters: CdnWebApplicationFirewallPolicy + parameters to be patched. Required. + :type cdn_web_application_firewall_policy_patch_parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns CdnWebApplicationFirewallPolicy. The + CdnWebApplicationFirewallPolicy is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.CdnWebApplicationFirewallPolicy] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_update( + self, + resource_group_name: str, + policy_name: str, + cdn_web_application_firewall_policy_patch_parameters: Union[ + _models.CdnWebApplicationFirewallPolicyPatchParameters, JSON, IO[bytes] + ], + **kwargs: Any + ) -> LROPoller[_models.CdnWebApplicationFirewallPolicy]: + """Update an existing CdnWebApplicationFirewallPolicy with the specified policy name under the + specified subscription and resource group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param policy_name: The name of the CdnWebApplicationFirewallPolicy. Required. + :type policy_name: str + :param cdn_web_application_firewall_policy_patch_parameters: CdnWebApplicationFirewallPolicy + parameters to be patched. Is one of the following types: + CdnWebApplicationFirewallPolicyPatchParameters, JSON, IO[bytes] Required. + :type cdn_web_application_firewall_policy_patch_parameters: + ~azure.mgmt.cdn.models.CdnWebApplicationFirewallPolicyPatchParameters or JSON or IO[bytes] + :return: An instance of LROPoller that returns CdnWebApplicationFirewallPolicy. The + CdnWebApplicationFirewallPolicy is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.CdnWebApplicationFirewallPolicy] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.CdnWebApplicationFirewallPolicy] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._update_initial( + resource_group_name=resource_group_name, + policy_name=policy_name, + cdn_web_application_firewall_policy_patch_parameters=cdn_web_application_firewall_policy_patch_parameters, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.CdnWebApplicationFirewallPolicy, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.CdnWebApplicationFirewallPolicy].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.CdnWebApplicationFirewallPolicy]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, resource_group_name: str, policy_name: str, **kwargs: Any + ) -> None: + """Deletes Policy. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param policy_name: The name of the CdnWebApplicationFirewallPolicy. Required. + :type policy_name: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_policies_delete_request( + resource_group_name=resource_group_name, + policy_name=policy_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list(self, resource_group_name: str, **kwargs: Any) -> ItemPaged["_models.CdnWebApplicationFirewallPolicy"]: + """Lists all of the protection policies within a resource group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: An iterator like instance of CdnWebApplicationFirewallPolicy + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cdn.models.CdnWebApplicationFirewallPolicy] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.CdnWebApplicationFirewallPolicy]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_policies_list_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.CdnWebApplicationFirewallPolicy], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class ResourceUsageOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.cdn.CdnClient`'s + :attr:`resource_usage` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CdnClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list(self, **kwargs: Any) -> ItemPaged["_models.ResourceUsage"]: + """Check the quota and actual usage of the CDN profiles under the given subscription. + + :return: An iterator like instance of ResourceUsage + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cdn.models.ResourceUsage] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.ResourceUsage]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_resource_usage_list_request( + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.ResourceUsage], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class EdgeNodesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.cdn.CdnClient`'s + :attr:`edge_nodes` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: CdnClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list(self, **kwargs: Any) -> ItemPaged["_models.EdgeNode"]: + """Edgenodes are the global Point of Presence (POP) locations used to deliver CDN content to end + users. + + :return: An iterator like instance of EdgeNode + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cdn.models.EdgeNode] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.EdgeNode]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_edge_nodes_list_request( + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.EdgeNode], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class ManagedRuleSetsOperations: """ + .. warning:: + **DO NOT** instantiate this class directly. - models = _models + Instead, you should access the following operations through + :class:`~azure.mgmt.cdn.CdnClient`'s + :attr:`managed_rule_sets` attribute. + """ def __init__(self, *args, **kwargs) -> None: input_args = list(args) self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: CdnManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._config: CdnClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace - def list(self, **kwargs: Any) -> ItemPaged["_models.Operation"]: - """Lists all of the available CDN REST API operations. + def list(self, **kwargs: Any) -> ItemPaged["_models.ManagedRuleSetDefinition"]: + """Lists all available managed rule sets. - :return: An iterator like instance of either Operation or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cdn.models.Operation] + :return: An iterator like instance of ManagedRuleSetDefinition + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cdn.models.ManagedRuleSetDefinition] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + _params = kwargs.pop("params", {}) or {} - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.OperationsListResult] = kwargs.pop("cls", None) + cls: ClsType[List[_models.ManagedRuleSetDefinition]] = kwargs.pop("cls", None) error_map: MutableMapping = { 401: ClientAuthenticationError, @@ -100,12 +21017,18 @@ def list(self, **kwargs: Any) -> ItemPaged["_models.Operation"]: def prepare_request(next_link=None): if not next_link: - _request = build_list_request( - api_version=api_version, + _request = build_managed_rule_sets_list_request( + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, headers=_headers, params=_params, ) - _request.url = self._client.format_url(_request.url) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) else: # make call to next link with the client's api-version @@ -118,18 +21041,29 @@ def prepare_request(next_link=None): ) _next_request_params["api-version"] = self._config.api_version _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + return _request def extract_data(pipeline_response): - deserialized = self._deserialize("OperationsListResult", pipeline_response) - list_of_elem = deserialized.value + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.ManagedRuleSetDefinition], + deserialized.get("value", []), + ) if cls: list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) + return deserialized.get("nextLink") or None, iter(list_of_elem) def get_next(next_link=None): _request = prepare_request(next_link) @@ -142,12 +21076,593 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( + error = _failsafe_deserialize( _models.ErrorResponse, - pipeline_response, + response, ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return ItemPaged(get_next, extract_data) + + +class _CdnClientOperationsMixin(ClientMixinABC[PipelineClient[HttpRequest, HttpResponse], CdnClientConfiguration]): + + @overload + def check_endpoint_name_availability( + self, + resource_group_name: str, + check_endpoint_name_availability_input: _models.CheckEndpointNameAvailabilityInput, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CheckEndpointNameAvailabilityOutput: + """Check the availability of a resource name. This is needed for resources where name is globally + unique, such as a afdx endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param check_endpoint_name_availability_input: Input to check. Required. + :type check_endpoint_name_availability_input: + ~azure.mgmt.cdn.models.CheckEndpointNameAvailabilityInput + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: CheckEndpointNameAvailabilityOutput. The CheckEndpointNameAvailabilityOutput is + compatible with MutableMapping + :rtype: ~azure.mgmt.cdn.models.CheckEndpointNameAvailabilityOutput + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def check_endpoint_name_availability( + self, + resource_group_name: str, + check_endpoint_name_availability_input: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CheckEndpointNameAvailabilityOutput: + """Check the availability of a resource name. This is needed for resources where name is globally + unique, such as a afdx endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param check_endpoint_name_availability_input: Input to check. Required. + :type check_endpoint_name_availability_input: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: CheckEndpointNameAvailabilityOutput. The CheckEndpointNameAvailabilityOutput is + compatible with MutableMapping + :rtype: ~azure.mgmt.cdn.models.CheckEndpointNameAvailabilityOutput + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def check_endpoint_name_availability( + self, + resource_group_name: str, + check_endpoint_name_availability_input: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CheckEndpointNameAvailabilityOutput: + """Check the availability of a resource name. This is needed for resources where name is globally + unique, such as a afdx endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param check_endpoint_name_availability_input: Input to check. Required. + :type check_endpoint_name_availability_input: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: CheckEndpointNameAvailabilityOutput. The CheckEndpointNameAvailabilityOutput is + compatible with MutableMapping + :rtype: ~azure.mgmt.cdn.models.CheckEndpointNameAvailabilityOutput + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def check_endpoint_name_availability( + self, + resource_group_name: str, + check_endpoint_name_availability_input: Union[_models.CheckEndpointNameAvailabilityInput, JSON, IO[bytes]], + **kwargs: Any + ) -> _models.CheckEndpointNameAvailabilityOutput: + """Check the availability of a resource name. This is needed for resources where name is globally + unique, such as a afdx endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param check_endpoint_name_availability_input: Input to check. Is one of the following types: + CheckEndpointNameAvailabilityInput, JSON, IO[bytes] Required. + :type check_endpoint_name_availability_input: + ~azure.mgmt.cdn.models.CheckEndpointNameAvailabilityInput or JSON or IO[bytes] + :return: CheckEndpointNameAvailabilityOutput. The CheckEndpointNameAvailabilityOutput is + compatible with MutableMapping + :rtype: ~azure.mgmt.cdn.models.CheckEndpointNameAvailabilityOutput + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.CheckEndpointNameAvailabilityOutput] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(check_endpoint_name_availability_input, (IOBase, bytes)): + _content = check_endpoint_name_availability_input + else: + _content = json.dumps(check_endpoint_name_availability_input, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_cdn_check_endpoint_name_availability_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.CheckEndpointNameAvailabilityOutput, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + def check_name_availability( + self, + check_name_availability_input: _models.CheckNameAvailabilityInput, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CheckNameAvailabilityOutput: + """Check the availability of a resource name. This is needed for resources where name is globally + unique, such as a CDN endpoint. + + :param check_name_availability_input: The request body. Required. + :type check_name_availability_input: ~azure.mgmt.cdn.models.CheckNameAvailabilityInput + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: CheckNameAvailabilityOutput. The CheckNameAvailabilityOutput is compatible with + MutableMapping + :rtype: ~azure.mgmt.cdn.models.CheckNameAvailabilityOutput + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def check_name_availability( + self, check_name_availability_input: JSON, *, content_type: str = "application/json", **kwargs: Any + ) -> _models.CheckNameAvailabilityOutput: + """Check the availability of a resource name. This is needed for resources where name is globally + unique, such as a CDN endpoint. + + :param check_name_availability_input: The request body. Required. + :type check_name_availability_input: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: CheckNameAvailabilityOutput. The CheckNameAvailabilityOutput is compatible with + MutableMapping + :rtype: ~azure.mgmt.cdn.models.CheckNameAvailabilityOutput + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def check_name_availability( + self, check_name_availability_input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any + ) -> _models.CheckNameAvailabilityOutput: + """Check the availability of a resource name. This is needed for resources where name is globally + unique, such as a CDN endpoint. + + :param check_name_availability_input: The request body. Required. + :type check_name_availability_input: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: CheckNameAvailabilityOutput. The CheckNameAvailabilityOutput is compatible with + MutableMapping + :rtype: ~azure.mgmt.cdn.models.CheckNameAvailabilityOutput + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def check_name_availability( + self, check_name_availability_input: Union[_models.CheckNameAvailabilityInput, JSON, IO[bytes]], **kwargs: Any + ) -> _models.CheckNameAvailabilityOutput: + """Check the availability of a resource name. This is needed for resources where name is globally + unique, such as a CDN endpoint. + + :param check_name_availability_input: The request body. Is one of the following types: + CheckNameAvailabilityInput, JSON, IO[bytes] Required. + :type check_name_availability_input: ~azure.mgmt.cdn.models.CheckNameAvailabilityInput or JSON + or IO[bytes] + :return: CheckNameAvailabilityOutput. The CheckNameAvailabilityOutput is compatible with + MutableMapping + :rtype: ~azure.mgmt.cdn.models.CheckNameAvailabilityOutput + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.CheckNameAvailabilityOutput] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(check_name_availability_input, (IOBase, bytes)): + _content = check_name_availability_input + else: + _content = json.dumps(check_name_availability_input, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_cdn_check_name_availability_request( + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.CheckNameAvailabilityOutput, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + def check_name_availability_with_subscription( # pylint: disable=name-too-long + self, + check_name_availability_input: _models.CheckNameAvailabilityInput, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CheckNameAvailabilityOutput: + """Check the availability of a resource name. This is needed for resources where name is globally + unique, such as a CDN endpoint. + + :param check_name_availability_input: The request body. Required. + :type check_name_availability_input: ~azure.mgmt.cdn.models.CheckNameAvailabilityInput + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: CheckNameAvailabilityOutput. The CheckNameAvailabilityOutput is compatible with + MutableMapping + :rtype: ~azure.mgmt.cdn.models.CheckNameAvailabilityOutput + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def check_name_availability_with_subscription( # pylint: disable=name-too-long + self, check_name_availability_input: JSON, *, content_type: str = "application/json", **kwargs: Any + ) -> _models.CheckNameAvailabilityOutput: + """Check the availability of a resource name. This is needed for resources where name is globally + unique, such as a CDN endpoint. + + :param check_name_availability_input: The request body. Required. + :type check_name_availability_input: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: CheckNameAvailabilityOutput. The CheckNameAvailabilityOutput is compatible with + MutableMapping + :rtype: ~azure.mgmt.cdn.models.CheckNameAvailabilityOutput + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def check_name_availability_with_subscription( # pylint: disable=name-too-long + self, check_name_availability_input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any + ) -> _models.CheckNameAvailabilityOutput: + """Check the availability of a resource name. This is needed for resources where name is globally + unique, such as a CDN endpoint. + + :param check_name_availability_input: The request body. Required. + :type check_name_availability_input: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: CheckNameAvailabilityOutput. The CheckNameAvailabilityOutput is compatible with + MutableMapping + :rtype: ~azure.mgmt.cdn.models.CheckNameAvailabilityOutput + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def check_name_availability_with_subscription( # pylint: disable=name-too-long + self, check_name_availability_input: Union[_models.CheckNameAvailabilityInput, JSON, IO[bytes]], **kwargs: Any + ) -> _models.CheckNameAvailabilityOutput: + """Check the availability of a resource name. This is needed for resources where name is globally + unique, such as a CDN endpoint. + + :param check_name_availability_input: The request body. Is one of the following types: + CheckNameAvailabilityInput, JSON, IO[bytes] Required. + :type check_name_availability_input: ~azure.mgmt.cdn.models.CheckNameAvailabilityInput or JSON + or IO[bytes] + :return: CheckNameAvailabilityOutput. The CheckNameAvailabilityOutput is compatible with + MutableMapping + :rtype: ~azure.mgmt.cdn.models.CheckNameAvailabilityOutput + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.CheckNameAvailabilityOutput] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(check_name_availability_input, (IOBase, bytes)): + _content = check_name_availability_input + else: + _content = json.dumps(check_name_availability_input, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_cdn_check_name_availability_with_subscription_request( + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.CheckNameAvailabilityOutput, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + def validate_probe( + self, validate_probe_input: _models.ValidateProbeInput, *, content_type: str = "application/json", **kwargs: Any + ) -> _models.ValidateProbeOutput: + """Check if the probe path is a valid path and the file can be accessed. Probe path is the path to + a file hosted on the origin server to help accelerate the delivery of dynamic content via the + CDN endpoint. This path is relative to the origin path specified in the endpoint configuration. + + :param validate_probe_input: The request body. Required. + :type validate_probe_input: ~azure.mgmt.cdn.models.ValidateProbeInput + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ValidateProbeOutput. The ValidateProbeOutput is compatible with MutableMapping + :rtype: ~azure.mgmt.cdn.models.ValidateProbeOutput + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def validate_probe( + self, validate_probe_input: JSON, *, content_type: str = "application/json", **kwargs: Any + ) -> _models.ValidateProbeOutput: + """Check if the probe path is a valid path and the file can be accessed. Probe path is the path to + a file hosted on the origin server to help accelerate the delivery of dynamic content via the + CDN endpoint. This path is relative to the origin path specified in the endpoint configuration. + + :param validate_probe_input: The request body. Required. + :type validate_probe_input: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ValidateProbeOutput. The ValidateProbeOutput is compatible with MutableMapping + :rtype: ~azure.mgmt.cdn.models.ValidateProbeOutput + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def validate_probe( + self, validate_probe_input: IO[bytes], *, content_type: str = "application/json", **kwargs: Any + ) -> _models.ValidateProbeOutput: + """Check if the probe path is a valid path and the file can be accessed. Probe path is the path to + a file hosted on the origin server to help accelerate the delivery of dynamic content via the + CDN endpoint. This path is relative to the origin path specified in the endpoint configuration. + + :param validate_probe_input: The request body. Required. + :type validate_probe_input: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: ValidateProbeOutput. The ValidateProbeOutput is compatible with MutableMapping + :rtype: ~azure.mgmt.cdn.models.ValidateProbeOutput + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def validate_probe( + self, validate_probe_input: Union[_models.ValidateProbeInput, JSON, IO[bytes]], **kwargs: Any + ) -> _models.ValidateProbeOutput: + """Check if the probe path is a valid path and the file can be accessed. Probe path is the path to + a file hosted on the origin server to help accelerate the delivery of dynamic content via the + CDN endpoint. This path is relative to the origin path specified in the endpoint configuration. + + :param validate_probe_input: The request body. Is one of the following types: + ValidateProbeInput, JSON, IO[bytes] Required. + :type validate_probe_input: ~azure.mgmt.cdn.models.ValidateProbeInput or JSON or IO[bytes] + :return: ValidateProbeOutput. The ValidateProbeOutput is compatible with MutableMapping + :rtype: ~azure.mgmt.cdn.models.ValidateProbeOutput + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ValidateProbeOutput] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(validate_probe_input, (IOBase, bytes)): + _content = validate_probe_input + else: + _content = json.dumps(validate_probe_input, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_cdn_validate_probe_request( + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ValidateProbeOutput, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_origin_groups_operations.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_origin_groups_operations.py deleted file mode 100644 index ddcd3620f58e..000000000000 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_origin_groups_operations.py +++ /dev/null @@ -1,1016 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression,too-many-lines -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.arm_polling import ARMPolling - -from .. import models as _models -from .._configuration import CdnManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_endpoint_request( - resource_group_name: str, profile_name: str, endpoint_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/originGroups", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), - "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, - profile_name: str, - endpoint_name: str, - origin_group_name: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/originGroups/{originGroupName}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), - "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, "str"), - "originGroupName": _SERIALIZER.url("origin_group_name", origin_group_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_request( - resource_group_name: str, - profile_name: str, - endpoint_name: str, - origin_group_name: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/originGroups/{originGroupName}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), - "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, "str"), - "originGroupName": _SERIALIZER.url("origin_group_name", origin_group_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_update_request( - resource_group_name: str, - profile_name: str, - endpoint_name: str, - origin_group_name: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/originGroups/{originGroupName}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), - "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, "str"), - "originGroupName": _SERIALIZER.url("origin_group_name", origin_group_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, - profile_name: str, - endpoint_name: str, - origin_group_name: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/originGroups/{originGroupName}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), - "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, "str"), - "originGroupName": _SERIALIZER.url("origin_group_name", origin_group_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -class OriginGroupsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.cdn.CdnManagementClient`'s - :attr:`origin_groups` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: CdnManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_endpoint( - self, resource_group_name: str, profile_name: str, endpoint_name: str, **kwargs: Any - ) -> ItemPaged["_models.OriginGroup"]: - """Lists all of the existing origin groups within an endpoint. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the CDN profile which is unique within the resource group. - Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :return: An iterator like instance of either OriginGroup or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cdn.models.OriginGroup] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.OriginGroupListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_endpoint_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - endpoint_name=endpoint_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("OriginGroupListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get( - self, resource_group_name: str, profile_name: str, endpoint_name: str, origin_group_name: str, **kwargs: Any - ) -> _models.OriginGroup: - """Gets an existing origin group within an endpoint. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the CDN profile which is unique within the resource group. - Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :param origin_group_name: Name of the origin group which is unique within the endpoint. - Required. - :type origin_group_name: str - :return: OriginGroup or the result of cls(response) - :rtype: ~azure.mgmt.cdn.models.OriginGroup - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.OriginGroup] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - endpoint_name=endpoint_name, - origin_group_name=origin_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("OriginGroup", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - def _create_initial( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - origin_group_name: str, - origin_group: Union[_models.OriginGroup, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(origin_group, (IOBase, bytes)): - _content = origin_group - else: - _json = self._serialize.body(origin_group, "OriginGroup") - - _request = build_create_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - endpoint_name=endpoint_name, - origin_group_name=origin_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_create( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - origin_group_name: str, - origin_group: _models.OriginGroup, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.OriginGroup]: - """Creates a new origin group within the specified endpoint. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the CDN profile which is unique within the resource group. - Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :param origin_group_name: Name of the origin group which is unique within the endpoint. - Required. - :type origin_group_name: str - :param origin_group: Origin group properties. Required. - :type origin_group: ~azure.mgmt.cdn.models.OriginGroup - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either OriginGroup or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.OriginGroup] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_create( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - origin_group_name: str, - origin_group: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.OriginGroup]: - """Creates a new origin group within the specified endpoint. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the CDN profile which is unique within the resource group. - Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :param origin_group_name: Name of the origin group which is unique within the endpoint. - Required. - :type origin_group_name: str - :param origin_group: Origin group properties. Required. - :type origin_group: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either OriginGroup or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.OriginGroup] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_create( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - origin_group_name: str, - origin_group: Union[_models.OriginGroup, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.OriginGroup]: - """Creates a new origin group within the specified endpoint. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the CDN profile which is unique within the resource group. - Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :param origin_group_name: Name of the origin group which is unique within the endpoint. - Required. - :type origin_group_name: str - :param origin_group: Origin group properties. Is either a OriginGroup type or a IO[bytes] type. - Required. - :type origin_group: ~azure.mgmt.cdn.models.OriginGroup or IO[bytes] - :return: An instance of LROPoller that returns either OriginGroup or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.OriginGroup] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.OriginGroup] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._create_initial( - resource_group_name=resource_group_name, - profile_name=profile_name, - endpoint_name=endpoint_name, - origin_group_name=origin_group_name, - origin_group=origin_group, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("OriginGroup", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.OriginGroup].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.OriginGroup]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _update_initial( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - origin_group_name: str, - origin_group_update_properties: Union[_models.OriginGroupUpdateParameters, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(origin_group_update_properties, (IOBase, bytes)): - _content = origin_group_update_properties - else: - _json = self._serialize.body(origin_group_update_properties, "OriginGroupUpdateParameters") - - _request = build_update_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - endpoint_name=endpoint_name, - origin_group_name=origin_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_update( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - origin_group_name: str, - origin_group_update_properties: _models.OriginGroupUpdateParameters, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.OriginGroup]: - """Updates an existing origin group within an endpoint. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the CDN profile which is unique within the resource group. - Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :param origin_group_name: Name of the origin group which is unique within the endpoint. - Required. - :type origin_group_name: str - :param origin_group_update_properties: Origin group properties. Required. - :type origin_group_update_properties: ~azure.mgmt.cdn.models.OriginGroupUpdateParameters - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either OriginGroup or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.OriginGroup] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_update( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - origin_group_name: str, - origin_group_update_properties: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.OriginGroup]: - """Updates an existing origin group within an endpoint. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the CDN profile which is unique within the resource group. - Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :param origin_group_name: Name of the origin group which is unique within the endpoint. - Required. - :type origin_group_name: str - :param origin_group_update_properties: Origin group properties. Required. - :type origin_group_update_properties: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either OriginGroup or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.OriginGroup] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_update( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - origin_group_name: str, - origin_group_update_properties: Union[_models.OriginGroupUpdateParameters, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.OriginGroup]: - """Updates an existing origin group within an endpoint. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the CDN profile which is unique within the resource group. - Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :param origin_group_name: Name of the origin group which is unique within the endpoint. - Required. - :type origin_group_name: str - :param origin_group_update_properties: Origin group properties. Is either a - OriginGroupUpdateParameters type or a IO[bytes] type. Required. - :type origin_group_update_properties: ~azure.mgmt.cdn.models.OriginGroupUpdateParameters or - IO[bytes] - :return: An instance of LROPoller that returns either OriginGroup or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.OriginGroup] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.OriginGroup] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._update_initial( - resource_group_name=resource_group_name, - profile_name=profile_name, - endpoint_name=endpoint_name, - origin_group_name=origin_group_name, - origin_group_update_properties=origin_group_update_properties, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("OriginGroup", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.OriginGroup].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.OriginGroup]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _delete_initial( - self, resource_group_name: str, profile_name: str, endpoint_name: str, origin_group_name: str, **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - endpoint_name=endpoint_name, - origin_group_name=origin_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_delete( - self, resource_group_name: str, profile_name: str, endpoint_name: str, origin_group_name: str, **kwargs: Any - ) -> LROPoller[None]: - """Deletes an existing origin group within an endpoint. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the CDN profile which is unique within the resource group. - Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :param origin_group_name: Name of the origin group which is unique within the endpoint. - Required. - :type origin_group_name: str - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - profile_name=profile_name, - endpoint_name=endpoint_name, - origin_group_name=origin_group_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_origins_operations.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_origins_operations.py deleted file mode 100644 index 369a08d395be..000000000000 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_origins_operations.py +++ /dev/null @@ -1,1000 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.arm_polling import ARMPolling - -from .. import models as _models -from .._configuration import CdnManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_endpoint_request( - resource_group_name: str, profile_name: str, endpoint_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/origins", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), - "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, - profile_name: str, - endpoint_name: str, - origin_name: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/origins/{originName}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), - "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, "str"), - "originName": _SERIALIZER.url("origin_name", origin_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_request( - resource_group_name: str, - profile_name: str, - endpoint_name: str, - origin_name: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/origins/{originName}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), - "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, "str"), - "originName": _SERIALIZER.url("origin_name", origin_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_update_request( - resource_group_name: str, - profile_name: str, - endpoint_name: str, - origin_name: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/origins/{originName}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), - "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, "str"), - "originName": _SERIALIZER.url("origin_name", origin_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, - profile_name: str, - endpoint_name: str, - origin_name: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/origins/{originName}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), - "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, "str"), - "originName": _SERIALIZER.url("origin_name", origin_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -class OriginsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.cdn.CdnManagementClient`'s - :attr:`origins` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: CdnManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_endpoint( - self, resource_group_name: str, profile_name: str, endpoint_name: str, **kwargs: Any - ) -> ItemPaged["_models.Origin"]: - """Lists all of the existing origins within an endpoint. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the CDN profile which is unique within the resource group. - Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :return: An iterator like instance of either Origin or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cdn.models.Origin] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.OriginListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_endpoint_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - endpoint_name=endpoint_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("OriginListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get( - self, resource_group_name: str, profile_name: str, endpoint_name: str, origin_name: str, **kwargs: Any - ) -> _models.Origin: - """Gets an existing origin within an endpoint. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the CDN profile which is unique within the resource group. - Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :param origin_name: Name of the origin which is unique within the endpoint. Required. - :type origin_name: str - :return: Origin or the result of cls(response) - :rtype: ~azure.mgmt.cdn.models.Origin - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.Origin] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - endpoint_name=endpoint_name, - origin_name=origin_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("Origin", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - def _create_initial( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - origin_name: str, - origin: Union[_models.Origin, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(origin, (IOBase, bytes)): - _content = origin - else: - _json = self._serialize.body(origin, "Origin") - - _request = build_create_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - endpoint_name=endpoint_name, - origin_name=origin_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_create( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - origin_name: str, - origin: _models.Origin, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.Origin]: - """Creates a new origin within the specified endpoint. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the CDN profile which is unique within the resource group. - Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :param origin_name: Name of the origin that is unique within the endpoint. Required. - :type origin_name: str - :param origin: Origin properties. Required. - :type origin: ~azure.mgmt.cdn.models.Origin - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either Origin or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.Origin] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_create( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - origin_name: str, - origin: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.Origin]: - """Creates a new origin within the specified endpoint. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the CDN profile which is unique within the resource group. - Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :param origin_name: Name of the origin that is unique within the endpoint. Required. - :type origin_name: str - :param origin: Origin properties. Required. - :type origin: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either Origin or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.Origin] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_create( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - origin_name: str, - origin: Union[_models.Origin, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.Origin]: - """Creates a new origin within the specified endpoint. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the CDN profile which is unique within the resource group. - Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :param origin_name: Name of the origin that is unique within the endpoint. Required. - :type origin_name: str - :param origin: Origin properties. Is either a Origin type or a IO[bytes] type. Required. - :type origin: ~azure.mgmt.cdn.models.Origin or IO[bytes] - :return: An instance of LROPoller that returns either Origin or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.Origin] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.Origin] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._create_initial( - resource_group_name=resource_group_name, - profile_name=profile_name, - endpoint_name=endpoint_name, - origin_name=origin_name, - origin=origin, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("Origin", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.Origin].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.Origin]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _update_initial( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - origin_name: str, - origin_update_properties: Union[_models.OriginUpdateParameters, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(origin_update_properties, (IOBase, bytes)): - _content = origin_update_properties - else: - _json = self._serialize.body(origin_update_properties, "OriginUpdateParameters") - - _request = build_update_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - endpoint_name=endpoint_name, - origin_name=origin_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_update( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - origin_name: str, - origin_update_properties: _models.OriginUpdateParameters, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.Origin]: - """Updates an existing origin within an endpoint. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the CDN profile which is unique within the resource group. - Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :param origin_name: Name of the origin which is unique within the endpoint. Required. - :type origin_name: str - :param origin_update_properties: Origin properties. Required. - :type origin_update_properties: ~azure.mgmt.cdn.models.OriginUpdateParameters - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either Origin or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.Origin] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_update( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - origin_name: str, - origin_update_properties: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.Origin]: - """Updates an existing origin within an endpoint. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the CDN profile which is unique within the resource group. - Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :param origin_name: Name of the origin which is unique within the endpoint. Required. - :type origin_name: str - :param origin_update_properties: Origin properties. Required. - :type origin_update_properties: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either Origin or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.Origin] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_update( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - origin_name: str, - origin_update_properties: Union[_models.OriginUpdateParameters, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.Origin]: - """Updates an existing origin within an endpoint. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the CDN profile which is unique within the resource group. - Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :param origin_name: Name of the origin which is unique within the endpoint. Required. - :type origin_name: str - :param origin_update_properties: Origin properties. Is either a OriginUpdateParameters type or - a IO[bytes] type. Required. - :type origin_update_properties: ~azure.mgmt.cdn.models.OriginUpdateParameters or IO[bytes] - :return: An instance of LROPoller that returns either Origin or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.Origin] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.Origin] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._update_initial( - resource_group_name=resource_group_name, - profile_name=profile_name, - endpoint_name=endpoint_name, - origin_name=origin_name, - origin_update_properties=origin_update_properties, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("Origin", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.Origin].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.Origin]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _delete_initial( - self, resource_group_name: str, profile_name: str, endpoint_name: str, origin_name: str, **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - endpoint_name=endpoint_name, - origin_name=origin_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_delete( - self, resource_group_name: str, profile_name: str, endpoint_name: str, origin_name: str, **kwargs: Any - ) -> LROPoller[None]: - """Deletes an existing origin within an endpoint. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the CDN profile which is unique within the resource group. - Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :param origin_name: Name of the origin which is unique within the endpoint. Required. - :type origin_name: str - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - profile_name=profile_name, - endpoint_name=endpoint_name, - origin_name=origin_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_patch.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_patch.py index 49900f6ab120..ea765788358a 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_patch.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_patch.py @@ -1,15 +1,14 @@ -# ------------------------------------ -# Copyright (c) Microsoft Corporation. -# Licensed under the MIT License. -# ------------------------------------ - +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------- """Customize generated code here. Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ -from typing import List -__all__: List[str] = [] # Add all objects you want publicly available to users at this package level +__all__: list[str] = [] # Add all objects you want publicly available to users at this package level def patch_sdk(): diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_policies_operations.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_policies_operations.py deleted file mode 100644 index 3f3c05f64751..000000000000 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_policies_operations.py +++ /dev/null @@ -1,844 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.arm_polling import ARMPolling - -from .. import models as _models -from .._configuration import CdnManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_request(resource_group_name: str, subscription_id: str, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/cdnWebApplicationFirewallPolicies", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request(resource_group_name: str, policy_name: str, subscription_id: str, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/cdnWebApplicationFirewallPolicies/{policyName}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "policyName": _SERIALIZER.url("policy_name", policy_name, "str", max_length=128), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_request( - resource_group_name: str, policy_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/cdnWebApplicationFirewallPolicies/{policyName}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "policyName": _SERIALIZER.url("policy_name", policy_name, "str", max_length=128), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_update_request( - resource_group_name: str, policy_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/cdnWebApplicationFirewallPolicies/{policyName}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "policyName": _SERIALIZER.url("policy_name", policy_name, "str", max_length=128), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, policy_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/cdnWebApplicationFirewallPolicies/{policyName}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "policyName": _SERIALIZER.url("policy_name", policy_name, "str", max_length=128), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -class PoliciesOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.cdn.CdnManagementClient`'s - :attr:`policies` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: CdnManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list(self, resource_group_name: str, **kwargs: Any) -> ItemPaged["_models.CdnWebApplicationFirewallPolicy"]: - """Lists all of the protection policies within a resource group. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :return: An iterator like instance of either CdnWebApplicationFirewallPolicy or the result of - cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cdn.models.CdnWebApplicationFirewallPolicy] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.CdnWebApplicationFirewallPolicyList] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_request( - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("CdnWebApplicationFirewallPolicyList", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get(self, resource_group_name: str, policy_name: str, **kwargs: Any) -> _models.CdnWebApplicationFirewallPolicy: - """Retrieve protection policy with specified name within a resource group. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param policy_name: The name of the CdnWebApplicationFirewallPolicy. Required. - :type policy_name: str - :return: CdnWebApplicationFirewallPolicy or the result of cls(response) - :rtype: ~azure.mgmt.cdn.models.CdnWebApplicationFirewallPolicy - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.CdnWebApplicationFirewallPolicy] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - policy_name=policy_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("CdnWebApplicationFirewallPolicy", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - def _create_or_update_initial( - self, - resource_group_name: str, - policy_name: str, - cdn_web_application_firewall_policy: Union[_models.CdnWebApplicationFirewallPolicy, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(cdn_web_application_firewall_policy, (IOBase, bytes)): - _content = cdn_web_application_firewall_policy - else: - _json = self._serialize.body(cdn_web_application_firewall_policy, "CdnWebApplicationFirewallPolicy") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - policy_name=policy_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_create_or_update( - self, - resource_group_name: str, - policy_name: str, - cdn_web_application_firewall_policy: _models.CdnWebApplicationFirewallPolicy, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.CdnWebApplicationFirewallPolicy]: - """Create or update policy with specified rule set name within a resource group. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param policy_name: The name of the CdnWebApplicationFirewallPolicy. Required. - :type policy_name: str - :param cdn_web_application_firewall_policy: Policy to be created. Required. - :type cdn_web_application_firewall_policy: - ~azure.mgmt.cdn.models.CdnWebApplicationFirewallPolicy - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either CdnWebApplicationFirewallPolicy or the - result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.CdnWebApplicationFirewallPolicy] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_create_or_update( - self, - resource_group_name: str, - policy_name: str, - cdn_web_application_firewall_policy: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.CdnWebApplicationFirewallPolicy]: - """Create or update policy with specified rule set name within a resource group. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param policy_name: The name of the CdnWebApplicationFirewallPolicy. Required. - :type policy_name: str - :param cdn_web_application_firewall_policy: Policy to be created. Required. - :type cdn_web_application_firewall_policy: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either CdnWebApplicationFirewallPolicy or the - result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.CdnWebApplicationFirewallPolicy] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_create_or_update( - self, - resource_group_name: str, - policy_name: str, - cdn_web_application_firewall_policy: Union[_models.CdnWebApplicationFirewallPolicy, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.CdnWebApplicationFirewallPolicy]: - """Create or update policy with specified rule set name within a resource group. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param policy_name: The name of the CdnWebApplicationFirewallPolicy. Required. - :type policy_name: str - :param cdn_web_application_firewall_policy: Policy to be created. Is either a - CdnWebApplicationFirewallPolicy type or a IO[bytes] type. Required. - :type cdn_web_application_firewall_policy: - ~azure.mgmt.cdn.models.CdnWebApplicationFirewallPolicy or IO[bytes] - :return: An instance of LROPoller that returns either CdnWebApplicationFirewallPolicy or the - result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.CdnWebApplicationFirewallPolicy] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CdnWebApplicationFirewallPolicy] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - policy_name=policy_name, - cdn_web_application_firewall_policy=cdn_web_application_firewall_policy, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CdnWebApplicationFirewallPolicy", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.CdnWebApplicationFirewallPolicy].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.CdnWebApplicationFirewallPolicy]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _update_initial( - self, - resource_group_name: str, - policy_name: str, - cdn_web_application_firewall_policy_patch_parameters: Union[ - _models.CdnWebApplicationFirewallPolicyPatchParameters, IO[bytes] - ], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(cdn_web_application_firewall_policy_patch_parameters, (IOBase, bytes)): - _content = cdn_web_application_firewall_policy_patch_parameters - else: - _json = self._serialize.body( - cdn_web_application_firewall_policy_patch_parameters, "CdnWebApplicationFirewallPolicyPatchParameters" - ) - - _request = build_update_request( - resource_group_name=resource_group_name, - policy_name=policy_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_update( - self, - resource_group_name: str, - policy_name: str, - cdn_web_application_firewall_policy_patch_parameters: _models.CdnWebApplicationFirewallPolicyPatchParameters, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.CdnWebApplicationFirewallPolicy]: - """Update an existing CdnWebApplicationFirewallPolicy with the specified policy name under the - specified subscription and resource group. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param policy_name: The name of the CdnWebApplicationFirewallPolicy. Required. - :type policy_name: str - :param cdn_web_application_firewall_policy_patch_parameters: CdnWebApplicationFirewallPolicy - parameters to be patched. Required. - :type cdn_web_application_firewall_policy_patch_parameters: - ~azure.mgmt.cdn.models.CdnWebApplicationFirewallPolicyPatchParameters - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either CdnWebApplicationFirewallPolicy or the - result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.CdnWebApplicationFirewallPolicy] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_update( - self, - resource_group_name: str, - policy_name: str, - cdn_web_application_firewall_policy_patch_parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.CdnWebApplicationFirewallPolicy]: - """Update an existing CdnWebApplicationFirewallPolicy with the specified policy name under the - specified subscription and resource group. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param policy_name: The name of the CdnWebApplicationFirewallPolicy. Required. - :type policy_name: str - :param cdn_web_application_firewall_policy_patch_parameters: CdnWebApplicationFirewallPolicy - parameters to be patched. Required. - :type cdn_web_application_firewall_policy_patch_parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either CdnWebApplicationFirewallPolicy or the - result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.CdnWebApplicationFirewallPolicy] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_update( - self, - resource_group_name: str, - policy_name: str, - cdn_web_application_firewall_policy_patch_parameters: Union[ - _models.CdnWebApplicationFirewallPolicyPatchParameters, IO[bytes] - ], - **kwargs: Any - ) -> LROPoller[_models.CdnWebApplicationFirewallPolicy]: - """Update an existing CdnWebApplicationFirewallPolicy with the specified policy name under the - specified subscription and resource group. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param policy_name: The name of the CdnWebApplicationFirewallPolicy. Required. - :type policy_name: str - :param cdn_web_application_firewall_policy_patch_parameters: CdnWebApplicationFirewallPolicy - parameters to be patched. Is either a CdnWebApplicationFirewallPolicyPatchParameters type or a - IO[bytes] type. Required. - :type cdn_web_application_firewall_policy_patch_parameters: - ~azure.mgmt.cdn.models.CdnWebApplicationFirewallPolicyPatchParameters or IO[bytes] - :return: An instance of LROPoller that returns either CdnWebApplicationFirewallPolicy or the - result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.CdnWebApplicationFirewallPolicy] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CdnWebApplicationFirewallPolicy] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._update_initial( - resource_group_name=resource_group_name, - policy_name=policy_name, - cdn_web_application_firewall_policy_patch_parameters=cdn_web_application_firewall_policy_patch_parameters, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CdnWebApplicationFirewallPolicy", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.CdnWebApplicationFirewallPolicy].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.CdnWebApplicationFirewallPolicy]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - @distributed_trace - def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, policy_name: str, **kwargs: Any - ) -> None: - """Deletes Policy. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param policy_name: The name of the CdnWebApplicationFirewallPolicy. Required. - :type policy_name: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - policy_name=policy_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_profiles_operations.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_profiles_operations.py deleted file mode 100644 index 49970f9f4282..000000000000 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_profiles_operations.py +++ /dev/null @@ -1,2447 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression,too-many-lines -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.arm_polling import ARMPolling - -from .. import models as _models -from .._configuration import CdnManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_request(subscription_id: str, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Cdn/profiles") - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_list_by_resource_group_request(resource_group_name: str, subscription_id: str, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request(resource_group_name: str, profile_name: str, subscription_id: str, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_request( - resource_group_name: str, profile_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_update_request( - resource_group_name: str, profile_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, profile_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_can_migrate_request(resource_group_name: str, subscription_id: str, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/canMigrate", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_migrate_request(resource_group_name: str, subscription_id: str, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/migrate", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_migration_commit_request( - resource_group_name: str, profile_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/migrationCommit", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_generate_sso_uri_request( - resource_group_name: str, profile_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/generateSsoUri", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_list_supported_optimization_types_request( # pylint: disable=name-too-long - resource_group_name: str, profile_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/getSupportedOptimizationTypes", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_list_resource_usage_request( - resource_group_name: str, profile_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/checkResourceUsage", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "profileName": _SERIALIZER.url("profile_name", profile_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_cdn_can_migrate_to_afd_request( - resource_group_name: str, profile_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/cdnCanMigrateToAfd", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "profileName": _SERIALIZER.url( - "profile_name", profile_name, "str", max_length=260, min_length=1, pattern=r"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$" - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_cdn_migrate_to_afd_request( - resource_group_name: str, profile_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/cdnMigrateToAfd", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "profileName": _SERIALIZER.url( - "profile_name", profile_name, "str", max_length=260, min_length=1, pattern=r"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$" - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_migration_abort_request( - resource_group_name: str, profile_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/migrationAbort", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "profileName": _SERIALIZER.url( - "profile_name", profile_name, "str", max_length=260, min_length=1, pattern=r"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$" - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -class ProfilesOperations: # pylint: disable=too-many-public-methods - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.cdn.CdnManagementClient`'s - :attr:`profiles` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: CdnManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list(self, **kwargs: Any) -> ItemPaged["_models.Profile"]: - """Lists all of the Azure Front Door Standard, Azure Front Door Premium, and CDN profiles within - an Azure subscription. - - :return: An iterator like instance of either Profile or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cdn.models.Profile] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ProfileListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_request( - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("ProfileListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> ItemPaged["_models.Profile"]: - """Lists all of the Azure Front Door Standard, Azure Front Door Premium, and CDN profiles within a - resource group. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :return: An iterator like instance of either Profile or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cdn.models.Profile] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ProfileListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_resource_group_request( - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("ProfileListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get(self, resource_group_name: str, profile_name: str, **kwargs: Any) -> _models.Profile: - """Gets an Azure Front Door Standard or Azure Front Door Premium or CDN profile with the specified - profile name under the specified subscription and resource group. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN - profile which is unique within the resource group. Required. - :type profile_name: str - :return: Profile or the result of cls(response) - :rtype: ~azure.mgmt.cdn.models.Profile - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.Profile] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("Profile", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - def _create_initial( - self, resource_group_name: str, profile_name: str, profile: Union[_models.Profile, IO[bytes]], **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(profile, (IOBase, bytes)): - _content = profile - else: - _json = self._serialize.body(profile, "Profile") - - _request = build_create_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_create( - self, - resource_group_name: str, - profile_name: str, - profile: _models.Profile, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.Profile]: - """Creates a new Azure Front Door Standard or Azure Front Door Premium or CDN profile with a - profile name under the specified subscription and resource group. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN - profile which is unique within the resource group. Required. - :type profile_name: str - :param profile: Profile properties needed to create a new profile. Required. - :type profile: ~azure.mgmt.cdn.models.Profile - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either Profile or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.Profile] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_create( - self, - resource_group_name: str, - profile_name: str, - profile: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.Profile]: - """Creates a new Azure Front Door Standard or Azure Front Door Premium or CDN profile with a - profile name under the specified subscription and resource group. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN - profile which is unique within the resource group. Required. - :type profile_name: str - :param profile: Profile properties needed to create a new profile. Required. - :type profile: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either Profile or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.Profile] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_create( - self, resource_group_name: str, profile_name: str, profile: Union[_models.Profile, IO[bytes]], **kwargs: Any - ) -> LROPoller[_models.Profile]: - """Creates a new Azure Front Door Standard or Azure Front Door Premium or CDN profile with a - profile name under the specified subscription and resource group. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN - profile which is unique within the resource group. Required. - :type profile_name: str - :param profile: Profile properties needed to create a new profile. Is either a Profile type or - a IO[bytes] type. Required. - :type profile: ~azure.mgmt.cdn.models.Profile or IO[bytes] - :return: An instance of LROPoller that returns either Profile or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.Profile] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.Profile] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._create_initial( - resource_group_name=resource_group_name, - profile_name=profile_name, - profile=profile, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("Profile", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.Profile].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.Profile]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _update_initial( - self, - resource_group_name: str, - profile_name: str, - profile_update_parameters: Union[_models.ProfileUpdateParameters, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(profile_update_parameters, (IOBase, bytes)): - _content = profile_update_parameters - else: - _json = self._serialize.body(profile_update_parameters, "ProfileUpdateParameters") - - _request = build_update_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_update( - self, - resource_group_name: str, - profile_name: str, - profile_update_parameters: _models.ProfileUpdateParameters, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.Profile]: - """Updates an existing Azure Front Door Standard or Azure Front Door Premium or CDN profile with - the specified profile name under the specified subscription and resource group. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN - profile which is unique within the resource group. Required. - :type profile_name: str - :param profile_update_parameters: Profile properties needed to update an existing profile. - Required. - :type profile_update_parameters: ~azure.mgmt.cdn.models.ProfileUpdateParameters - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either Profile or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.Profile] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_update( - self, - resource_group_name: str, - profile_name: str, - profile_update_parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.Profile]: - """Updates an existing Azure Front Door Standard or Azure Front Door Premium or CDN profile with - the specified profile name under the specified subscription and resource group. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN - profile which is unique within the resource group. Required. - :type profile_name: str - :param profile_update_parameters: Profile properties needed to update an existing profile. - Required. - :type profile_update_parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either Profile or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.Profile] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_update( - self, - resource_group_name: str, - profile_name: str, - profile_update_parameters: Union[_models.ProfileUpdateParameters, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.Profile]: - """Updates an existing Azure Front Door Standard or Azure Front Door Premium or CDN profile with - the specified profile name under the specified subscription and resource group. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN - profile which is unique within the resource group. Required. - :type profile_name: str - :param profile_update_parameters: Profile properties needed to update an existing profile. Is - either a ProfileUpdateParameters type or a IO[bytes] type. Required. - :type profile_update_parameters: ~azure.mgmt.cdn.models.ProfileUpdateParameters or IO[bytes] - :return: An instance of LROPoller that returns either Profile or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.Profile] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.Profile] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._update_initial( - resource_group_name=resource_group_name, - profile_name=profile_name, - profile_update_parameters=profile_update_parameters, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("Profile", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.Profile].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.Profile]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _delete_initial(self, resource_group_name: str, profile_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_delete(self, resource_group_name: str, profile_name: str, **kwargs: Any) -> LROPoller[None]: - """Deletes an existing Azure Front Door Standard or Azure Front Door Premium or CDN profile with - the specified parameters. Deleting a profile will result in the deletion of all of the - sub-resources including endpoints, origins and custom domains. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN - profile which is unique within the resource group. Required. - :type profile_name: str - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - profile_name=profile_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - def _can_migrate_initial( - self, - resource_group_name: str, - can_migrate_parameters: Union[_models.CanMigrateParameters, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(can_migrate_parameters, (IOBase, bytes)): - _content = can_migrate_parameters - else: - _json = self._serialize.body(can_migrate_parameters, "CanMigrateParameters") - - _request = build_can_migrate_request( - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_can_migrate( - self, - resource_group_name: str, - can_migrate_parameters: _models.CanMigrateParameters, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.CanMigrateResult]: - """Checks if CDN profile can be migrated to Azure Frontdoor(Standard/Premium) profile. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param can_migrate_parameters: Properties needed to check if cdn profile or classic frontdoor - can be migrated. Required. - :type can_migrate_parameters: ~azure.mgmt.cdn.models.CanMigrateParameters - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either CanMigrateResult or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.CanMigrateResult] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_can_migrate( - self, - resource_group_name: str, - can_migrate_parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.CanMigrateResult]: - """Checks if CDN profile can be migrated to Azure Frontdoor(Standard/Premium) profile. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param can_migrate_parameters: Properties needed to check if cdn profile or classic frontdoor - can be migrated. Required. - :type can_migrate_parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either CanMigrateResult or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.CanMigrateResult] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_can_migrate( - self, - resource_group_name: str, - can_migrate_parameters: Union[_models.CanMigrateParameters, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.CanMigrateResult]: - """Checks if CDN profile can be migrated to Azure Frontdoor(Standard/Premium) profile. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param can_migrate_parameters: Properties needed to check if cdn profile or classic frontdoor - can be migrated. Is either a CanMigrateParameters type or a IO[bytes] type. Required. - :type can_migrate_parameters: ~azure.mgmt.cdn.models.CanMigrateParameters or IO[bytes] - :return: An instance of LROPoller that returns either CanMigrateResult or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.CanMigrateResult] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CanMigrateResult] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._can_migrate_initial( - resource_group_name=resource_group_name, - can_migrate_parameters=can_migrate_parameters, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CanMigrateResult", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.CanMigrateResult].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.CanMigrateResult]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _migrate_initial( - self, - resource_group_name: str, - migration_parameters: Union[_models.MigrationParameters, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(migration_parameters, (IOBase, bytes)): - _content = migration_parameters - else: - _json = self._serialize.body(migration_parameters, "MigrationParameters") - - _request = build_migrate_request( - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_migrate( - self, - resource_group_name: str, - migration_parameters: _models.MigrationParameters, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.MigrateResult]: - """Migrate the CDN profile to Azure Frontdoor(Standard/Premium) profile. The change need to be - committed after this. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param migration_parameters: Properties needed to migrate the profile. Required. - :type migration_parameters: ~azure.mgmt.cdn.models.MigrationParameters - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either MigrateResult or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.MigrateResult] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_migrate( - self, - resource_group_name: str, - migration_parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.MigrateResult]: - """Migrate the CDN profile to Azure Frontdoor(Standard/Premium) profile. The change need to be - committed after this. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param migration_parameters: Properties needed to migrate the profile. Required. - :type migration_parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either MigrateResult or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.MigrateResult] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_migrate( - self, - resource_group_name: str, - migration_parameters: Union[_models.MigrationParameters, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.MigrateResult]: - """Migrate the CDN profile to Azure Frontdoor(Standard/Premium) profile. The change need to be - committed after this. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param migration_parameters: Properties needed to migrate the profile. Is either a - MigrationParameters type or a IO[bytes] type. Required. - :type migration_parameters: ~azure.mgmt.cdn.models.MigrationParameters or IO[bytes] - :return: An instance of LROPoller that returns either MigrateResult or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.MigrateResult] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.MigrateResult] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._migrate_initial( - resource_group_name=resource_group_name, - migration_parameters=migration_parameters, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("MigrateResult", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.MigrateResult].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.MigrateResult]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _migration_commit_initial(self, resource_group_name: str, profile_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_migration_commit_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_migration_commit(self, resource_group_name: str, profile_name: str, **kwargs: Any) -> LROPoller[None]: - """Commit the migrated Azure Frontdoor(Standard/Premium) profile. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the CDN profile which is unique within the resource group. - Required. - :type profile_name: str - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._migration_commit_initial( - resource_group_name=resource_group_name, - profile_name=profile_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - @distributed_trace - def generate_sso_uri(self, resource_group_name: str, profile_name: str, **kwargs: Any) -> _models.SsoUri: - """Generates a dynamic SSO URI used to sign in to the CDN supplemental portal. Supplemental portal - is used to configure advanced feature capabilities that are not yet available in the Azure - portal, such as core reports in a standard profile; rules engine, advanced HTTP reports, and - real-time stats and alerts in a premium profile. The SSO URI changes approximately every 10 - minutes. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the CDN profile which is unique within the resource group. - Required. - :type profile_name: str - :return: SsoUri or the result of cls(response) - :rtype: ~azure.mgmt.cdn.models.SsoUri - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.SsoUri] = kwargs.pop("cls", None) - - _request = build_generate_sso_uri_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("SsoUri", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def list_supported_optimization_types( - self, resource_group_name: str, profile_name: str, **kwargs: Any - ) -> _models.SupportedOptimizationTypesListResult: - """Gets the supported optimization types for the current profile. A user can create an endpoint - with an optimization type from the listed values. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN - profile which is unique within the resource group. Required. - :type profile_name: str - :return: SupportedOptimizationTypesListResult or the result of cls(response) - :rtype: ~azure.mgmt.cdn.models.SupportedOptimizationTypesListResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.SupportedOptimizationTypesListResult] = kwargs.pop("cls", None) - - _request = build_list_supported_optimization_types_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("SupportedOptimizationTypesListResult", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def list_resource_usage( - self, resource_group_name: str, profile_name: str, **kwargs: Any - ) -> ItemPaged["_models.ResourceUsage"]: - """Checks the quota and actual usage of endpoints under the given Azure Front Door Standard or - Azure Front Door Premium or CDN profile. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN - profile which is unique within the resource group. Required. - :type profile_name: str - :return: An iterator like instance of either ResourceUsage or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cdn.models.ResourceUsage] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ResourceUsageListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_resource_usage_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("ResourceUsageListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - def _cdn_can_migrate_to_afd_initial( - self, resource_group_name: str, profile_name: str, **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_cdn_can_migrate_to_afd_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_cdn_can_migrate_to_afd( - self, resource_group_name: str, profile_name: str, **kwargs: Any - ) -> LROPoller[_models.CanMigrateResult]: - """Checks if CDN profile can be migrated to Azure Frontdoor(Standard/Premium) profile. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :return: An instance of LROPoller that returns either CanMigrateResult or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.CanMigrateResult] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.CanMigrateResult] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._cdn_can_migrate_to_afd_initial( - resource_group_name=resource_group_name, - profile_name=profile_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CanMigrateResult", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.CanMigrateResult].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.CanMigrateResult]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _cdn_migrate_to_afd_initial( - self, - resource_group_name: str, - profile_name: str, - migration_parameters: Union[_models.CdnMigrationToAfdParameters, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(migration_parameters, (IOBase, bytes)): - _content = migration_parameters - else: - _json = self._serialize.body(migration_parameters, "CdnMigrationToAfdParameters") - - _request = build_cdn_migrate_to_afd_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_cdn_migrate_to_afd( - self, - resource_group_name: str, - profile_name: str, - migration_parameters: _models.CdnMigrationToAfdParameters, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.MigrateResult]: - """Migrate the CDN profile to Azure Frontdoor(Standard/Premium) profile. This step prepares the - profile for migration and will be followed by Commit to finalize the migration. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param migration_parameters: Properties needed to migrate the profile. Required. - :type migration_parameters: ~azure.mgmt.cdn.models.CdnMigrationToAfdParameters - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either MigrateResult or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.MigrateResult] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_cdn_migrate_to_afd( - self, - resource_group_name: str, - profile_name: str, - migration_parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.MigrateResult]: - """Migrate the CDN profile to Azure Frontdoor(Standard/Premium) profile. This step prepares the - profile for migration and will be followed by Commit to finalize the migration. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param migration_parameters: Properties needed to migrate the profile. Required. - :type migration_parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either MigrateResult or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.MigrateResult] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_cdn_migrate_to_afd( - self, - resource_group_name: str, - profile_name: str, - migration_parameters: Union[_models.CdnMigrationToAfdParameters, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.MigrateResult]: - """Migrate the CDN profile to Azure Frontdoor(Standard/Premium) profile. This step prepares the - profile for migration and will be followed by Commit to finalize the migration. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param migration_parameters: Properties needed to migrate the profile. Is either a - CdnMigrationToAfdParameters type or a IO[bytes] type. Required. - :type migration_parameters: ~azure.mgmt.cdn.models.CdnMigrationToAfdParameters or IO[bytes] - :return: An instance of LROPoller that returns either MigrateResult or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.MigrateResult] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.MigrateResult] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._cdn_migrate_to_afd_initial( - resource_group_name=resource_group_name, - profile_name=profile_name, - migration_parameters=migration_parameters, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("MigrateResult", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.MigrateResult].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.MigrateResult]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _migration_abort_initial(self, resource_group_name: str, profile_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_migration_abort_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_migration_abort(self, resource_group_name: str, profile_name: str, **kwargs: Any) -> LROPoller[None]: - """Abort the migration to Azure Frontdoor Premium/Standard. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._migration_abort_initial( - resource_group_name=resource_group_name, - profile_name=profile_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_resource_usage_operations.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_resource_usage_operations.py deleted file mode 100644 index a495f1961691..000000000000 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_resource_usage_operations.py +++ /dev/null @@ -1,159 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from typing import Any, Callable, Optional, TypeVar -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import CdnManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_request(subscription_id: str, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Cdn/checkResourceUsage") - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -class ResourceUsageOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.cdn.CdnManagementClient`'s - :attr:`resource_usage` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: CdnManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list(self, **kwargs: Any) -> ItemPaged["_models.ResourceUsage"]: - """Check the quota and actual usage of the CDN profiles under the given subscription. - - :return: An iterator like instance of either ResourceUsage or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cdn.models.ResourceUsage] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ResourceUsageListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_request( - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("ResourceUsageListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_routes_operations.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_routes_operations.py deleted file mode 100644 index 269e4d0b86ec..000000000000 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_routes_operations.py +++ /dev/null @@ -1,1024 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression,too-many-lines -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.arm_polling import ARMPolling - -from .. import models as _models -from .._configuration import CdnManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_endpoint_request( - resource_group_name: str, profile_name: str, endpoint_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints/{endpointName}/routes", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "profileName": _SERIALIZER.url( - "profile_name", profile_name, "str", max_length=260, min_length=1, pattern=r"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$" - ), - "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, - profile_name: str, - endpoint_name: str, - route_name: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints/{endpointName}/routes/{routeName}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "profileName": _SERIALIZER.url( - "profile_name", profile_name, "str", max_length=260, min_length=1, pattern=r"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$" - ), - "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, "str"), - "routeName": _SERIALIZER.url("route_name", route_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_request( - resource_group_name: str, - profile_name: str, - endpoint_name: str, - route_name: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints/{endpointName}/routes/{routeName}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "profileName": _SERIALIZER.url( - "profile_name", profile_name, "str", max_length=260, min_length=1, pattern=r"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$" - ), - "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, "str"), - "routeName": _SERIALIZER.url("route_name", route_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_update_request( - resource_group_name: str, - profile_name: str, - endpoint_name: str, - route_name: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints/{endpointName}/routes/{routeName}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "profileName": _SERIALIZER.url( - "profile_name", profile_name, "str", max_length=260, min_length=1, pattern=r"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$" - ), - "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, "str"), - "routeName": _SERIALIZER.url("route_name", route_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, - profile_name: str, - endpoint_name: str, - route_name: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints/{endpointName}/routes/{routeName}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "profileName": _SERIALIZER.url( - "profile_name", profile_name, "str", max_length=260, min_length=1, pattern=r"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$" - ), - "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, "str"), - "routeName": _SERIALIZER.url("route_name", route_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -class RoutesOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.cdn.CdnManagementClient`'s - :attr:`routes` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: CdnManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_endpoint( - self, resource_group_name: str, profile_name: str, endpoint_name: str, **kwargs: Any - ) -> ItemPaged["_models.Route"]: - """Lists all of the existing origins within a profile. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :return: An iterator like instance of either Route or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cdn.models.Route] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.RouteListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_endpoint_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - endpoint_name=endpoint_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("RouteListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get( - self, resource_group_name: str, profile_name: str, endpoint_name: str, route_name: str, **kwargs: Any - ) -> _models.Route: - """Gets an existing route with the specified route name under the specified subscription, resource - group, profile, and AzureFrontDoor endpoint. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :param route_name: Name of the routing rule. Required. - :type route_name: str - :return: Route or the result of cls(response) - :rtype: ~azure.mgmt.cdn.models.Route - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.Route] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - endpoint_name=endpoint_name, - route_name=route_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("Route", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - def _create_initial( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - route_name: str, - route: Union[_models.Route, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(route, (IOBase, bytes)): - _content = route - else: - _json = self._serialize.body(route, "Route") - - _request = build_create_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - endpoint_name=endpoint_name, - route_name=route_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_create( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - route_name: str, - route: _models.Route, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.Route]: - """Creates a new route with the specified route name under the specified subscription, resource - group, profile, and AzureFrontDoor endpoint. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :param route_name: Name of the routing rule. Required. - :type route_name: str - :param route: Route properties. Required. - :type route: ~azure.mgmt.cdn.models.Route - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either Route or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.Route] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_create( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - route_name: str, - route: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.Route]: - """Creates a new route with the specified route name under the specified subscription, resource - group, profile, and AzureFrontDoor endpoint. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :param route_name: Name of the routing rule. Required. - :type route_name: str - :param route: Route properties. Required. - :type route: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either Route or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.Route] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_create( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - route_name: str, - route: Union[_models.Route, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.Route]: - """Creates a new route with the specified route name under the specified subscription, resource - group, profile, and AzureFrontDoor endpoint. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :param route_name: Name of the routing rule. Required. - :type route_name: str - :param route: Route properties. Is either a Route type or a IO[bytes] type. Required. - :type route: ~azure.mgmt.cdn.models.Route or IO[bytes] - :return: An instance of LROPoller that returns either Route or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.Route] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.Route] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._create_initial( - resource_group_name=resource_group_name, - profile_name=profile_name, - endpoint_name=endpoint_name, - route_name=route_name, - route=route, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("Route", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.Route].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.Route]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _update_initial( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - route_name: str, - route_update_properties: Union[_models.RouteUpdateParameters, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(route_update_properties, (IOBase, bytes)): - _content = route_update_properties - else: - _json = self._serialize.body(route_update_properties, "RouteUpdateParameters") - - _request = build_update_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - endpoint_name=endpoint_name, - route_name=route_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_update( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - route_name: str, - route_update_properties: _models.RouteUpdateParameters, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.Route]: - """Updates an existing route with the specified route name under the specified subscription, - resource group, profile, and AzureFrontDoor endpoint. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :param route_name: Name of the routing rule. Required. - :type route_name: str - :param route_update_properties: Route update properties. Required. - :type route_update_properties: ~azure.mgmt.cdn.models.RouteUpdateParameters - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either Route or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.Route] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_update( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - route_name: str, - route_update_properties: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.Route]: - """Updates an existing route with the specified route name under the specified subscription, - resource group, profile, and AzureFrontDoor endpoint. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :param route_name: Name of the routing rule. Required. - :type route_name: str - :param route_update_properties: Route update properties. Required. - :type route_update_properties: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either Route or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.Route] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_update( - self, - resource_group_name: str, - profile_name: str, - endpoint_name: str, - route_name: str, - route_update_properties: Union[_models.RouteUpdateParameters, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.Route]: - """Updates an existing route with the specified route name under the specified subscription, - resource group, profile, and AzureFrontDoor endpoint. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :param route_name: Name of the routing rule. Required. - :type route_name: str - :param route_update_properties: Route update properties. Is either a RouteUpdateParameters type - or a IO[bytes] type. Required. - :type route_update_properties: ~azure.mgmt.cdn.models.RouteUpdateParameters or IO[bytes] - :return: An instance of LROPoller that returns either Route or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.Route] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.Route] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._update_initial( - resource_group_name=resource_group_name, - profile_name=profile_name, - endpoint_name=endpoint_name, - route_name=route_name, - route_update_properties=route_update_properties, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("Route", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.Route].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.Route]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _delete_initial( - self, resource_group_name: str, profile_name: str, endpoint_name: str, route_name: str, **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - endpoint_name=endpoint_name, - route_name=route_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_delete( - self, resource_group_name: str, profile_name: str, endpoint_name: str, route_name: str, **kwargs: Any - ) -> LROPoller[None]: - """Deletes an existing route with the specified route name under the specified subscription, - resource group, profile, and AzureFrontDoor endpoint. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - Required. - :type endpoint_name: str - :param route_name: Name of the routing rule. Required. - :type route_name: str - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - profile_name=profile_name, - endpoint_name=endpoint_name, - route_name=route_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_rule_sets_operations.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_rule_sets_operations.py deleted file mode 100644 index 6afea4091920..000000000000 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_rule_sets_operations.py +++ /dev/null @@ -1,672 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from typing import Any, Callable, Iterator, Optional, TypeVar, Union, cast -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.arm_polling import ARMPolling - -from .. import models as _models -from .._configuration import CdnManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_profile_request( - resource_group_name: str, profile_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/ruleSets", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "profileName": _SERIALIZER.url( - "profile_name", profile_name, "str", max_length=260, min_length=1, pattern=r"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, profile_name: str, rule_set_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/ruleSets/{ruleSetName}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "profileName": _SERIALIZER.url( - "profile_name", profile_name, "str", max_length=260, min_length=1, pattern=r"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$" - ), - "ruleSetName": _SERIALIZER.url("rule_set_name", rule_set_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_request( - resource_group_name: str, profile_name: str, rule_set_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/ruleSets/{ruleSetName}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "profileName": _SERIALIZER.url( - "profile_name", profile_name, "str", max_length=260, min_length=1, pattern=r"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$" - ), - "ruleSetName": _SERIALIZER.url("rule_set_name", rule_set_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, profile_name: str, rule_set_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/ruleSets/{ruleSetName}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "profileName": _SERIALIZER.url( - "profile_name", profile_name, "str", max_length=260, min_length=1, pattern=r"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$" - ), - "ruleSetName": _SERIALIZER.url("rule_set_name", rule_set_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_list_resource_usage_request( - resource_group_name: str, profile_name: str, rule_set_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/ruleSets/{ruleSetName}/usages", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "profileName": _SERIALIZER.url( - "profile_name", profile_name, "str", max_length=260, min_length=1, pattern=r"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$" - ), - "ruleSetName": _SERIALIZER.url("rule_set_name", rule_set_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -class RuleSetsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.cdn.CdnManagementClient`'s - :attr:`rule_sets` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: CdnManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_profile( - self, resource_group_name: str, profile_name: str, **kwargs: Any - ) -> ItemPaged["_models.RuleSet"]: - """Lists existing AzureFrontDoor rule sets within a profile. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :return: An iterator like instance of either RuleSet or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cdn.models.RuleSet] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.RuleSetListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_profile_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("RuleSetListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get(self, resource_group_name: str, profile_name: str, rule_set_name: str, **kwargs: Any) -> _models.RuleSet: - """Gets an existing AzureFrontDoor rule set with the specified rule set name under the specified - subscription, resource group and profile. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param rule_set_name: Name of the rule set under the profile which is unique globally. - Required. - :type rule_set_name: str - :return: RuleSet or the result of cls(response) - :rtype: ~azure.mgmt.cdn.models.RuleSet - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.RuleSet] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - rule_set_name=rule_set_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("RuleSet", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def create(self, resource_group_name: str, profile_name: str, rule_set_name: str, **kwargs: Any) -> _models.RuleSet: - """Creates a new rule set within the specified profile. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param rule_set_name: Name of the rule set under the profile which is unique globally. - Required. - :type rule_set_name: str - :return: RuleSet or the result of cls(response) - :rtype: ~azure.mgmt.cdn.models.RuleSet - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.RuleSet] = kwargs.pop("cls", None) - - _request = build_create_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - rule_set_name=rule_set_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("RuleSet", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - def _delete_initial( - self, resource_group_name: str, profile_name: str, rule_set_name: str, **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - rule_set_name=rule_set_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_delete( - self, resource_group_name: str, profile_name: str, rule_set_name: str, **kwargs: Any - ) -> LROPoller[None]: - """Deletes an existing AzureFrontDoor rule set with the specified rule set name under the - specified subscription, resource group and profile. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param rule_set_name: Name of the rule set under the profile which is unique globally. - Required. - :type rule_set_name: str - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - profile_name=profile_name, - rule_set_name=rule_set_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - @distributed_trace - def list_resource_usage( - self, resource_group_name: str, profile_name: str, rule_set_name: str, **kwargs: Any - ) -> ItemPaged["_models.Usage"]: - """Checks the quota and actual usage of endpoints under the given Azure Front Door profile.. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param rule_set_name: Name of the rule set under the profile which is unique globally. - Required. - :type rule_set_name: str - :return: An iterator like instance of either Usage or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cdn.models.Usage] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.UsagesListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_resource_usage_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - rule_set_name=rule_set_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("UsagesListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_rules_operations.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_rules_operations.py deleted file mode 100644 index 6a4980bc4f1e..000000000000 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_rules_operations.py +++ /dev/null @@ -1,987 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.arm_polling import ARMPolling - -from .. import models as _models -from .._configuration import CdnManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_rule_set_request( - resource_group_name: str, profile_name: str, rule_set_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/ruleSets/{ruleSetName}/rules", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "profileName": _SERIALIZER.url( - "profile_name", profile_name, "str", max_length=260, min_length=1, pattern=r"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$" - ), - "ruleSetName": _SERIALIZER.url("rule_set_name", rule_set_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, profile_name: str, rule_set_name: str, rule_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/ruleSets/{ruleSetName}/rules/{ruleName}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "profileName": _SERIALIZER.url( - "profile_name", profile_name, "str", max_length=260, min_length=1, pattern=r"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$" - ), - "ruleSetName": _SERIALIZER.url("rule_set_name", rule_set_name, "str"), - "ruleName": _SERIALIZER.url("rule_name", rule_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_request( - resource_group_name: str, profile_name: str, rule_set_name: str, rule_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/ruleSets/{ruleSetName}/rules/{ruleName}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "profileName": _SERIALIZER.url( - "profile_name", profile_name, "str", max_length=260, min_length=1, pattern=r"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$" - ), - "ruleSetName": _SERIALIZER.url("rule_set_name", rule_set_name, "str"), - "ruleName": _SERIALIZER.url("rule_name", rule_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_update_request( - resource_group_name: str, profile_name: str, rule_set_name: str, rule_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/ruleSets/{ruleSetName}/rules/{ruleName}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "profileName": _SERIALIZER.url( - "profile_name", profile_name, "str", max_length=260, min_length=1, pattern=r"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$" - ), - "ruleSetName": _SERIALIZER.url("rule_set_name", rule_set_name, "str"), - "ruleName": _SERIALIZER.url("rule_name", rule_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, profile_name: str, rule_set_name: str, rule_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/ruleSets/{ruleSetName}/rules/{ruleName}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "profileName": _SERIALIZER.url( - "profile_name", profile_name, "str", max_length=260, min_length=1, pattern=r"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$" - ), - "ruleSetName": _SERIALIZER.url("rule_set_name", rule_set_name, "str"), - "ruleName": _SERIALIZER.url("rule_name", rule_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -class RulesOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.cdn.CdnManagementClient`'s - :attr:`rules` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: CdnManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_rule_set( - self, resource_group_name: str, profile_name: str, rule_set_name: str, **kwargs: Any - ) -> ItemPaged["_models.Rule"]: - """Lists all of the existing delivery rules within a rule set. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param rule_set_name: Name of the rule set under the profile. Required. - :type rule_set_name: str - :return: An iterator like instance of either Rule or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cdn.models.Rule] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.RuleListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_rule_set_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - rule_set_name=rule_set_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("RuleListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get( - self, resource_group_name: str, profile_name: str, rule_set_name: str, rule_name: str, **kwargs: Any - ) -> _models.Rule: - """Gets an existing delivery rule within a rule set. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param rule_set_name: Name of the rule set under the profile. Required. - :type rule_set_name: str - :param rule_name: Name of the delivery rule which is unique within the endpoint. Required. - :type rule_name: str - :return: Rule or the result of cls(response) - :rtype: ~azure.mgmt.cdn.models.Rule - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.Rule] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - rule_set_name=rule_set_name, - rule_name=rule_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("Rule", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - def _create_initial( - self, - resource_group_name: str, - profile_name: str, - rule_set_name: str, - rule_name: str, - rule: Union[_models.Rule, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(rule, (IOBase, bytes)): - _content = rule - else: - _json = self._serialize.body(rule, "Rule") - - _request = build_create_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - rule_set_name=rule_set_name, - rule_name=rule_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_create( - self, - resource_group_name: str, - profile_name: str, - rule_set_name: str, - rule_name: str, - rule: _models.Rule, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.Rule]: - """Creates a new delivery rule within the specified rule set. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param rule_set_name: Name of the rule set under the profile. Required. - :type rule_set_name: str - :param rule_name: Name of the delivery rule which is unique within the endpoint. Required. - :type rule_name: str - :param rule: The delivery rule properties. Required. - :type rule: ~azure.mgmt.cdn.models.Rule - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either Rule or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.Rule] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_create( - self, - resource_group_name: str, - profile_name: str, - rule_set_name: str, - rule_name: str, - rule: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.Rule]: - """Creates a new delivery rule within the specified rule set. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param rule_set_name: Name of the rule set under the profile. Required. - :type rule_set_name: str - :param rule_name: Name of the delivery rule which is unique within the endpoint. Required. - :type rule_name: str - :param rule: The delivery rule properties. Required. - :type rule: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either Rule or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.Rule] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_create( - self, - resource_group_name: str, - profile_name: str, - rule_set_name: str, - rule_name: str, - rule: Union[_models.Rule, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.Rule]: - """Creates a new delivery rule within the specified rule set. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param rule_set_name: Name of the rule set under the profile. Required. - :type rule_set_name: str - :param rule_name: Name of the delivery rule which is unique within the endpoint. Required. - :type rule_name: str - :param rule: The delivery rule properties. Is either a Rule type or a IO[bytes] type. Required. - :type rule: ~azure.mgmt.cdn.models.Rule or IO[bytes] - :return: An instance of LROPoller that returns either Rule or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.Rule] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.Rule] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._create_initial( - resource_group_name=resource_group_name, - profile_name=profile_name, - rule_set_name=rule_set_name, - rule_name=rule_name, - rule=rule, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("Rule", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.Rule].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.Rule]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _update_initial( - self, - resource_group_name: str, - profile_name: str, - rule_set_name: str, - rule_name: str, - rule_update_properties: Union[_models.RuleUpdateParameters, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(rule_update_properties, (IOBase, bytes)): - _content = rule_update_properties - else: - _json = self._serialize.body(rule_update_properties, "RuleUpdateParameters") - - _request = build_update_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - rule_set_name=rule_set_name, - rule_name=rule_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_update( - self, - resource_group_name: str, - profile_name: str, - rule_set_name: str, - rule_name: str, - rule_update_properties: _models.RuleUpdateParameters, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.Rule]: - """Updates an existing delivery rule within a rule set. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param rule_set_name: Name of the rule set under the profile. Required. - :type rule_set_name: str - :param rule_name: Name of the delivery rule which is unique within the endpoint. Required. - :type rule_name: str - :param rule_update_properties: Delivery rule properties. Required. - :type rule_update_properties: ~azure.mgmt.cdn.models.RuleUpdateParameters - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either Rule or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.Rule] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_update( - self, - resource_group_name: str, - profile_name: str, - rule_set_name: str, - rule_name: str, - rule_update_properties: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.Rule]: - """Updates an existing delivery rule within a rule set. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param rule_set_name: Name of the rule set under the profile. Required. - :type rule_set_name: str - :param rule_name: Name of the delivery rule which is unique within the endpoint. Required. - :type rule_name: str - :param rule_update_properties: Delivery rule properties. Required. - :type rule_update_properties: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either Rule or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.Rule] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_update( - self, - resource_group_name: str, - profile_name: str, - rule_set_name: str, - rule_name: str, - rule_update_properties: Union[_models.RuleUpdateParameters, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.Rule]: - """Updates an existing delivery rule within a rule set. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param rule_set_name: Name of the rule set under the profile. Required. - :type rule_set_name: str - :param rule_name: Name of the delivery rule which is unique within the endpoint. Required. - :type rule_name: str - :param rule_update_properties: Delivery rule properties. Is either a RuleUpdateParameters type - or a IO[bytes] type. Required. - :type rule_update_properties: ~azure.mgmt.cdn.models.RuleUpdateParameters or IO[bytes] - :return: An instance of LROPoller that returns either Rule or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.Rule] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.Rule] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._update_initial( - resource_group_name=resource_group_name, - profile_name=profile_name, - rule_set_name=rule_set_name, - rule_name=rule_name, - rule_update_properties=rule_update_properties, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("Rule", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.Rule].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.Rule]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _delete_initial( - self, resource_group_name: str, profile_name: str, rule_set_name: str, rule_name: str, **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - rule_set_name=rule_set_name, - rule_name=rule_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_delete( - self, resource_group_name: str, profile_name: str, rule_set_name: str, rule_name: str, **kwargs: Any - ) -> LROPoller[None]: - """Deletes an existing delivery rule within a rule set. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param rule_set_name: Name of the rule set under the profile. Required. - :type rule_set_name: str - :param rule_name: Name of the delivery rule which is unique within the endpoint. Required. - :type rule_name: str - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - profile_name=profile_name, - rule_set_name=rule_set_name, - rule_name=rule_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_secrets_operations.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_secrets_operations.py deleted file mode 100644 index d544d8888afb..000000000000 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_secrets_operations.py +++ /dev/null @@ -1,693 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.arm_polling import ARMPolling - -from .. import models as _models -from .._configuration import CdnManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_profile_request( - resource_group_name: str, profile_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/secrets", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "profileName": _SERIALIZER.url( - "profile_name", profile_name, "str", max_length=260, min_length=1, pattern=r"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, profile_name: str, secret_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/secrets/{secretName}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "profileName": _SERIALIZER.url( - "profile_name", profile_name, "str", max_length=260, min_length=1, pattern=r"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$" - ), - "secretName": _SERIALIZER.url("secret_name", secret_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_request( - resource_group_name: str, profile_name: str, secret_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/secrets/{secretName}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "profileName": _SERIALIZER.url( - "profile_name", profile_name, "str", max_length=260, min_length=1, pattern=r"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$" - ), - "secretName": _SERIALIZER.url("secret_name", secret_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, profile_name: str, secret_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/secrets/{secretName}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "profileName": _SERIALIZER.url( - "profile_name", profile_name, "str", max_length=260, min_length=1, pattern=r"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$" - ), - "secretName": _SERIALIZER.url("secret_name", secret_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -class SecretsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.cdn.CdnManagementClient`'s - :attr:`secrets` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: CdnManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_profile( - self, resource_group_name: str, profile_name: str, **kwargs: Any - ) -> ItemPaged["_models.Secret"]: - """Lists existing AzureFrontDoor secrets. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :return: An iterator like instance of either Secret or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cdn.models.Secret] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.SecretListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_profile_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("SecretListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get(self, resource_group_name: str, profile_name: str, secret_name: str, **kwargs: Any) -> _models.Secret: - """Gets an existing Secret within a profile. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param secret_name: Name of the Secret under the profile. Required. - :type secret_name: str - :return: Secret or the result of cls(response) - :rtype: ~azure.mgmt.cdn.models.Secret - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.Secret] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - secret_name=secret_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("Secret", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - def _create_initial( - self, - resource_group_name: str, - profile_name: str, - secret_name: str, - secret: Union[_models.Secret, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(secret, (IOBase, bytes)): - _content = secret - else: - _json = self._serialize.body(secret, "Secret") - - _request = build_create_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - secret_name=secret_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_create( - self, - resource_group_name: str, - profile_name: str, - secret_name: str, - secret: _models.Secret, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.Secret]: - """Creates a new Secret within the specified profile. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param secret_name: Name of the Secret under the profile. Required. - :type secret_name: str - :param secret: The Secret properties. Required. - :type secret: ~azure.mgmt.cdn.models.Secret - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either Secret or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.Secret] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_create( - self, - resource_group_name: str, - profile_name: str, - secret_name: str, - secret: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.Secret]: - """Creates a new Secret within the specified profile. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param secret_name: Name of the Secret under the profile. Required. - :type secret_name: str - :param secret: The Secret properties. Required. - :type secret: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either Secret or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.Secret] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_create( - self, - resource_group_name: str, - profile_name: str, - secret_name: str, - secret: Union[_models.Secret, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.Secret]: - """Creates a new Secret within the specified profile. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param secret_name: Name of the Secret under the profile. Required. - :type secret_name: str - :param secret: The Secret properties. Is either a Secret type or a IO[bytes] type. Required. - :type secret: ~azure.mgmt.cdn.models.Secret or IO[bytes] - :return: An instance of LROPoller that returns either Secret or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.Secret] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.Secret] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._create_initial( - resource_group_name=resource_group_name, - profile_name=profile_name, - secret_name=secret_name, - secret=secret, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("Secret", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.Secret].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.Secret]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _delete_initial( - self, resource_group_name: str, profile_name: str, secret_name: str, **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - secret_name=secret_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_delete( - self, resource_group_name: str, profile_name: str, secret_name: str, **kwargs: Any - ) -> LROPoller[None]: - """Deletes an existing Secret within profile. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param secret_name: Name of the Secret under the profile. Required. - :type secret_name: str - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - profile_name=profile_name, - secret_name=secret_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_security_policies_operations.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_security_policies_operations.py deleted file mode 100644 index b8715d31c70d..000000000000 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_security_policies_operations.py +++ /dev/null @@ -1,956 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.arm_polling import ARMPolling - -from .. import models as _models -from .._configuration import CdnManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_profile_request( - resource_group_name: str, profile_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/securityPolicies", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "profileName": _SERIALIZER.url( - "profile_name", profile_name, "str", max_length=260, min_length=1, pattern=r"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, profile_name: str, security_policy_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/securityPolicies/{securityPolicyName}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "profileName": _SERIALIZER.url( - "profile_name", profile_name, "str", max_length=260, min_length=1, pattern=r"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$" - ), - "securityPolicyName": _SERIALIZER.url("security_policy_name", security_policy_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_request( - resource_group_name: str, profile_name: str, security_policy_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/securityPolicies/{securityPolicyName}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "profileName": _SERIALIZER.url( - "profile_name", profile_name, "str", max_length=260, min_length=1, pattern=r"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$" - ), - "securityPolicyName": _SERIALIZER.url("security_policy_name", security_policy_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_patch_request( - resource_group_name: str, profile_name: str, security_policy_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/securityPolicies/{securityPolicyName}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "profileName": _SERIALIZER.url( - "profile_name", profile_name, "str", max_length=260, min_length=1, pattern=r"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$" - ), - "securityPolicyName": _SERIALIZER.url("security_policy_name", security_policy_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, profile_name: str, security_policy_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-06-01")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/securityPolicies/{securityPolicyName}", - ) - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "profileName": _SERIALIZER.url( - "profile_name", profile_name, "str", max_length=260, min_length=1, pattern=r"^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$" - ), - "securityPolicyName": _SERIALIZER.url("security_policy_name", security_policy_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -class SecurityPoliciesOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.cdn.CdnManagementClient`'s - :attr:`security_policies` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: CdnManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_profile( - self, resource_group_name: str, profile_name: str, **kwargs: Any - ) -> ItemPaged["_models.SecurityPolicy"]: - """Lists security policies associated with the profile. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :return: An iterator like instance of either SecurityPolicy or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cdn.models.SecurityPolicy] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.SecurityPolicyListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_profile_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("SecurityPolicyListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get( - self, resource_group_name: str, profile_name: str, security_policy_name: str, **kwargs: Any - ) -> _models.SecurityPolicy: - """Gets an existing security policy within a profile. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param security_policy_name: Name of the security policy under the profile. Required. - :type security_policy_name: str - :return: SecurityPolicy or the result of cls(response) - :rtype: ~azure.mgmt.cdn.models.SecurityPolicy - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.SecurityPolicy] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - security_policy_name=security_policy_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("SecurityPolicy", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - def _create_initial( - self, - resource_group_name: str, - profile_name: str, - security_policy_name: str, - security_policy: Union[_models.SecurityPolicy, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(security_policy, (IOBase, bytes)): - _content = security_policy - else: - _json = self._serialize.body(security_policy, "SecurityPolicy") - - _request = build_create_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - security_policy_name=security_policy_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_create( - self, - resource_group_name: str, - profile_name: str, - security_policy_name: str, - security_policy: _models.SecurityPolicy, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.SecurityPolicy]: - """Creates a new security policy within the specified profile. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param security_policy_name: Name of the security policy under the profile. Required. - :type security_policy_name: str - :param security_policy: The security policy properties. Required. - :type security_policy: ~azure.mgmt.cdn.models.SecurityPolicy - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either SecurityPolicy or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.SecurityPolicy] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_create( - self, - resource_group_name: str, - profile_name: str, - security_policy_name: str, - security_policy: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.SecurityPolicy]: - """Creates a new security policy within the specified profile. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param security_policy_name: Name of the security policy under the profile. Required. - :type security_policy_name: str - :param security_policy: The security policy properties. Required. - :type security_policy: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either SecurityPolicy or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.SecurityPolicy] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_create( - self, - resource_group_name: str, - profile_name: str, - security_policy_name: str, - security_policy: Union[_models.SecurityPolicy, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.SecurityPolicy]: - """Creates a new security policy within the specified profile. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param security_policy_name: Name of the security policy under the profile. Required. - :type security_policy_name: str - :param security_policy: The security policy properties. Is either a SecurityPolicy type or a - IO[bytes] type. Required. - :type security_policy: ~azure.mgmt.cdn.models.SecurityPolicy or IO[bytes] - :return: An instance of LROPoller that returns either SecurityPolicy or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.SecurityPolicy] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.SecurityPolicy] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._create_initial( - resource_group_name=resource_group_name, - profile_name=profile_name, - security_policy_name=security_policy_name, - security_policy=security_policy, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("SecurityPolicy", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.SecurityPolicy].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.SecurityPolicy]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _patch_initial( - self, - resource_group_name: str, - profile_name: str, - security_policy_name: str, - security_policy_update_properties: Union[_models.SecurityPolicyUpdateParameters, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(security_policy_update_properties, (IOBase, bytes)): - _content = security_policy_update_properties - else: - _json = self._serialize.body(security_policy_update_properties, "SecurityPolicyUpdateParameters") - - _request = build_patch_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - security_policy_name=security_policy_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_patch( - self, - resource_group_name: str, - profile_name: str, - security_policy_name: str, - security_policy_update_properties: _models.SecurityPolicyUpdateParameters, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.SecurityPolicy]: - """Updates an existing security policy within a profile. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param security_policy_name: Name of the security policy under the profile. Required. - :type security_policy_name: str - :param security_policy_update_properties: Security policy update properties. Required. - :type security_policy_update_properties: ~azure.mgmt.cdn.models.SecurityPolicyUpdateParameters - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either SecurityPolicy or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.SecurityPolicy] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_patch( - self, - resource_group_name: str, - profile_name: str, - security_policy_name: str, - security_policy_update_properties: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.SecurityPolicy]: - """Updates an existing security policy within a profile. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param security_policy_name: Name of the security policy under the profile. Required. - :type security_policy_name: str - :param security_policy_update_properties: Security policy update properties. Required. - :type security_policy_update_properties: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either SecurityPolicy or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.SecurityPolicy] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_patch( - self, - resource_group_name: str, - profile_name: str, - security_policy_name: str, - security_policy_update_properties: Union[_models.SecurityPolicyUpdateParameters, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.SecurityPolicy]: - """Updates an existing security policy within a profile. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param security_policy_name: Name of the security policy under the profile. Required. - :type security_policy_name: str - :param security_policy_update_properties: Security policy update properties. Is either a - SecurityPolicyUpdateParameters type or a IO[bytes] type. Required. - :type security_policy_update_properties: ~azure.mgmt.cdn.models.SecurityPolicyUpdateParameters - or IO[bytes] - :return: An instance of LROPoller that returns either SecurityPolicy or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cdn.models.SecurityPolicy] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.SecurityPolicy] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._patch_initial( - resource_group_name=resource_group_name, - profile_name=profile_name, - security_policy_name=security_policy_name, - security_policy_update_properties=security_policy_update_properties, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("SecurityPolicy", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.SecurityPolicy].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.SecurityPolicy]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _delete_initial( - self, resource_group_name: str, profile_name: str, security_policy_name: str, **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - profile_name=profile_name, - security_policy_name=security_policy_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_delete( - self, resource_group_name: str, profile_name: str, security_policy_name: str, **kwargs: Any - ) -> LROPoller[None]: - """Deletes an existing security policy within profile. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param profile_name: Name of the Azure Front Door Standard or Azure Front Door Premium which is - unique within the resource group. Required. - :type profile_name: str - :param security_policy_name: Name of the security policy under the profile. Required. - :type security_policy_name: str - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - profile_name=profile_name, - security_policy_name=security_policy_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore diff --git a/sdk/cdn/azure-mgmt-cdn/code_report_typespec.json b/sdk/cdn/azure-mgmt-cdn/code_report_typespec.json new file mode 100644 index 000000000000..d9f675d8eded --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/code_report_typespec.json @@ -0,0 +1,107752 @@ +{ + "azure.mgmt.cdn": { + "class_nodes": { + "CdnClient": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "credential": { + "default": null, + "param_type": "positional_or_keyword" + }, + "subscription_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "base_url": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "cloud_setting": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "check_endpoint_name_availability": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "check_endpoint_name_availability_input": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "CheckEndpointNameAvailabilityOutput", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "check_endpoint_name_availability_input": { + "type": "CheckEndpointNameAvailabilityInput", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "CheckEndpointNameAvailabilityOutput" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "check_endpoint_name_availability_input": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "CheckEndpointNameAvailabilityOutput" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "check_endpoint_name_availability_input": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "CheckEndpointNameAvailabilityOutput" + } + ] + }, + "check_name_availability": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "check_name_availability_input": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "CheckNameAvailabilityOutput", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "check_name_availability_input": { + "type": "CheckNameAvailabilityInput", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "CheckNameAvailabilityOutput" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "check_name_availability_input": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "CheckNameAvailabilityOutput" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "check_name_availability_input": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "CheckNameAvailabilityOutput" + } + ] + }, + "check_name_availability_with_subscription": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "check_name_availability_input": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "CheckNameAvailabilityOutput", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "check_name_availability_input": { + "type": "CheckNameAvailabilityInput", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "CheckNameAvailabilityOutput" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "check_name_availability_input": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "CheckNameAvailabilityOutput" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "check_name_availability_input": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "CheckNameAvailabilityOutput" + } + ] + }, + "close": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "send_request": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "request": { + "default": null, + "param_type": "positional_or_keyword" + }, + "stream": { + "default": "bool", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "HttpResponse", + "overloads": [] + }, + "validate_probe": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "validate_probe_input": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ValidateProbeOutput", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "validate_probe_input": { + "type": "ValidateProbeInput", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "ValidateProbeOutput" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "validate_probe_input": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "ValidateProbeOutput" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "validate_probe_input": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "ValidateProbeOutput" + } + ] + } + }, + "properties": { + "client_side_validation": { + "attr_type": false + }, + "operations": { + "attr_type": "Operations" + }, + "profiles": { + "attr_type": "ProfilesOperations" + }, + "afd_endpoints": { + "attr_type": "AFDEndpointsOperations" + }, + "afd_origin_groups": { + "attr_type": "AFDOriginGroupsOperations" + }, + "afd_origins": { + "attr_type": "AFDOriginsOperations" + }, + "routes": { + "attr_type": "RoutesOperations" + }, + "rule_sets": { + "attr_type": "RuleSetsOperations" + }, + "rules": { + "attr_type": "RulesOperations" + }, + "security_policies": { + "attr_type": "SecurityPoliciesOperations" + }, + "secrets": { + "attr_type": "SecretsOperations" + }, + "endpoints": { + "attr_type": "EndpointsOperations" + }, + "origins": { + "attr_type": "OriginsOperations" + }, + "origin_groups": { + "attr_type": "OriginGroupsOperations" + }, + "custom_domains": { + "attr_type": "CustomDomainsOperations" + }, + "afd_custom_domains": { + "attr_type": "AFDCustomDomainsOperations" + }, + "afd_profiles": { + "attr_type": "AFDProfilesOperations" + }, + "log_analytics": { + "attr_type": "LogAnalyticsOperations" + }, + "policies": { + "attr_type": "PoliciesOperations" + }, + "resource_usage": { + "attr_type": "ResourceUsageOperations" + }, + "edge_nodes": { + "attr_type": "EdgeNodesOperations" + }, + "managed_rule_sets": { + "attr_type": "ManagedRuleSetsOperations" + } + } + } + }, + "function_nodes": {} + }, + "azure.mgmt.cdn.aio": { + "class_nodes": { + "CdnClient": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "credential": { + "default": null, + "param_type": "positional_or_keyword" + }, + "subscription_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "base_url": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "cloud_setting": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "check_endpoint_name_availability": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "check_endpoint_name_availability_input": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "CheckEndpointNameAvailabilityOutput", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "check_endpoint_name_availability_input": { + "type": "CheckEndpointNameAvailabilityInput", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "CheckEndpointNameAvailabilityOutput" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "check_endpoint_name_availability_input": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "CheckEndpointNameAvailabilityOutput" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "check_endpoint_name_availability_input": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "CheckEndpointNameAvailabilityOutput" + } + ] + }, + "check_name_availability": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "check_name_availability_input": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "CheckNameAvailabilityOutput", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "check_name_availability_input": { + "type": "CheckNameAvailabilityInput", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "CheckNameAvailabilityOutput" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "check_name_availability_input": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "CheckNameAvailabilityOutput" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "check_name_availability_input": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "CheckNameAvailabilityOutput" + } + ] + }, + "check_name_availability_with_subscription": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "check_name_availability_input": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "CheckNameAvailabilityOutput", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "check_name_availability_input": { + "type": "CheckNameAvailabilityInput", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "CheckNameAvailabilityOutput" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "check_name_availability_input": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "CheckNameAvailabilityOutput" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "check_name_availability_input": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "CheckNameAvailabilityOutput" + } + ] + }, + "close": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": true, + "return_type": "None", + "overloads": [] + }, + "send_request": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "request": { + "default": null, + "param_type": "positional_or_keyword" + }, + "stream": { + "default": "bool", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "Awaitable[AsyncHttpResponse]", + "overloads": [] + }, + "validate_probe": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "validate_probe_input": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "ValidateProbeOutput", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "validate_probe_input": { + "type": "ValidateProbeInput", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "ValidateProbeOutput" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "validate_probe_input": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "ValidateProbeOutput" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "validate_probe_input": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "ValidateProbeOutput" + } + ] + } + }, + "properties": { + "client_side_validation": { + "attr_type": false + }, + "operations": { + "attr_type": "Operations" + }, + "profiles": { + "attr_type": "ProfilesOperations" + }, + "afd_endpoints": { + "attr_type": "AFDEndpointsOperations" + }, + "afd_origin_groups": { + "attr_type": "AFDOriginGroupsOperations" + }, + "afd_origins": { + "attr_type": "AFDOriginsOperations" + }, + "routes": { + "attr_type": "RoutesOperations" + }, + "rule_sets": { + "attr_type": "RuleSetsOperations" + }, + "rules": { + "attr_type": "RulesOperations" + }, + "security_policies": { + "attr_type": "SecurityPoliciesOperations" + }, + "secrets": { + "attr_type": "SecretsOperations" + }, + "endpoints": { + "attr_type": "EndpointsOperations" + }, + "origins": { + "attr_type": "OriginsOperations" + }, + "origin_groups": { + "attr_type": "OriginGroupsOperations" + }, + "custom_domains": { + "attr_type": "CustomDomainsOperations" + }, + "afd_custom_domains": { + "attr_type": "AFDCustomDomainsOperations" + }, + "afd_profiles": { + "attr_type": "AFDProfilesOperations" + }, + "log_analytics": { + "attr_type": "LogAnalyticsOperations" + }, + "policies": { + "attr_type": "PoliciesOperations" + }, + "resource_usage": { + "attr_type": "ResourceUsageOperations" + }, + "edge_nodes": { + "attr_type": "EdgeNodesOperations" + }, + "managed_rule_sets": { + "attr_type": "ManagedRuleSetsOperations" + } + } + } + }, + "function_nodes": {} + }, + "azure.mgmt.cdn.aio.operations": { + "class_nodes": { + "AFDCustomDomainsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[AFDDomain]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain": { + "type": "AFDDomain", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[AFDDomain]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[AFDDomain]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[AFDDomain]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]", + "overloads": [] + }, + "begin_refresh_validation_token": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_update_properties": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[AFDDomain]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_update_properties": { + "type": "AFDDomainUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[AFDDomain]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_update_properties": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[AFDDomain]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_update_properties": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[AFDDomain]" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AFDDomain", + "overloads": [] + }, + "list_by_profile": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.AFDDomain]", + "overloads": [] + } + }, + "properties": {} + }, + "AFDEndpointsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[AFDEndpoint]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint": { + "type": "AFDEndpoint", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[AFDEndpoint]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[AFDEndpoint]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[AFDEndpoint]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]", + "overloads": [] + }, + "begin_purge_content": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "contents": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "contents": { + "type": "AfdPurgeParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "contents": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "contents": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]" + } + ] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_update_properties": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[AFDEndpoint]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_update_properties": { + "type": "AFDEndpointUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[AFDEndpoint]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_update_properties": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[AFDEndpoint]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_update_properties": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[AFDEndpoint]" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AFDEndpoint", + "overloads": [] + }, + "list_by_profile": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.AFDEndpoint]", + "overloads": [] + }, + "list_resource_usage": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.Usage]", + "overloads": [] + }, + "validate_custom_domain": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_properties": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "ValidateCustomDomainOutput", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_properties": { + "type": "ValidateCustomDomainInput", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "ValidateCustomDomainOutput" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_properties": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "ValidateCustomDomainOutput" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_properties": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "ValidateCustomDomainOutput" + } + ] + } + }, + "properties": {} + }, + "AFDOriginGroupsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[AFDOriginGroup]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group": { + "type": "AFDOriginGroup", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[AFDOriginGroup]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[AFDOriginGroup]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[AFDOriginGroup]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_update_properties": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[AFDOriginGroup]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_update_properties": { + "type": "AFDOriginGroupUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[AFDOriginGroup]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_update_properties": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[AFDOriginGroup]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_update_properties": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[AFDOriginGroup]" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AFDOriginGroup", + "overloads": [] + }, + "list_by_profile": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.AFDOriginGroup]", + "overloads": [] + }, + "list_resource_usage": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.Usage]", + "overloads": [] + } + }, + "properties": {} + }, + "AFDOriginsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "origin": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[AFDOrigin]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin": { + "type": "AFDOrigin", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[AFDOrigin]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[AFDOrigin]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[AFDOrigin]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_update_properties": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[AFDOrigin]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_update_properties": { + "type": "AFDOriginUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[AFDOrigin]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_update_properties": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[AFDOrigin]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_update_properties": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[AFDOrigin]" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AFDOrigin", + "overloads": [] + }, + "list_by_origin_group": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.AFDOrigin]", + "overloads": [] + } + }, + "properties": {} + }, + "AFDProfilesOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_upgrade": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_upgrade_parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Profile]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_upgrade_parameters": { + "type": "ProfileUpgradeParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Profile]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_upgrade_parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Profile]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_upgrade_parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Profile]" + } + ] + }, + "check_endpoint_name_availability": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "check_endpoint_name_availability_input": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "CheckEndpointNameAvailabilityOutput", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "check_endpoint_name_availability_input": { + "type": "CheckEndpointNameAvailabilityInput", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "CheckEndpointNameAvailabilityOutput" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "check_endpoint_name_availability_input": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "CheckEndpointNameAvailabilityOutput" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "check_endpoint_name_availability_input": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "CheckEndpointNameAvailabilityOutput" + } + ] + }, + "check_host_name_availability": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "check_host_name_availability_input": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "CheckNameAvailabilityOutput", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "check_host_name_availability_input": { + "type": "CheckHostNameAvailabilityInput", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "CheckNameAvailabilityOutput" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "check_host_name_availability_input": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "CheckNameAvailabilityOutput" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "check_host_name_availability_input": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "CheckNameAvailabilityOutput" + } + ] + }, + "list_resource_usage": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.Usage]", + "overloads": [] + }, + "validate_secret": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "validate_secret_input": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "ValidateSecretOutput", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "validate_secret_input": { + "type": "ValidateSecretInput", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "ValidateSecretOutput" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "validate_secret_input": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "ValidateSecretOutput" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "validate_secret_input": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "ValidateSecretOutput" + } + ] + } + }, + "properties": {} + }, + "CustomDomainsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_properties": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CustomDomain]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_properties": { + "type": "CustomDomainParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CustomDomain]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_properties": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CustomDomain]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_properties": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CustomDomain]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CustomDomain]", + "overloads": [] + }, + "begin_disable_custom_https": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CustomDomain]", + "overloads": [] + }, + "begin_enable_custom_https": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_https_parameters": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CustomDomain]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_https_parameters": { + "type": "Optional[CustomDomainHttpsParameters]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CustomDomain]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_https_parameters": { + "type": "Optional[JSON]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CustomDomain]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_https_parameters": { + "type": "Optional[IO[bytes]]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CustomDomain]" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "CustomDomain", + "overloads": [] + }, + "list_by_endpoint": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.CustomDomain]", + "overloads": [] + } + }, + "properties": {} + }, + "EdgeNodesOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.EdgeNode]", + "overloads": [] + } + }, + "properties": {} + }, + "EndpointsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Endpoint]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint": { + "type": "Endpoint", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Endpoint]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Endpoint]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Endpoint]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]", + "overloads": [] + }, + "begin_load_content": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_file_paths": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_file_paths": { + "type": "LoadParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_file_paths": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_file_paths": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]" + } + ] + }, + "begin_purge_content": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_file_paths": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_file_paths": { + "type": "PurgeParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_file_paths": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_file_paths": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]" + } + ] + }, + "begin_start": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Endpoint]", + "overloads": [] + }, + "begin_stop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Endpoint]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_update_properties": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Endpoint]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_update_properties": { + "type": "EndpointUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Endpoint]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_update_properties": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Endpoint]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_update_properties": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Endpoint]" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "Endpoint", + "overloads": [] + }, + "list_by_profile": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.Endpoint]", + "overloads": [] + }, + "list_resource_usage": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.ResourceUsage]", + "overloads": [] + }, + "validate_custom_domain": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_properties": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "ValidateCustomDomainOutput", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_properties": { + "type": "ValidateCustomDomainInput", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "ValidateCustomDomainOutput" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_properties": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "ValidateCustomDomainOutput" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_properties": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "ValidateCustomDomainOutput" + } + ] + } + }, + "properties": {} + }, + "LogAnalyticsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "get_log_analytics_locations": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "ContinentsResponse", + "overloads": [] + }, + "get_log_analytics_metrics": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "metrics": { + "default": null, + "param_type": "keyword_only" + }, + "date_time_begin": { + "default": null, + "param_type": "keyword_only" + }, + "date_time_end": { + "default": null, + "param_type": "keyword_only" + }, + "granularity": { + "default": null, + "param_type": "keyword_only" + }, + "custom_domains": { + "default": null, + "param_type": "keyword_only" + }, + "protocols": { + "default": null, + "param_type": "keyword_only" + }, + "group_by": { + "default": "none", + "param_type": "keyword_only" + }, + "continents": { + "default": "none", + "param_type": "keyword_only" + }, + "country_or_regions": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "MetricsResponse", + "overloads": [] + }, + "get_log_analytics_rankings": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "rankings": { + "default": null, + "param_type": "keyword_only" + }, + "metrics": { + "default": null, + "param_type": "keyword_only" + }, + "max_ranking": { + "default": null, + "param_type": "keyword_only" + }, + "date_time_begin": { + "default": null, + "param_type": "keyword_only" + }, + "date_time_end": { + "default": null, + "param_type": "keyword_only" + }, + "custom_domains": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "RankingsResponse", + "overloads": [] + }, + "get_log_analytics_resources": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "ResourcesResponse", + "overloads": [] + }, + "get_waf_log_analytics_metrics": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "metrics": { + "default": null, + "param_type": "keyword_only" + }, + "date_time_begin": { + "default": null, + "param_type": "keyword_only" + }, + "date_time_end": { + "default": null, + "param_type": "keyword_only" + }, + "granularity": { + "default": null, + "param_type": "keyword_only" + }, + "actions": { + "default": "none", + "param_type": "keyword_only" + }, + "group_by": { + "default": "none", + "param_type": "keyword_only" + }, + "rule_types": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "WafMetricsResponse", + "overloads": [] + }, + "get_waf_log_analytics_rankings": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "metrics": { + "default": null, + "param_type": "keyword_only" + }, + "date_time_begin": { + "default": null, + "param_type": "keyword_only" + }, + "date_time_end": { + "default": null, + "param_type": "keyword_only" + }, + "max_ranking": { + "default": null, + "param_type": "keyword_only" + }, + "rankings": { + "default": null, + "param_type": "keyword_only" + }, + "actions": { + "default": "none", + "param_type": "keyword_only" + }, + "rule_types": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "WafRankingsResponse", + "overloads": [] + } + }, + "properties": {} + }, + "ManagedRuleSetsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.ManagedRuleSetDefinition]", + "overloads": [] + } + }, + "properties": {} + }, + "Operations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.Operation]", + "overloads": [] + } + }, + "properties": {} + }, + "OriginGroupsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[OriginGroup]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group": { + "type": "OriginGroup", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[OriginGroup]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[OriginGroup]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[OriginGroup]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_update_properties": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[OriginGroup]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_update_properties": { + "type": "OriginGroupUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[OriginGroup]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_update_properties": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[OriginGroup]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_update_properties": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[OriginGroup]" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "OriginGroup", + "overloads": [] + }, + "list_by_endpoint": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.OriginGroup]", + "overloads": [] + } + }, + "properties": {} + }, + "OriginsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "origin": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Origin]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin": { + "type": "Origin", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Origin]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Origin]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Origin]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_update_properties": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Origin]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_update_properties": { + "type": "OriginUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Origin]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_update_properties": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Origin]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_update_properties": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Origin]" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "Origin", + "overloads": [] + }, + "list_by_endpoint": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.Origin]", + "overloads": [] + } + }, + "properties": {} + }, + "PoliciesOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cdn_web_application_firewall_policy": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CdnWebApplicationFirewallPolicy]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cdn_web_application_firewall_policy": { + "type": "CdnWebApplicationFirewallPolicy", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CdnWebApplicationFirewallPolicy]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cdn_web_application_firewall_policy": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CdnWebApplicationFirewallPolicy]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cdn_web_application_firewall_policy": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CdnWebApplicationFirewallPolicy]" + } + ] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cdn_web_application_firewall_policy_patch_parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CdnWebApplicationFirewallPolicy]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cdn_web_application_firewall_policy_patch_parameters": { + "type": "CdnWebApplicationFirewallPolicyPatchParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CdnWebApplicationFirewallPolicy]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cdn_web_application_firewall_policy_patch_parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CdnWebApplicationFirewallPolicy]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cdn_web_application_firewall_policy_patch_parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CdnWebApplicationFirewallPolicy]" + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "None", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "CdnWebApplicationFirewallPolicy", + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.CdnWebApplicationFirewallPolicy]", + "overloads": [] + } + }, + "properties": {} + }, + "ProfilesOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_can_migrate": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "can_migrate_parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CanMigrateResult]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "can_migrate_parameters": { + "type": "CanMigrateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CanMigrateResult]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "can_migrate_parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CanMigrateResult]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "can_migrate_parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CanMigrateResult]" + } + ] + }, + "begin_cdn_can_migrate_to_afd": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CanMigrateResult]", + "overloads": [] + }, + "begin_cdn_migrate_to_afd": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "migration_parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[MigrateResult]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "migration_parameters": { + "type": "CdnMigrationToAfdParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[MigrateResult]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "migration_parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[MigrateResult]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "migration_parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[MigrateResult]" + } + ] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Profile]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile": { + "type": "Profile", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Profile]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Profile]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Profile]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]", + "overloads": [] + }, + "begin_migrate": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "migration_parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[MigrateResult]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "migration_parameters": { + "type": "MigrationParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[MigrateResult]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "migration_parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[MigrateResult]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "migration_parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[MigrateResult]" + } + ] + }, + "begin_migration_abort": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]", + "overloads": [] + }, + "begin_migration_commit": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_update_parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Profile]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_update_parameters": { + "type": "ProfileUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Profile]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_update_parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Profile]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_update_parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Profile]" + } + ] + }, + "generate_sso_uri": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "SsoUri", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "Profile", + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.Profile]", + "overloads": [] + }, + "list_by_resource_group": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.Profile]", + "overloads": [] + }, + "list_resource_usage": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.ResourceUsage]", + "overloads": [] + }, + "list_supported_optimization_types": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "SupportedOptimizationTypesListResult", + "overloads": [] + } + }, + "properties": {} + }, + "ResourceUsageOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.ResourceUsage]", + "overloads": [] + } + }, + "properties": {} + }, + "RoutesOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "route_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "route": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Route]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "route_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "route": { + "type": "Route", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Route]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "route_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "route": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Route]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "route_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "route": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Route]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "route_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "route_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "route_update_properties": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Route]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "route_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "route_update_properties": { + "type": "RouteUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Route]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "route_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "route_update_properties": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Route]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "route_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "route_update_properties": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Route]" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "route_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "Route", + "overloads": [] + }, + "list_by_endpoint": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.Route]", + "overloads": [] + } + }, + "properties": {} + }, + "RuleSetsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_set_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]", + "overloads": [] + }, + "create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_set_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "RuleSet", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_set_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "RuleSet", + "overloads": [] + }, + "list_by_profile": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.RuleSet]", + "overloads": [] + }, + "list_resource_usage": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_set_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.Usage]", + "overloads": [] + } + }, + "properties": {} + }, + "RulesOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_set_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "rule": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Rule]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_set_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "rule": { + "type": "Rule", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Rule]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_set_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "rule": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Rule]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_set_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "rule": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Rule]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_set_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_set_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_update_properties": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Rule]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_set_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_update_properties": { + "type": "RuleUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Rule]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_set_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_update_properties": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Rule]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_set_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_update_properties": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Rule]" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_set_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "Rule", + "overloads": [] + }, + "list_by_rule_set": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_set_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.Rule]", + "overloads": [] + } + }, + "properties": {} + }, + "SecretsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "secret_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "secret": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Secret]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "secret_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "secret": { + "type": "Secret", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Secret]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "secret_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "secret": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Secret]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "secret_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "secret": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Secret]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "secret_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "secret_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "Secret", + "overloads": [] + }, + "list_by_profile": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.Secret]", + "overloads": [] + } + }, + "properties": {} + }, + "SecurityPoliciesOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "security_policy_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "security_policy": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[SecurityPolicy]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "security_policy_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "security_policy": { + "type": "SecurityPolicy", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[SecurityPolicy]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "security_policy_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "security_policy": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[SecurityPolicy]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "security_policy_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "security_policy": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[SecurityPolicy]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "security_policy_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]", + "overloads": [] + }, + "begin_patch": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "security_policy_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "security_policy_update_properties": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[SecurityPolicy]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "security_policy_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "security_policy_update_properties": { + "type": "SecurityPolicyUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[SecurityPolicy]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "security_policy_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "security_policy_update_properties": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[SecurityPolicy]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "security_policy_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "security_policy_update_properties": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[SecurityPolicy]" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "security_policy_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "SecurityPolicy", + "overloads": [] + }, + "list_by_profile": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.SecurityPolicy]", + "overloads": [] + } + }, + "properties": {} + } + }, + "function_nodes": {} + }, + "azure.mgmt.cdn.models": { + "class_nodes": { + "AFDDomain": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.AFDDomainProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "AFDDomainHttpsCustomizedCipherSuiteSet": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "cipher_suite_set_for_tls12": { + "type": "Optional[list[Union[str, _models.AfdCustomizedCipherSuiteForTls12]]]", + "default": null, + "param_type": "keyword_only" + }, + "cipher_suite_set_for_tls13": { + "type": "Optional[list[Union[str, _models.AfdCustomizedCipherSuiteForTls13]]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "cipher_suite_set_for_tls12": "Optional", + "cipher_suite_set_for_tls13": "Optional" + } + }, + "AFDDomainHttpsParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_type": { + "type": "Union[str, _models.AfdCertificateType]", + "default": null, + "param_type": "keyword_only" + }, + "cipher_suite_set_type": { + "type": "Optional[Union[str, _models.AfdCipherSuiteSetType]]", + "default": null, + "param_type": "keyword_only" + }, + "minimum_tls_version": { + "type": "Optional[Union[str, _models.AfdMinimumTlsVersion]]", + "default": null, + "param_type": "keyword_only" + }, + "customized_cipher_suite_set": { + "type": "Optional[_models.AFDDomainHttpsCustomizedCipherSuiteSet]", + "default": null, + "param_type": "keyword_only" + }, + "secret": { + "type": "Optional[_models.ResourceReference]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "certificate_type": "Union", + "cipher_suite_set_type": "Optional", + "minimum_tls_version": "Optional", + "customized_cipher_suite_set": "Optional", + "secret": "Optional" + } + }, + "AFDDomainProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "host_name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "tls_settings": { + "type": "Optional[_models.AFDDomainHttpsParameters]", + "default": null, + "param_type": "keyword_only" + }, + "azure_dns_zone": { + "type": "Optional[_models.ResourceReference]", + "default": null, + "param_type": "keyword_only" + }, + "pre_validated_custom_domain_resource_id": { + "type": "Optional[_models.ResourceReference]", + "default": null, + "param_type": "keyword_only" + }, + "extended_properties": { + "type": "Optional[dict[str, str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "profile_name": "Optional", + "tls_settings": "Optional", + "azure_dns_zone": "Optional", + "pre_validated_custom_domain_resource_id": "Optional", + "provisioning_state": "Optional", + "deployment_status": "Optional", + "domain_validation_state": "Optional", + "host_name": null, + "extended_properties": "Optional", + "validation_properties": "Optional" + } + }, + "AFDDomainUpdateParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.AFDDomainUpdatePropertiesParameters]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "properties": "Optional" + } + }, + "AFDDomainUpdatePropertiesParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "tls_settings": { + "type": "Optional[_models.AFDDomainHttpsParameters]", + "default": null, + "param_type": "keyword_only" + }, + "azure_dns_zone": { + "type": "Optional[_models.ResourceReference]", + "default": null, + "param_type": "keyword_only" + }, + "pre_validated_custom_domain_resource_id": { + "type": "Optional[_models.ResourceReference]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "profile_name": "Optional", + "tls_settings": "Optional", + "azure_dns_zone": "Optional", + "pre_validated_custom_domain_resource_id": "Optional" + } + }, + "AFDEndpoint": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "tags": { + "type": "Optional[dict[str, str]]", + "default": null, + "param_type": "keyword_only" + }, + "properties": { + "type": "Optional[_models.AFDEndpointProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "tags": { + "type": "Optional[dict[str, str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "tags": "Optional", + "location": null, + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "AFDEndpointProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "enabled_state": { + "type": "Optional[Union[str, _models.EnabledState]]", + "default": null, + "param_type": "keyword_only" + }, + "auto_generated_domain_name_label_scope": { + "type": "Optional[Union[str, _models.AutoGeneratedDomainNameLabelScope]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "profile_name": "Optional", + "enabled_state": "Optional", + "provisioning_state": "Optional", + "deployment_status": "Optional", + "host_name": "Optional", + "auto_generated_domain_name_label_scope": "Optional" + } + }, + "AFDEndpointPropertiesUpdateParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "enabled_state": { + "type": "Optional[Union[str, _models.EnabledState]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "profile_name": "Optional", + "enabled_state": "Optional" + } + }, + "AFDEndpointProtocols": { + "type": "Enum", + "methods": {}, + "properties": { + "HTTP": "HTTP", + "HTTPS": "HTTPS", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "AFDEndpointUpdateParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "tags": { + "type": "Optional[dict[str, str]]", + "default": null, + "param_type": "keyword_only" + }, + "properties": { + "type": "Optional[_models.AFDEndpointPropertiesUpdateParameters]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "tags": "Optional", + "properties": "Optional" + } + }, + "AFDOrigin": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.AFDOriginProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "AFDOriginGroup": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.AFDOriginGroupProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "AFDOriginGroupProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "load_balancing_settings": { + "type": "Optional[_models.LoadBalancingSettingsParameters]", + "default": null, + "param_type": "keyword_only" + }, + "health_probe_settings": { + "type": "Optional[_models.HealthProbeParameters]", + "default": null, + "param_type": "keyword_only" + }, + "traffic_restoration_time_to_healed_or_new_endpoints_in_minutes": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "session_affinity_state": { + "type": "Optional[Union[str, _models.EnabledState]]", + "default": null, + "param_type": "keyword_only" + }, + "authentication": { + "type": "Optional[_models.OriginAuthenticationProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "profile_name": "Optional", + "load_balancing_settings": "Optional", + "health_probe_settings": "Optional", + "traffic_restoration_time_to_healed_or_new_endpoints_in_minutes": "Optional", + "session_affinity_state": "Optional", + "authentication": "Optional", + "provisioning_state": "Optional", + "deployment_status": "Optional" + } + }, + "AFDOriginGroupUpdateParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.AFDOriginGroupUpdatePropertiesParameters]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "properties": "Optional" + } + }, + "AFDOriginGroupUpdatePropertiesParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "load_balancing_settings": { + "type": "Optional[_models.LoadBalancingSettingsParameters]", + "default": null, + "param_type": "keyword_only" + }, + "health_probe_settings": { + "type": "Optional[_models.HealthProbeParameters]", + "default": null, + "param_type": "keyword_only" + }, + "traffic_restoration_time_to_healed_or_new_endpoints_in_minutes": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "session_affinity_state": { + "type": "Optional[Union[str, _models.EnabledState]]", + "default": null, + "param_type": "keyword_only" + }, + "authentication": { + "type": "Optional[_models.OriginAuthenticationProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "profile_name": "Optional", + "load_balancing_settings": "Optional", + "health_probe_settings": "Optional", + "traffic_restoration_time_to_healed_or_new_endpoints_in_minutes": "Optional", + "session_affinity_state": "Optional", + "authentication": "Optional" + } + }, + "AFDOriginProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "azure_origin": { + "type": "Optional[_models.ResourceReference]", + "default": null, + "param_type": "keyword_only" + }, + "host_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "http_port": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "https_port": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "origin_host_header": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "priority": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "weight": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "shared_private_link_resource": { + "type": "Optional[_models.SharedPrivateLinkResourceProperties]", + "default": null, + "param_type": "keyword_only" + }, + "enabled_state": { + "type": "Optional[Union[str, _models.EnabledState]]", + "default": null, + "param_type": "keyword_only" + }, + "enforce_certificate_name_check": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "origin_group_name": "Optional", + "azure_origin": "Optional", + "host_name": "Optional", + "http_port": "Optional", + "https_port": "Optional", + "origin_host_header": "Optional", + "priority": "Optional", + "weight": "Optional", + "shared_private_link_resource": "Optional", + "enabled_state": "Optional", + "enforce_certificate_name_check": "Optional", + "provisioning_state": "Optional", + "deployment_status": "Optional" + } + }, + "AFDOriginUpdateParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.AFDOriginUpdatePropertiesParameters]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "properties": "Optional" + } + }, + "AFDOriginUpdatePropertiesParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "azure_origin": { + "type": "Optional[_models.ResourceReference]", + "default": null, + "param_type": "keyword_only" + }, + "host_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "http_port": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "https_port": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "origin_host_header": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "priority": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "weight": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "shared_private_link_resource": { + "type": "Optional[_models.SharedPrivateLinkResourceProperties]", + "default": null, + "param_type": "keyword_only" + }, + "enabled_state": { + "type": "Optional[Union[str, _models.EnabledState]]", + "default": null, + "param_type": "keyword_only" + }, + "enforce_certificate_name_check": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "origin_group_name": "Optional", + "azure_origin": "Optional", + "host_name": "Optional", + "http_port": "Optional", + "https_port": "Optional", + "origin_host_header": "Optional", + "priority": "Optional", + "weight": "Optional", + "shared_private_link_resource": "Optional", + "enabled_state": "Optional", + "enforce_certificate_name_check": "Optional" + } + }, + "AFDStateProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "provisioning_state": "Optional", + "deployment_status": "Optional" + } + }, + "ActionType": { + "type": "Enum", + "methods": {}, + "properties": { + "ALLOW": "ALLOW", + "BLOCK": "BLOCK", + "LOG": "LOG", + "REDIRECT": "REDIRECT", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ActivatedResourceReference": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "id": "Optional", + "is_active": "Optional" + } + }, + "AfdCertificateType": { + "type": "Enum", + "methods": {}, + "properties": { + "AZURE_FIRST_PARTY_MANAGED_CERTIFICATE": "AZURE_FIRST_PARTY_MANAGED_CERTIFICATE", + "CUSTOMER_CERTIFICATE": "CUSTOMER_CERTIFICATE", + "MANAGED_CERTIFICATE": "MANAGED_CERTIFICATE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "AfdCipherSuiteSetType": { + "type": "Enum", + "methods": {}, + "properties": { + "CUSTOMIZED": "CUSTOMIZED", + "TLS10_2019": "TLS10_2019", + "TLS12_2022": "TLS12_2022", + "TLS12_2023": "TLS12_2023", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "AfdCustomizedCipherSuiteForTls12": { + "type": "Enum", + "methods": {}, + "properties": { + "DHE_RSA_AES128_GCM_SHA256": "DHE_RSA_AES128_GCM_SHA256", + "DHE_RSA_AES256_GCM_SHA384": "DHE_RSA_AES256_GCM_SHA384", + "ECDHE_RSA_AES128_GCM_SHA256": "ECDHE_RSA_AES128_GCM_SHA256", + "ECDHE_RSA_AES128_SHA256": "ECDHE_RSA_AES128_SHA256", + "ECDHE_RSA_AES256_GCM_SHA384": "ECDHE_RSA_AES256_GCM_SHA384", + "ECDHE_RSA_AES256_SHA384": "ECDHE_RSA_AES256_SHA384", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "AfdCustomizedCipherSuiteForTls13": { + "type": "Enum", + "methods": {}, + "properties": { + "TLS_AES128_GCM_SHA256": "TLS_AES128_GCM_SHA256", + "TLS_AES256_GCM_SHA384": "TLS_AES256_GCM_SHA384", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "AfdMinimumTlsVersion": { + "type": "Enum", + "methods": {}, + "properties": { + "TLS10": "TLS10", + "TLS12": "TLS12", + "TLS13": "TLS13", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "AfdProvisioningState": { + "type": "Enum", + "methods": {}, + "properties": { + "CREATING": "CREATING", + "DELETING": "DELETING", + "FAILED": "FAILED", + "SUCCEEDED": "SUCCEEDED", + "UPDATING": "UPDATING", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "AfdPurgeParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "content_paths": { + "type": "list[str]", + "default": null, + "param_type": "keyword_only" + }, + "domains": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "content_paths": "list", + "domains": "Optional" + } + }, + "AfdQueryStringCachingBehavior": { + "type": "Enum", + "methods": {}, + "properties": { + "IGNORE_QUERY_STRING": "IGNORE_QUERY_STRING", + "IGNORE_SPECIFIED_QUERY_STRINGS": "IGNORE_SPECIFIED_QUERY_STRINGS", + "INCLUDE_SPECIFIED_QUERY_STRINGS": "INCLUDE_SPECIFIED_QUERY_STRINGS", + "USE_QUERY_STRING": "USE_QUERY_STRING", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "AfdRouteCacheConfiguration": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "query_string_caching_behavior": { + "type": "Optional[Union[str, _models.AfdQueryStringCachingBehavior]]", + "default": null, + "param_type": "keyword_only" + }, + "query_parameters": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "compression_settings": { + "type": "Optional[_models.CompressionSettings]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "query_string_caching_behavior": "Optional", + "query_parameters": "Optional", + "compression_settings": "Optional" + } + }, + "Algorithm": { + "type": "Enum", + "methods": {}, + "properties": { + "SHA256": "SHA256", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "AutoGeneratedDomainNameLabelScope": { + "type": "Enum", + "methods": {}, + "properties": { + "NO_REUSE": "NO_REUSE", + "RESOURCE_GROUP_REUSE": "RESOURCE_GROUP_REUSE", + "SUBSCRIPTION_REUSE": "SUBSCRIPTION_REUSE", + "TENANT_REUSE": "TENANT_REUSE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "AzureFirstPartyManagedCertificateParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "subject_alternative_names": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "type": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "secret_source": "Optional", + "subject": "Optional", + "expiration_date": "Optional", + "certificate_authority": "Optional", + "subject_alternative_names": "Optional", + "thumbprint": "Optional", + "type": null + } + }, + "CacheBehavior": { + "type": "Enum", + "methods": {}, + "properties": { + "BYPASS_CACHE": "BYPASS_CACHE", + "OVERRIDE": "OVERRIDE", + "SET_IF_MISSING": "SET_IF_MISSING", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "CacheConfiguration": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "query_string_caching_behavior": { + "type": "Optional[Union[str, _models.RuleQueryStringCachingBehavior]]", + "default": null, + "param_type": "keyword_only" + }, + "query_parameters": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "is_compression_enabled": { + "type": "Optional[Union[str, _models.RuleIsCompressionEnabled]]", + "default": null, + "param_type": "keyword_only" + }, + "cache_behavior": { + "type": "Optional[Union[str, _models.RuleCacheBehavior]]", + "default": null, + "param_type": "keyword_only" + }, + "cache_duration": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "query_string_caching_behavior": "Optional", + "query_parameters": "Optional", + "is_compression_enabled": "Optional", + "cache_behavior": "Optional", + "cache_duration": "Optional" + } + }, + "CacheExpirationActionParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "cache_behavior": { + "type": "Union[str, _models.CacheBehavior]", + "default": null, + "param_type": "keyword_only" + }, + "cache_type": { + "type": "Union[str, _models.CacheType]", + "default": null, + "param_type": "keyword_only" + }, + "cache_duration": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "type_name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "cache_behavior": "Union", + "cache_type": "Union", + "cache_duration": "Optional", + "type_name": null + } + }, + "CacheKeyQueryStringActionParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "query_string_behavior": { + "type": "Union[str, _models.QueryStringBehavior]", + "default": null, + "param_type": "keyword_only" + }, + "query_parameters": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "type_name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "query_string_behavior": "Union", + "query_parameters": "Optional", + "type_name": null + } + }, + "CacheType": { + "type": "Enum", + "methods": {}, + "properties": { + "ALL": "ALL", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "CanMigrateDefaultSku": { + "type": "Enum", + "methods": {}, + "properties": { + "PREMIUM_AZURE_FRONT_DOOR": "PREMIUM_AZURE_FRONT_DOOR", + "STANDARD_AZURE_FRONT_DOOR": "STANDARD_AZURE_FRONT_DOOR", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "CanMigrateParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "classic_resource_reference": { + "type": "_models.ResourceReference", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "classic_resource_reference": null + } + }, + "CanMigrateProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "errors": { + "type": "Optional[list[_models.MigrationErrorType]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "can_migrate": "Optional", + "default_sku": "Optional", + "errors": "Optional" + } + }, + "CanMigrateResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.CanMigrateProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "id": "Optional", + "type": "Optional", + "properties": "Optional" + } + }, + "CdnCertificateSourceParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_type": { + "type": "Union[str, _models.CertificateType]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "type_name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "certificate_type": "Union", + "type_name": null + } + }, + "CdnEndpoint": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "id": "Optional" + } + }, + "CdnManagedHttpsParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "protocol_type": { + "type": "Union[str, _models.ProtocolType]", + "default": null, + "param_type": "keyword_only" + }, + "certificate_source_parameters": { + "type": "_models.CdnCertificateSourceParameters", + "default": null, + "param_type": "keyword_only" + }, + "minimum_tls_version": { + "type": "Optional[Union[str, _models.MinimumTlsVersion]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_source": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "protocol_type": { + "type": "Union[str, _models.ProtocolType]", + "default": null, + "param_type": "keyword_only" + }, + "minimum_tls_version": { + "type": "Optional[Union[str, _models.MinimumTlsVersion]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "certificate_source_parameters": null, + "certificate_source": null, + "protocol_type": "Union", + "minimum_tls_version": "Optional" + } + }, + "CdnMigrationToAfdParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "sku": { + "type": "_models.Sku", + "default": null, + "param_type": "keyword_only" + }, + "migration_endpoint_mappings": { + "type": "Optional[list[_models.MigrationEndpointMapping]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "sku": null, + "migration_endpoint_mappings": "Optional" + } + }, + "CdnWebApplicationFirewallPolicy": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "sku": { + "type": "_models.Sku", + "default": null, + "param_type": "keyword_only" + }, + "tags": { + "type": "Optional[dict[str, str]]", + "default": null, + "param_type": "keyword_only" + }, + "properties": { + "type": "Optional[_models.CdnWebApplicationFirewallPolicyProperties]", + "default": null, + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "tags": { + "type": "Optional[dict[str, str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "etag": "Optional", + "sku": null, + "tags": "Optional", + "location": null, + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "CdnWebApplicationFirewallPolicyPatchParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "tags": { + "type": "Optional[dict[str, str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "tags": "Optional" + } + }, + "CdnWebApplicationFirewallPolicyProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_settings": { + "type": "Optional[_models.PolicySettings]", + "default": null, + "param_type": "keyword_only" + }, + "rate_limit_rules": { + "type": "Optional[_models.RateLimitRuleList]", + "default": null, + "param_type": "keyword_only" + }, + "custom_rules": { + "type": "Optional[_models.CustomRuleList]", + "default": null, + "param_type": "keyword_only" + }, + "managed_rules": { + "type": "Optional[_models.ManagedRuleSetList]", + "default": null, + "param_type": "keyword_only" + }, + "extended_properties": { + "type": "Optional[dict[str, str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "policy_settings": "Optional", + "rate_limit_rules": "Optional", + "custom_rules": "Optional", + "managed_rules": "Optional", + "endpoint_links": "Optional", + "extended_properties": "Optional", + "provisioning_state": "Optional", + "resource_state": "Optional" + } + }, + "CertificateSource": { + "type": "Enum", + "methods": {}, + "properties": { + "AZURE_KEY_VAULT": "AZURE_KEY_VAULT", + "CDN": "CDN", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "CertificateSourceParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "type_name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "type_name": null + } + }, + "CertificateSourceParametersType": { + "type": "Enum", + "methods": {}, + "properties": { + "CDN_CERTIFICATE_SOURCE_PARAMETERS": "CDN_CERTIFICATE_SOURCE_PARAMETERS", + "KEY_VAULT_CERTIFICATE_SOURCE_PARAMETERS": "KEY_VAULT_CERTIFICATE_SOURCE_PARAMETERS", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "CertificateType": { + "type": "Enum", + "methods": {}, + "properties": { + "DEDICATED": "DEDICATED", + "SHARED": "SHARED", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "CheckEndpointNameAvailabilityInput": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "type": { + "type": "Union[str, _models.ResourceType]", + "default": null, + "param_type": "keyword_only" + }, + "auto_generated_domain_name_label_scope": { + "type": "Optional[Union[str, _models.AutoGeneratedDomainNameLabelScope]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "name": null, + "type": "Union", + "auto_generated_domain_name_label_scope": "Optional" + } + }, + "CheckEndpointNameAvailabilityOutput": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "name_available": "Optional", + "available_hostname": "Optional", + "reason": "Optional", + "message": "Optional" + } + }, + "CheckHostNameAvailabilityInput": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "host_name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "host_name": null + } + }, + "CheckNameAvailabilityInput": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "type": { + "type": "Union[str, _models.ResourceType]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "name": null, + "type": "Union" + } + }, + "CheckNameAvailabilityOutput": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "name_available": "Optional", + "reason": "Optional", + "message": "Optional" + } + }, + "CidrIpAddress": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "base_ip_address": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "prefix_length": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "base_ip_address": "Optional", + "prefix_length": "Optional" + } + }, + "ClientPortMatchConditionParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "operator": { + "type": "Union[str, _models.ClientPortOperator]", + "default": null, + "param_type": "keyword_only" + }, + "negate_condition": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "match_values": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "transforms": { + "type": "Optional[list[Union[str, _models.Transform]]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "type_name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "operator": "Union", + "negate_condition": "Optional", + "match_values": "Optional", + "transforms": "Optional", + "type_name": null + } + }, + "ClientPortOperator": { + "type": "Enum", + "methods": {}, + "properties": { + "ANY": "ANY", + "BEGINS_WITH": "BEGINS_WITH", + "CONTAINS": "CONTAINS", + "ENDS_WITH": "ENDS_WITH", + "EQUAL": "EQUAL", + "GREATER_THAN": "GREATER_THAN", + "GREATER_THAN_OR_EQUAL": "GREATER_THAN_OR_EQUAL", + "LESS_THAN": "LESS_THAN", + "LESS_THAN_OR_EQUAL": "LESS_THAN_OR_EQUAL", + "REG_EX": "REG_EX", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "Components18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsPropertiesDataItems": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "date_time": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + }, + "value": { + "type": "Optional[float]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "date_time": "Optional", + "value": "Optional" + } + }, + "Components1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsPropertiesDataItems": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "date_time": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + }, + "value": { + "type": "Optional[float]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "date_time": "Optional", + "value": "Optional" + } + }, + "ComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItems": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "metric": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "value": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "percentage": { + "type": "Optional[float]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "metric": "Optional", + "value": "Optional", + "percentage": "Optional" + } + }, + "CompressionSettings": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "content_types_to_compress": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "is_compression_enabled": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "content_types_to_compress": "Optional", + "is_compression_enabled": "Optional" + } + }, + "ContinentsResponse": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "continents": { + "type": "Optional[list[_models.ContinentsResponseContinentsItem]]", + "default": null, + "param_type": "keyword_only" + }, + "country_or_regions": { + "type": "Optional[list[_models.ContinentsResponseCountryOrRegionsItem]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "continents": "Optional", + "country_or_regions": "Optional" + } + }, + "ContinentsResponseContinentsItem": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "id": "Optional" + } + }, + "ContinentsResponseCountryOrRegionsItem": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "continent_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "id": "Optional", + "continent_id": "Optional" + } + }, + "CookiesMatchConditionParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "operator": { + "type": "Union[str, _models.CookiesOperator]", + "default": null, + "param_type": "keyword_only" + }, + "selector": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "negate_condition": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "match_values": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "transforms": { + "type": "Optional[list[Union[str, _models.Transform]]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "type_name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "selector": "Optional", + "operator": "Union", + "negate_condition": "Optional", + "match_values": "Optional", + "transforms": "Optional", + "type_name": null + } + }, + "CookiesOperator": { + "type": "Enum", + "methods": {}, + "properties": { + "ANY": "ANY", + "BEGINS_WITH": "BEGINS_WITH", + "CONTAINS": "CONTAINS", + "ENDS_WITH": "ENDS_WITH", + "EQUAL": "EQUAL", + "GREATER_THAN": "GREATER_THAN", + "GREATER_THAN_OR_EQUAL": "GREATER_THAN_OR_EQUAL", + "LESS_THAN": "LESS_THAN", + "LESS_THAN_OR_EQUAL": "LESS_THAN_OR_EQUAL", + "REG_EX": "REG_EX", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "CreatedByType": { + "type": "Enum", + "methods": {}, + "properties": { + "APPLICATION": "APPLICATION", + "KEY": "KEY", + "MANAGED_IDENTITY": "MANAGED_IDENTITY", + "USER": "USER", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "CustomDomain": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.CustomDomainProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "CustomDomainHttpsParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_source": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "protocol_type": { + "type": "Union[str, _models.ProtocolType]", + "default": null, + "param_type": "keyword_only" + }, + "minimum_tls_version": { + "type": "Optional[Union[str, _models.MinimumTlsVersion]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "certificate_source": null, + "protocol_type": "Union", + "minimum_tls_version": "Optional" + } + }, + "CustomDomainParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.CustomDomainPropertiesParameters]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "properties": "Optional" + } + }, + "CustomDomainProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "host_name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "custom_https_parameters": { + "type": "Optional[_models.CustomDomainHttpsParameters]", + "default": null, + "param_type": "keyword_only" + }, + "validation_data": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "host_name": null, + "resource_state": "Optional", + "custom_https_provisioning_state": "Optional", + "custom_https_provisioning_substate": "Optional", + "custom_https_parameters": "Optional", + "validation_data": "Optional", + "provisioning_state": "Optional" + } + }, + "CustomDomainPropertiesParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "host_name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "host_name": null + } + }, + "CustomDomainResourceState": { + "type": "Enum", + "methods": {}, + "properties": { + "ACTIVE": "ACTIVE", + "CREATING": "CREATING", + "DELETING": "DELETING", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "CustomHttpsProvisioningState": { + "type": "Enum", + "methods": {}, + "properties": { + "DISABLED": "DISABLED", + "DISABLING": "DISABLING", + "ENABLED": "ENABLED", + "ENABLING": "ENABLING", + "FAILED": "FAILED", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "CustomHttpsProvisioningSubstate": { + "type": "Enum", + "methods": {}, + "properties": { + "CERTIFICATE_DELETED": "CERTIFICATE_DELETED", + "CERTIFICATE_DEPLOYED": "CERTIFICATE_DEPLOYED", + "DELETING_CERTIFICATE": "DELETING_CERTIFICATE", + "DEPLOYING_CERTIFICATE": "DEPLOYING_CERTIFICATE", + "DOMAIN_CONTROL_VALIDATION_REQUEST_APPROVED": "DOMAIN_CONTROL_VALIDATION_REQUEST_APPROVED", + "DOMAIN_CONTROL_VALIDATION_REQUEST_REJECTED": "DOMAIN_CONTROL_VALIDATION_REQUEST_REJECTED", + "DOMAIN_CONTROL_VALIDATION_REQUEST_TIMED_OUT": "DOMAIN_CONTROL_VALIDATION_REQUEST_TIMED_OUT", + "ISSUING_CERTIFICATE": "ISSUING_CERTIFICATE", + "PENDING_DOMAIN_CONTROL_VALIDATION_R_EQUEST_APPROVAL": "PENDING_DOMAIN_CONTROL_VALIDATION_R_EQUEST_APPROVAL", + "SUBMITTING_DOMAIN_CONTROL_VALIDATION_REQUEST": "SUBMITTING_DOMAIN_CONTROL_VALIDATION_REQUEST", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "CustomRule": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "priority": { + "type": "int", + "default": null, + "param_type": "keyword_only" + }, + "match_conditions": { + "type": "list[_models.MatchCondition]", + "default": null, + "param_type": "keyword_only" + }, + "action": { + "type": "Union[str, _models.ActionType]", + "default": null, + "param_type": "keyword_only" + }, + "enabled_state": { + "type": "Optional[Union[str, _models.CustomRuleEnabledState]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "name": null, + "enabled_state": "Optional", + "priority": null, + "match_conditions": "list", + "action": "Union" + } + }, + "CustomRuleEnabledState": { + "type": "Enum", + "methods": {}, + "properties": { + "DISABLED": "DISABLED", + "ENABLED": "ENABLED", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "CustomRuleList": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "rules": { + "type": "Optional[list[_models.CustomRule]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "rules": "Optional" + } + }, + "CustomerCertificateParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "secret_source": { + "type": "_models.ResourceReference", + "default": null, + "param_type": "keyword_only" + }, + "secret_version": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "use_latest_version": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "type": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "secret_source": null, + "secret_version": "Optional", + "use_latest_version": "Optional", + "subject": "Optional", + "expiration_date": "Optional", + "certificate_authority": "Optional", + "subject_alternative_names": "Optional", + "thumbprint": "Optional", + "type": null + } + }, + "DeepCreatedCustomDomain": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "properties": { + "type": "Optional[_models.DeepCreatedCustomDomainProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "name": null, + "properties": "Optional" + } + }, + "DeepCreatedCustomDomainProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "host_name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "validation_data": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "host_name": null, + "validation_data": "Optional" + } + }, + "DeepCreatedOrigin": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "properties": { + "type": "Optional[_models.DeepCreatedOriginProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "name": null, + "properties": "Optional" + } + }, + "DeepCreatedOriginGroup": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "properties": { + "type": "Optional[_models.DeepCreatedOriginGroupProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "name": null, + "properties": "Optional" + } + }, + "DeepCreatedOriginGroupProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "origins": { + "type": "list[_models.ResourceReference]", + "default": null, + "param_type": "keyword_only" + }, + "health_probe_settings": { + "type": "Optional[_models.HealthProbeParameters]", + "default": null, + "param_type": "keyword_only" + }, + "traffic_restoration_time_to_healed_or_new_endpoints_in_minutes": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "response_based_origin_error_detection_settings": { + "type": "Optional[_models.ResponseBasedOriginErrorDetectionParameters]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "health_probe_settings": "Optional", + "origins": "list", + "traffic_restoration_time_to_healed_or_new_endpoints_in_minutes": "Optional", + "response_based_origin_error_detection_settings": "Optional" + } + }, + "DeepCreatedOriginProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "host_name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "http_port": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "https_port": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "origin_host_header": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "priority": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "weight": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "enabled": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "private_link_alias": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "private_link_resource_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "private_link_location": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "private_link_approval_message": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "host_name": null, + "http_port": "Optional", + "https_port": "Optional", + "origin_host_header": "Optional", + "priority": "Optional", + "weight": "Optional", + "enabled": "Optional", + "private_link_alias": "Optional", + "private_link_resource_id": "Optional", + "private_link_location": "Optional", + "private_link_approval_message": "Optional", + "private_endpoint_status": "Optional" + } + }, + "DeleteRule": { + "type": "Enum", + "methods": {}, + "properties": { + "NO_ACTION": "NO_ACTION", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "DeliveryRule": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "order": { + "type": "int", + "default": null, + "param_type": "keyword_only" + }, + "actions": { + "type": "list[_models.DeliveryRuleAction]", + "default": null, + "param_type": "keyword_only" + }, + "name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "conditions": { + "type": "Optional[list[_models.DeliveryRuleCondition]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "name": "Optional", + "order": null, + "conditions": "Optional", + "actions": "list" + } + }, + "DeliveryRuleAction": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "name": null + } + }, + "DeliveryRuleActionName": { + "type": "Enum", + "methods": {}, + "properties": { + "CACHE_EXPIRATION": "CACHE_EXPIRATION", + "CACHE_KEY_QUERY_STRING": "CACHE_KEY_QUERY_STRING", + "MODIFY_REQUEST_HEADER": "MODIFY_REQUEST_HEADER", + "MODIFY_RESPONSE_HEADER": "MODIFY_RESPONSE_HEADER", + "ORIGIN_GROUP_OVERRIDE": "ORIGIN_GROUP_OVERRIDE", + "ROUTE_CONFIGURATION_OVERRIDE": "ROUTE_CONFIGURATION_OVERRIDE", + "URL_REDIRECT": "URL_REDIRECT", + "URL_REWRITE": "URL_REWRITE", + "URL_SIGNING": "URL_SIGNING", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "DeliveryRuleActionParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "type_name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "type_name": null + } + }, + "DeliveryRuleActionParametersType": { + "type": "Enum", + "methods": {}, + "properties": { + "DELIVERY_RULE_CACHE_EXPIRATION_ACTION_PARAMETERS": "DELIVERY_RULE_CACHE_EXPIRATION_ACTION_PARAMETERS", + "DELIVERY_RULE_CACHE_KEY_QUERY_STRING_BEHAVIOR_ACTION_PARAMETERS": "DELIVERY_RULE_CACHE_KEY_QUERY_STRING_BEHAVIOR_ACTION_PARAMETERS", + "DELIVERY_RULE_HEADER_ACTION_PARAMETERS": "DELIVERY_RULE_HEADER_ACTION_PARAMETERS", + "DELIVERY_RULE_ORIGIN_GROUP_OVERRIDE_ACTION_PARAMETERS": "DELIVERY_RULE_ORIGIN_GROUP_OVERRIDE_ACTION_PARAMETERS", + "DELIVERY_RULE_ROUTE_CONFIGURATION_OVERRIDE_ACTION_PARAMETERS": "DELIVERY_RULE_ROUTE_CONFIGURATION_OVERRIDE_ACTION_PARAMETERS", + "DELIVERY_RULE_URL_REDIRECT_ACTION_PARAMETERS": "DELIVERY_RULE_URL_REDIRECT_ACTION_PARAMETERS", + "DELIVERY_RULE_URL_REWRITE_ACTION_PARAMETERS": "DELIVERY_RULE_URL_REWRITE_ACTION_PARAMETERS", + "DELIVERY_RULE_URL_SIGNING_ACTION_PARAMETERS": "DELIVERY_RULE_URL_SIGNING_ACTION_PARAMETERS", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "DeliveryRuleCacheExpirationAction": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "_models.CacheExpirationActionParameters", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "parameters": null, + "name": null + } + }, + "DeliveryRuleCacheKeyQueryStringAction": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "_models.CacheKeyQueryStringActionParameters", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "parameters": null, + "name": null + } + }, + "DeliveryRuleClientPortCondition": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "_models.ClientPortMatchConditionParameters", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "parameters": null, + "name": null + } + }, + "DeliveryRuleCondition": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "name": null + } + }, + "DeliveryRuleConditionParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "type_name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "type_name": null + } + }, + "DeliveryRuleConditionParametersType": { + "type": "Enum", + "methods": {}, + "properties": { + "DELIVERY_RULE_CLIENT_PORT_CONDITION_PARAMETERS": "DELIVERY_RULE_CLIENT_PORT_CONDITION_PARAMETERS", + "DELIVERY_RULE_COOKIES_CONDITION_PARAMETERS": "DELIVERY_RULE_COOKIES_CONDITION_PARAMETERS", + "DELIVERY_RULE_HOST_NAME_CONDITION_PARAMETERS": "DELIVERY_RULE_HOST_NAME_CONDITION_PARAMETERS", + "DELIVERY_RULE_HTTP_VERSION_CONDITION_PARAMETERS": "DELIVERY_RULE_HTTP_VERSION_CONDITION_PARAMETERS", + "DELIVERY_RULE_IS_DEVICE_CONDITION_PARAMETERS": "DELIVERY_RULE_IS_DEVICE_CONDITION_PARAMETERS", + "DELIVERY_RULE_POST_ARGS_CONDITION_PARAMETERS": "DELIVERY_RULE_POST_ARGS_CONDITION_PARAMETERS", + "DELIVERY_RULE_QUERY_STRING_CONDITION_PARAMETERS": "DELIVERY_RULE_QUERY_STRING_CONDITION_PARAMETERS", + "DELIVERY_RULE_REMOTE_ADDRESS_CONDITION_PARAMETERS": "DELIVERY_RULE_REMOTE_ADDRESS_CONDITION_PARAMETERS", + "DELIVERY_RULE_REQUEST_BODY_CONDITION_PARAMETERS": "DELIVERY_RULE_REQUEST_BODY_CONDITION_PARAMETERS", + "DELIVERY_RULE_REQUEST_HEADER_CONDITION_PARAMETERS": "DELIVERY_RULE_REQUEST_HEADER_CONDITION_PARAMETERS", + "DELIVERY_RULE_REQUEST_METHOD_CONDITION_PARAMETERS": "DELIVERY_RULE_REQUEST_METHOD_CONDITION_PARAMETERS", + "DELIVERY_RULE_REQUEST_SCHEME_CONDITION_PARAMETERS": "DELIVERY_RULE_REQUEST_SCHEME_CONDITION_PARAMETERS", + "DELIVERY_RULE_REQUEST_URI_CONDITION_PARAMETERS": "DELIVERY_RULE_REQUEST_URI_CONDITION_PARAMETERS", + "DELIVERY_RULE_SERVER_PORT_CONDITION_PARAMETERS": "DELIVERY_RULE_SERVER_PORT_CONDITION_PARAMETERS", + "DELIVERY_RULE_SOCKET_ADDR_CONDITION_PARAMETERS": "DELIVERY_RULE_SOCKET_ADDR_CONDITION_PARAMETERS", + "DELIVERY_RULE_SSL_PROTOCOL_CONDITION_PARAMETERS": "DELIVERY_RULE_SSL_PROTOCOL_CONDITION_PARAMETERS", + "DELIVERY_RULE_URL_FILENAME_CONDITION_PARAMETERS": "DELIVERY_RULE_URL_FILENAME_CONDITION_PARAMETERS", + "DELIVERY_RULE_URL_FILE_EXTENSION_MATCH_CONDITION_PARAMETERS": "DELIVERY_RULE_URL_FILE_EXTENSION_MATCH_CONDITION_PARAMETERS", + "DELIVERY_RULE_URL_PATH_MATCH_CONDITION_PARAMETERS": "DELIVERY_RULE_URL_PATH_MATCH_CONDITION_PARAMETERS", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "DeliveryRuleCookiesCondition": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "_models.CookiesMatchConditionParameters", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "parameters": null, + "name": null + } + }, + "DeliveryRuleHostNameCondition": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "_models.HostNameMatchConditionParameters", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "parameters": null, + "name": null + } + }, + "DeliveryRuleHttpVersionCondition": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "_models.HttpVersionMatchConditionParameters", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "parameters": null, + "name": null + } + }, + "DeliveryRuleIsDeviceCondition": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "_models.IsDeviceMatchConditionParameters", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "parameters": null, + "name": null + } + }, + "DeliveryRulePostArgsCondition": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "_models.PostArgsMatchConditionParameters", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "parameters": null, + "name": null + } + }, + "DeliveryRuleQueryStringCondition": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "_models.QueryStringMatchConditionParameters", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "parameters": null, + "name": null + } + }, + "DeliveryRuleRemoteAddressCondition": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "_models.RemoteAddressMatchConditionParameters", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "parameters": null, + "name": null + } + }, + "DeliveryRuleRequestBodyCondition": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "_models.RequestBodyMatchConditionParameters", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "parameters": null, + "name": null + } + }, + "DeliveryRuleRequestHeaderAction": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "_models.HeaderActionParameters", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "parameters": null, + "name": null + } + }, + "DeliveryRuleRequestHeaderCondition": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "_models.RequestHeaderMatchConditionParameters", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "parameters": null, + "name": null + } + }, + "DeliveryRuleRequestMethodCondition": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "_models.RequestMethodMatchConditionParameters", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "parameters": null, + "name": null + } + }, + "DeliveryRuleRequestSchemeCondition": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "_models.RequestSchemeMatchConditionParameters", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "parameters": null, + "name": null + } + }, + "DeliveryRuleRequestUriCondition": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "_models.RequestUriMatchConditionParameters", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "parameters": null, + "name": null + } + }, + "DeliveryRuleResponseHeaderAction": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "_models.HeaderActionParameters", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "parameters": null, + "name": null + } + }, + "DeliveryRuleRouteConfigurationOverrideAction": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "_models.RouteConfigurationOverrideActionParameters", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "parameters": null, + "name": null + } + }, + "DeliveryRuleServerPortCondition": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "_models.ServerPortMatchConditionParameters", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "parameters": null, + "name": null + } + }, + "DeliveryRuleSocketAddrCondition": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "_models.SocketAddrMatchConditionParameters", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "parameters": null, + "name": null + } + }, + "DeliveryRuleSslProtocolCondition": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "_models.SslProtocolMatchConditionParameters", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "parameters": null, + "name": null + } + }, + "DeliveryRuleUrlFileExtensionCondition": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "_models.UrlFileExtensionMatchConditionParameters", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "parameters": null, + "name": null + } + }, + "DeliveryRuleUrlFileNameCondition": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "_models.UrlFileNameMatchConditionParameters", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "parameters": null, + "name": null + } + }, + "DeliveryRuleUrlPathCondition": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "_models.UrlPathMatchConditionParameters", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "parameters": null, + "name": null + } + }, + "DeploymentStatus": { + "type": "Enum", + "methods": {}, + "properties": { + "FAILED": "FAILED", + "IN_PROGRESS": "IN_PROGRESS", + "NOT_STARTED": "NOT_STARTED", + "SUCCEEDED": "SUCCEEDED", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "DestinationProtocol": { + "type": "Enum", + "methods": {}, + "properties": { + "HTTP": "HTTP", + "HTTPS": "HTTPS", + "MATCH_REQUEST": "MATCH_REQUEST", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "DimensionProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "display_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "internal_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "name": "Optional", + "display_name": "Optional", + "internal_name": "Optional" + } + }, + "DomainValidationProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "validation_token": "Optional", + "expiration_date": "Optional" + } + }, + "DomainValidationState": { + "type": "Enum", + "methods": {}, + "properties": { + "APPROVED": "APPROVED", + "INTERNAL_ERROR": "INTERNAL_ERROR", + "PENDING": "PENDING", + "PENDING_REVALIDATION": "PENDING_REVALIDATION", + "REFRESHING_VALIDATION_TOKEN": "REFRESHING_VALIDATION_TOKEN", + "REJECTED": "REJECTED", + "SUBMITTING": "SUBMITTING", + "TIMED_OUT": "TIMED_OUT", + "UNKNOWN": "UNKNOWN", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "EdgeNode": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.EdgeNodeProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "EdgeNodeProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_address_groups": { + "type": "list[_models.IpAddressGroup]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "ip_address_groups": "list" + } + }, + "EnabledState": { + "type": "Enum", + "methods": {}, + "properties": { + "DISABLED": "DISABLED", + "ENABLED": "ENABLED", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "Endpoint": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "tags": { + "type": "Optional[dict[str, str]]", + "default": null, + "param_type": "keyword_only" + }, + "properties": { + "type": "Optional[_models.EndpointProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "tags": { + "type": "Optional[dict[str, str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "tags": "Optional", + "location": null, + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "EndpointProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "origins": { + "type": "list[_models.DeepCreatedOrigin]", + "default": null, + "param_type": "keyword_only" + }, + "origin_path": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "content_types_to_compress": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "origin_host_header": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "is_compression_enabled": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "is_http_allowed": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "is_https_allowed": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "query_string_caching_behavior": { + "type": "Optional[Union[str, _models.QueryStringCachingBehavior]]", + "default": null, + "param_type": "keyword_only" + }, + "optimization_type": { + "type": "Optional[Union[str, _models.OptimizationType]]", + "default": null, + "param_type": "keyword_only" + }, + "probe_path": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "geo_filters": { + "type": "Optional[list[_models.GeoFilter]]", + "default": null, + "param_type": "keyword_only" + }, + "default_origin_group": { + "type": "Optional[_models.ResourceReference]", + "default": null, + "param_type": "keyword_only" + }, + "url_signing_keys": { + "type": "Optional[list[_models.UrlSigningKey]]", + "default": null, + "param_type": "keyword_only" + }, + "delivery_policy": { + "type": "Optional[_models.EndpointPropertiesUpdateParametersDeliveryPolicy]", + "default": null, + "param_type": "keyword_only" + }, + "web_application_firewall_policy_link": { + "type": "Optional[_models.EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink]", + "default": null, + "param_type": "keyword_only" + }, + "origin_groups": { + "type": "Optional[list[_models.DeepCreatedOriginGroup]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_path": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "content_types_to_compress": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "origin_host_header": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "is_compression_enabled": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "is_http_allowed": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "is_https_allowed": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "query_string_caching_behavior": { + "type": "Optional[Union[str, _models.QueryStringCachingBehavior]]", + "default": null, + "param_type": "keyword_only" + }, + "optimization_type": { + "type": "Optional[Union[str, _models.OptimizationType]]", + "default": null, + "param_type": "keyword_only" + }, + "probe_path": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "geo_filters": { + "type": "Optional[list[_models.GeoFilter]]", + "default": null, + "param_type": "keyword_only" + }, + "default_origin_group": { + "type": "Optional[_models.ResourceReference]", + "default": null, + "param_type": "keyword_only" + }, + "url_signing_keys": { + "type": "Optional[list[_models.UrlSigningKey]]", + "default": null, + "param_type": "keyword_only" + }, + "delivery_policy": { + "type": "Optional[_models.EndpointPropertiesUpdateParametersDeliveryPolicy]", + "default": null, + "param_type": "keyword_only" + }, + "web_application_firewall_policy_link": { + "type": "Optional[_models.EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "host_name": "Optional", + "origins": "list", + "origin_groups": "Optional", + "custom_domains": "Optional", + "resource_state": "Optional", + "provisioning_state": "Optional", + "origin_path": "Optional", + "content_types_to_compress": "Optional", + "origin_host_header": "Optional", + "is_compression_enabled": "Optional", + "is_http_allowed": "Optional", + "is_https_allowed": "Optional", + "query_string_caching_behavior": "Optional", + "optimization_type": "Optional", + "probe_path": "Optional", + "geo_filters": "Optional", + "default_origin_group": "Optional", + "url_signing_keys": "Optional", + "delivery_policy": "Optional", + "web_application_firewall_policy_link": "Optional" + } + }, + "EndpointPropertiesUpdateParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_path": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "content_types_to_compress": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "origin_host_header": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "is_compression_enabled": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "is_http_allowed": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "is_https_allowed": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "query_string_caching_behavior": { + "type": "Optional[Union[str, _models.QueryStringCachingBehavior]]", + "default": null, + "param_type": "keyword_only" + }, + "optimization_type": { + "type": "Optional[Union[str, _models.OptimizationType]]", + "default": null, + "param_type": "keyword_only" + }, + "probe_path": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "geo_filters": { + "type": "Optional[list[_models.GeoFilter]]", + "default": null, + "param_type": "keyword_only" + }, + "default_origin_group": { + "type": "Optional[_models.ResourceReference]", + "default": null, + "param_type": "keyword_only" + }, + "url_signing_keys": { + "type": "Optional[list[_models.UrlSigningKey]]", + "default": null, + "param_type": "keyword_only" + }, + "delivery_policy": { + "type": "Optional[_models.EndpointPropertiesUpdateParametersDeliveryPolicy]", + "default": null, + "param_type": "keyword_only" + }, + "web_application_firewall_policy_link": { + "type": "Optional[_models.EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "origin_path": "Optional", + "content_types_to_compress": "Optional", + "origin_host_header": "Optional", + "is_compression_enabled": "Optional", + "is_http_allowed": "Optional", + "is_https_allowed": "Optional", + "query_string_caching_behavior": "Optional", + "optimization_type": "Optional", + "probe_path": "Optional", + "geo_filters": "Optional", + "default_origin_group": "Optional", + "url_signing_keys": "Optional", + "delivery_policy": "Optional", + "web_application_firewall_policy_link": "Optional" + } + }, + "EndpointPropertiesUpdateParametersDeliveryPolicy": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "rules": { + "type": "list[_models.DeliveryRule]", + "default": null, + "param_type": "keyword_only" + }, + "description": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "description": "Optional", + "rules": "list" + } + }, + "EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "id": "Optional" + } + }, + "EndpointProvisioningState": { + "type": "Enum", + "methods": {}, + "properties": { + "CREATING": "CREATING", + "DELETING": "DELETING", + "FAILED": "FAILED", + "SUCCEEDED": "SUCCEEDED", + "UPDATING": "UPDATING", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "EndpointResourceState": { + "type": "Enum", + "methods": {}, + "properties": { + "CREATING": "CREATING", + "DELETING": "DELETING", + "RUNNING": "RUNNING", + "STARTING": "STARTING", + "STOPPED": "STOPPED", + "STOPPING": "STOPPING", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "EndpointUpdateParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "tags": { + "type": "Optional[dict[str, str]]", + "default": null, + "param_type": "keyword_only" + }, + "properties": { + "type": "Optional[_models.EndpointPropertiesUpdateParameters]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "tags": "Optional", + "properties": "Optional" + } + }, + "ErrorAdditionalInfo": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "type": "Optional", + "info": "Optional" + } + }, + "ErrorDetail": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "code": "Optional", + "message": "Optional", + "target": "Optional", + "details": "Optional", + "additional_info": "Optional" + } + }, + "ErrorResponse": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "error": { + "type": "Optional[_models.ErrorDetail]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "error": "Optional" + } + }, + "ForwardingProtocol": { + "type": "Enum", + "methods": {}, + "properties": { + "HTTPS_ONLY": "HTTPS_ONLY", + "HTTP_ONLY": "HTTP_ONLY", + "MATCH_REQUEST": "MATCH_REQUEST", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "GeoFilter": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "relative_path": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "action": { + "type": "Union[str, _models.GeoFilterActions]", + "default": null, + "param_type": "keyword_only" + }, + "country_codes": { + "type": "list[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "relative_path": null, + "action": "Union", + "country_codes": "list" + } + }, + "GeoFilterActions": { + "type": "Enum", + "methods": {}, + "properties": { + "ALLOW": "ALLOW", + "BLOCK": "BLOCK", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "HeaderAction": { + "type": "Enum", + "methods": {}, + "properties": { + "APPEND": "APPEND", + "DELETE": "DELETE", + "OVERWRITE": "OVERWRITE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "HeaderActionParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "header_action": { + "type": "Union[str, _models.HeaderAction]", + "default": null, + "param_type": "keyword_only" + }, + "header_name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "value": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "type_name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "header_action": "Union", + "header_name": null, + "value": "Optional", + "type_name": null + } + }, + "HealthProbeParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "probe_path": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "probe_request_type": { + "type": "Optional[Union[str, _models.HealthProbeRequestType]]", + "default": null, + "param_type": "keyword_only" + }, + "probe_protocol": { + "type": "Optional[Union[str, _models.ProbeProtocol]]", + "default": null, + "param_type": "keyword_only" + }, + "probe_interval_in_seconds": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "probe_path": "Optional", + "probe_request_type": "Optional", + "probe_protocol": "Optional", + "probe_interval_in_seconds": "Optional" + } + }, + "HealthProbeRequestType": { + "type": "Enum", + "methods": {}, + "properties": { + "GET": "GET", + "HEAD": "HEAD", + "NOT_SET": "NOT_SET", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "HostNameMatchConditionParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "operator": { + "type": "Union[str, _models.HostNameOperator]", + "default": null, + "param_type": "keyword_only" + }, + "negate_condition": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "match_values": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "transforms": { + "type": "Optional[list[Union[str, _models.Transform]]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "type_name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "operator": "Union", + "negate_condition": "Optional", + "match_values": "Optional", + "transforms": "Optional", + "type_name": null + } + }, + "HostNameOperator": { + "type": "Enum", + "methods": {}, + "properties": { + "ANY": "ANY", + "BEGINS_WITH": "BEGINS_WITH", + "CONTAINS": "CONTAINS", + "ENDS_WITH": "ENDS_WITH", + "EQUAL": "EQUAL", + "GREATER_THAN": "GREATER_THAN", + "GREATER_THAN_OR_EQUAL": "GREATER_THAN_OR_EQUAL", + "LESS_THAN": "LESS_THAN", + "LESS_THAN_OR_EQUAL": "LESS_THAN_OR_EQUAL", + "REG_EX": "REG_EX", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "HttpErrorRangeParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "begin": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "end": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "begin": "Optional", + "end": "Optional" + } + }, + "HttpVersionMatchConditionParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "operator": { + "type": "Union[str, _models.HttpVersionOperator]", + "default": null, + "param_type": "keyword_only" + }, + "negate_condition": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "match_values": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "transforms": { + "type": "Optional[list[Union[str, _models.Transform]]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "type_name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "operator": "Union", + "negate_condition": "Optional", + "match_values": "Optional", + "transforms": "Optional", + "type_name": null + } + }, + "HttpVersionOperator": { + "type": "Enum", + "methods": {}, + "properties": { + "EQUAL": "EQUAL", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "HttpsRedirect": { + "type": "Enum", + "methods": {}, + "properties": { + "DISABLED": "DISABLED", + "ENABLED": "ENABLED", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "IpAddressGroup": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "delivery_region": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "ipv4_addresses": { + "type": "Optional[list[_models.CidrIpAddress]]", + "default": null, + "param_type": "keyword_only" + }, + "ipv6_addresses": { + "type": "Optional[list[_models.CidrIpAddress]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "delivery_region": "Optional", + "ipv4_addresses": "Optional", + "ipv6_addresses": "Optional" + } + }, + "IsDeviceMatchConditionParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "operator": { + "type": "Union[str, _models.IsDeviceOperator]", + "default": null, + "param_type": "keyword_only" + }, + "negate_condition": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "match_values": { + "type": "Optional[list[Union[str, _models.IsDeviceMatchValue]]]", + "default": null, + "param_type": "keyword_only" + }, + "transforms": { + "type": "Optional[list[Union[str, _models.Transform]]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "type_name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "operator": "Union", + "negate_condition": "Optional", + "match_values": "Optional", + "transforms": "Optional", + "type_name": null + } + }, + "IsDeviceMatchValue": { + "type": "Enum", + "methods": {}, + "properties": { + "DESKTOP": "DESKTOP", + "MOBILE": "MOBILE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "IsDeviceOperator": { + "type": "Enum", + "methods": {}, + "properties": { + "EQUAL": "EQUAL", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "KeyVaultCertificateSourceParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "subscription_id": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "vault_name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "secret_name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "update_rule": { + "type": "Union[str, _models.UpdateRule]", + "default": null, + "param_type": "keyword_only" + }, + "delete_rule": { + "type": "Union[str, _models.DeleteRule]", + "default": null, + "param_type": "keyword_only" + }, + "secret_version": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "type_name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "subscription_id": null, + "resource_group_name": null, + "vault_name": null, + "secret_name": null, + "secret_version": "Optional", + "update_rule": "Union", + "delete_rule": "Union", + "type_name": null + } + }, + "KeyVaultSigningKeyParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "type_name": { + "type": "Union[str, _models.KeyVaultSigningKeyParametersType]", + "default": null, + "param_type": "keyword_only" + }, + "subscription_id": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "vault_name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "secret_name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "secret_version": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "type_name": "Union", + "subscription_id": null, + "resource_group_name": null, + "vault_name": null, + "secret_name": null, + "secret_version": null + } + }, + "KeyVaultSigningKeyParametersType": { + "type": "Enum", + "methods": {}, + "properties": { + "KEY_VAULT_SIGNING_KEY_PARAMETERS": "KEY_VAULT_SIGNING_KEY_PARAMETERS", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "LinkToDefaultDomain": { + "type": "Enum", + "methods": {}, + "properties": { + "DISABLED": "DISABLED", + "ENABLED": "ENABLED", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "LoadBalancingSettingsParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "sample_size": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "successful_samples_required": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "additional_latency_in_milliseconds": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "sample_size": "Optional", + "successful_samples_required": "Optional", + "additional_latency_in_milliseconds": "Optional" + } + }, + "LoadParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "content_paths": { + "type": "list[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "content_paths": "list" + } + }, + "LogMetric": { + "type": "Enum", + "methods": {}, + "properties": { + "CLIENT_REQUEST_BANDWIDTH": "CLIENT_REQUEST_BANDWIDTH", + "CLIENT_REQUEST_COUNT": "CLIENT_REQUEST_COUNT", + "CLIENT_REQUEST_TRAFFIC": "CLIENT_REQUEST_TRAFFIC", + "ORIGIN_REQUEST_BANDWIDTH": "ORIGIN_REQUEST_BANDWIDTH", + "ORIGIN_REQUEST_TRAFFIC": "ORIGIN_REQUEST_TRAFFIC", + "TOTAL_LATENCY": "TOTAL_LATENCY", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "LogMetricsGranularity": { + "type": "Enum", + "methods": {}, + "properties": { + "P1_D": "P1_D", + "PT1_H": "PT1_H", + "PT5_M": "PT5_M", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "LogMetricsGroupBy": { + "type": "Enum", + "methods": {}, + "properties": { + "CACHE_STATUS": "CACHE_STATUS", + "COUNTRY_OR_REGION": "COUNTRY_OR_REGION", + "CUSTOM_DOMAIN": "CUSTOM_DOMAIN", + "HTTP_STATUS_CODE": "HTTP_STATUS_CODE", + "PROTOCOL": "PROTOCOL", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "LogRanking": { + "type": "Enum", + "methods": {}, + "properties": { + "BROWSER": "BROWSER", + "COUNTRY_OR_REGION": "COUNTRY_OR_REGION", + "REFERRER": "REFERRER", + "URL": "URL", + "USER_AGENT": "USER_AGENT", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "LogRankingMetric": { + "type": "Enum", + "methods": {}, + "properties": { + "CLIENT_REQUEST_COUNT": "CLIENT_REQUEST_COUNT", + "CLIENT_REQUEST_TRAFFIC": "CLIENT_REQUEST_TRAFFIC", + "ERROR_COUNT": "ERROR_COUNT", + "HIT_COUNT": "HIT_COUNT", + "MISS_COUNT": "MISS_COUNT", + "USER_ERROR_COUNT": "USER_ERROR_COUNT", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "LogSpecification": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "display_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "blob_duration": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "log_filter_pattern": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "name": "Optional", + "display_name": "Optional", + "blob_duration": "Optional", + "log_filter_pattern": "Optional" + } + }, + "ManagedCertificateParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "type": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "subject": "Optional", + "expiration_date": "Optional", + "type": null + } + }, + "ManagedRuleDefinition": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "rule_id": "Optional", + "description": "Optional" + } + }, + "ManagedRuleEnabledState": { + "type": "Enum", + "methods": {}, + "properties": { + "DISABLED": "DISABLED", + "ENABLED": "ENABLED", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ManagedRuleGroupDefinition": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "rule_group_name": "Optional", + "description": "Optional", + "rules": "Optional" + } + }, + "ManagedRuleGroupOverride": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_group_name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "rules": { + "type": "Optional[list[_models.ManagedRuleOverride]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "rule_group_name": null, + "rules": "Optional" + } + }, + "ManagedRuleOverride": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_id": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "enabled_state": { + "type": "Optional[Union[str, _models.ManagedRuleEnabledState]]", + "default": null, + "param_type": "keyword_only" + }, + "action": { + "type": "Optional[Union[str, _models.ActionType]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "rule_id": null, + "enabled_state": "Optional", + "action": "Optional" + } + }, + "ManagedRuleSet": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_set_type": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "rule_set_version": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "anomaly_score": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "rule_group_overrides": { + "type": "Optional[list[_models.ManagedRuleGroupOverride]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "rule_set_type": null, + "rule_set_version": null, + "anomaly_score": "Optional", + "rule_group_overrides": "Optional" + } + }, + "ManagedRuleSetDefinition": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.ManagedRuleSetDefinitionProperties]", + "default": null, + "param_type": "keyword_only" + }, + "sku": { + "type": "Optional[_models.Sku]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "sku": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "ManagedRuleSetDefinitionProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "provisioning_state": "Optional", + "rule_set_type": "Optional", + "rule_set_version": "Optional", + "rule_groups": "Optional" + } + }, + "ManagedRuleSetList": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "managed_rule_sets": { + "type": "Optional[list[_models.ManagedRuleSet]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "managed_rule_sets": "Optional" + } + }, + "ManagedServiceIdentity": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "type": { + "type": "Union[str, _models.ManagedServiceIdentityType]", + "default": null, + "param_type": "keyword_only" + }, + "user_assigned_identities": { + "type": "Optional[dict[str, _models.UserAssignedIdentity]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "principal_id": "Optional", + "tenant_id": "Optional", + "type": "Union", + "user_assigned_identities": "Optional" + } + }, + "ManagedServiceIdentityType": { + "type": "Enum", + "methods": {}, + "properties": { + "NONE": "NONE", + "SYSTEM_ASSIGNED": "SYSTEM_ASSIGNED", + "SYSTEM_ASSIGNED_USER_ASSIGNED": "SYSTEM_ASSIGNED_USER_ASSIGNED", + "USER_ASSIGNED": "USER_ASSIGNED", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "MatchCondition": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "match_variable": { + "type": "Union[str, _models.WafMatchVariable]", + "default": null, + "param_type": "keyword_only" + }, + "operator": { + "type": "Union[str, _models.Operator]", + "default": null, + "param_type": "keyword_only" + }, + "match_value": { + "type": "list[str]", + "default": null, + "param_type": "keyword_only" + }, + "selector": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "negate_condition": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "transforms": { + "type": "Optional[list[Union[str, _models.TransformType]]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "match_variable": "Union", + "selector": "Optional", + "operator": "Union", + "negate_condition": "Optional", + "match_value": "list", + "transforms": "Optional" + } + }, + "MatchProcessingBehavior": { + "type": "Enum", + "methods": {}, + "properties": { + "CONTINUE": "CONTINUE", + "STOP": "STOP", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "MatchVariable": { + "type": "Enum", + "methods": {}, + "properties": { + "CLIENT_PORT": "CLIENT_PORT", + "COOKIES": "COOKIES", + "HOST_NAME": "HOST_NAME", + "HTTP_VERSION": "HTTP_VERSION", + "IS_DEVICE": "IS_DEVICE", + "POST_ARGS": "POST_ARGS", + "QUERY_STRING": "QUERY_STRING", + "REMOTE_ADDRESS": "REMOTE_ADDRESS", + "REQUEST_BODY": "REQUEST_BODY", + "REQUEST_HEADER": "REQUEST_HEADER", + "REQUEST_METHOD": "REQUEST_METHOD", + "REQUEST_SCHEME": "REQUEST_SCHEME", + "REQUEST_URI": "REQUEST_URI", + "SERVER_PORT": "SERVER_PORT", + "SOCKET_ADDR": "SOCKET_ADDR", + "SSL_PROTOCOL": "SSL_PROTOCOL", + "URL_FILE_EXTENSION": "URL_FILE_EXTENSION", + "URL_FILE_NAME": "URL_FILE_NAME", + "URL_PATH": "URL_PATH", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "MetricAvailability": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "time_grain": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "blob_duration": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "time_grain": "Optional", + "blob_duration": "Optional" + } + }, + "MetricSpecification": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "display_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "display_description": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "unit": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "aggregation_type": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "availabilities": { + "type": "Optional[list[_models.MetricAvailability]]", + "default": null, + "param_type": "keyword_only" + }, + "supported_time_grain_types": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "dimensions": { + "type": "Optional[list[_models.DimensionProperties]]", + "default": null, + "param_type": "keyword_only" + }, + "fill_gap_with_zero": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "metric_filter_pattern": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "is_internal": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "name": "Optional", + "display_name": "Optional", + "display_description": "Optional", + "unit": "Optional", + "aggregation_type": "Optional", + "availabilities": "Optional", + "supported_time_grain_types": "Optional", + "dimensions": "Optional", + "fill_gap_with_zero": "Optional", + "metric_filter_pattern": "Optional", + "is_internal": "Optional" + } + }, + "MetricsGranularity": { + "type": "Enum", + "methods": {}, + "properties": { + "P1_D": "P1_D", + "PT1_H": "PT1_H", + "PT5_M": "PT5_M", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "MetricsResponse": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "date_time_begin": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + }, + "date_time_end": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + }, + "granularity": { + "type": "Optional[Union[str, _models.MetricsGranularity]]", + "default": null, + "param_type": "keyword_only" + }, + "series": { + "type": "Optional[list[_models.MetricsResponseSeriesItem]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "date_time_begin": "Optional", + "date_time_end": "Optional", + "granularity": "Optional", + "series": "Optional" + } + }, + "MetricsResponseSeriesItem": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "metric": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "unit": { + "type": "Optional[Union[str, _models.MetricsSeriesUnit]]", + "default": null, + "param_type": "keyword_only" + }, + "groups": { + "type": "Optional[list[_models.MetricsResponseSeriesPropertiesItemsItem]]", + "default": null, + "param_type": "keyword_only" + }, + "data": { + "type": "Optional[list[_models.Components1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsPropertiesDataItems]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "metric": "Optional", + "unit": "Optional", + "groups": "Optional", + "data": "Optional" + } + }, + "MetricsResponseSeriesPropertiesItemsItem": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "value": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "name": "Optional", + "value": "Optional" + } + }, + "MetricsSeriesUnit": { + "type": "Enum", + "methods": {}, + "properties": { + "BITS_PER_SECOND": "BITS_PER_SECOND", + "BYTES": "BYTES", + "COUNT": "COUNT", + "MILLI_SECONDS": "MILLI_SECONDS", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "MigrateResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.MigrateResultProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "id": "Optional", + "type": "Optional", + "properties": "Optional" + } + }, + "MigrateResultProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "migrated_profile_resource_id": "Optional" + } + }, + "MigrationEndpointMapping": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "migrated_from": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "migrated_to": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "migrated_from": "Optional", + "migrated_to": "Optional" + } + }, + "MigrationErrorType": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "code": "Optional", + "resource_name": "Optional", + "error_message": "Optional", + "next_steps": "Optional" + } + }, + "MigrationParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "sku": { + "type": "_models.Sku", + "default": null, + "param_type": "keyword_only" + }, + "classic_resource_reference": { + "type": "_models.ResourceReference", + "default": null, + "param_type": "keyword_only" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "migration_web_application_firewall_mappings": { + "type": "Optional[list[_models.MigrationWebApplicationFirewallMapping]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "sku": null, + "classic_resource_reference": null, + "profile_name": null, + "migration_web_application_firewall_mappings": "Optional" + } + }, + "MigrationWebApplicationFirewallMapping": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "migrated_from": { + "type": "Optional[_models.ResourceReference]", + "default": null, + "param_type": "keyword_only" + }, + "migrated_to": { + "type": "Optional[_models.ResourceReference]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "migrated_from": "Optional", + "migrated_to": "Optional" + } + }, + "MinimumTlsVersion": { + "type": "Enum", + "methods": {}, + "properties": { + "NONE": "NONE", + "TLS10": "TLS10", + "TLS12": "TLS12", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "Operation": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "is_data_action": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "display": { + "type": "Optional[_models.OperationDisplay]", + "default": null, + "param_type": "keyword_only" + }, + "operation_properties": { + "type": "Optional[_models.OperationProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "name": "Optional", + "is_data_action": "Optional", + "display": "Optional", + "origin": "Optional", + "operation_properties": "Optional" + } + }, + "OperationDisplay": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "provider": "Optional", + "resource": "Optional", + "operation": "Optional", + "description": "Optional" + } + }, + "OperationProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "service_specification": { + "type": "Optional[_models.ServiceSpecification]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "service_specification": "Optional" + } + }, + "Operator": { + "type": "Enum", + "methods": {}, + "properties": { + "ANY": "ANY", + "BEGINS_WITH": "BEGINS_WITH", + "CONTAINS": "CONTAINS", + "ENDS_WITH": "ENDS_WITH", + "EQUAL": "EQUAL", + "GEO_MATCH": "GEO_MATCH", + "GREATER_THAN": "GREATER_THAN", + "GREATER_THAN_OR_EQUAL": "GREATER_THAN_OR_EQUAL", + "IP_MATCH": "IP_MATCH", + "LESS_THAN": "LESS_THAN", + "LESS_THAN_OR_EQUAL": "LESS_THAN_OR_EQUAL", + "REG_EX": "REG_EX", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "OptimizationType": { + "type": "Enum", + "methods": {}, + "properties": { + "DYNAMIC_SITE_ACCELERATION": "DYNAMIC_SITE_ACCELERATION", + "GENERAL_MEDIA_STREAMING": "GENERAL_MEDIA_STREAMING", + "GENERAL_WEB_DELIVERY": "GENERAL_WEB_DELIVERY", + "LARGE_FILE_DOWNLOAD": "LARGE_FILE_DOWNLOAD", + "VIDEO_ON_DEMAND_MEDIA_STREAMING": "VIDEO_ON_DEMAND_MEDIA_STREAMING", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "Origin": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.OriginProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "OriginAuthenticationProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "type": { + "type": "Optional[Union[str, _models.OriginAuthenticationType]]", + "default": null, + "param_type": "keyword_only" + }, + "user_assigned_identity": { + "type": "Optional[_models.ResourceReference]", + "default": null, + "param_type": "keyword_only" + }, + "scope": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "type": "Optional", + "user_assigned_identity": "Optional", + "scope": "Optional" + } + }, + "OriginAuthenticationType": { + "type": "Enum", + "methods": {}, + "properties": { + "SYSTEM_ASSIGNED_IDENTITY": "SYSTEM_ASSIGNED_IDENTITY", + "USER_ASSIGNED_IDENTITY": "USER_ASSIGNED_IDENTITY", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "OriginGroup": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.OriginGroupProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "OriginGroupOverride": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group": { + "type": "Optional[_models.ResourceReference]", + "default": null, + "param_type": "keyword_only" + }, + "forwarding_protocol": { + "type": "Optional[Union[str, _models.ForwardingProtocol]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "origin_group": "Optional", + "forwarding_protocol": "Optional" + } + }, + "OriginGroupOverrideAction": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "_models.OriginGroupOverrideActionParameters", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "parameters": null, + "name": null + } + }, + "OriginGroupOverrideActionParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group": { + "type": "_models.ResourceReference", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "type_name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "origin_group": null, + "type_name": null + } + }, + "OriginGroupProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "health_probe_settings": { + "type": "Optional[_models.HealthProbeParameters]", + "default": null, + "param_type": "keyword_only" + }, + "origins": { + "type": "Optional[list[_models.ResourceReference]]", + "default": null, + "param_type": "keyword_only" + }, + "traffic_restoration_time_to_healed_or_new_endpoints_in_minutes": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "response_based_origin_error_detection_settings": { + "type": "Optional[_models.ResponseBasedOriginErrorDetectionParameters]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "health_probe_settings": { + "type": "Optional[_models.HealthProbeParameters]", + "default": null, + "param_type": "keyword_only" + }, + "origins": { + "type": "Optional[list[_models.ResourceReference]]", + "default": null, + "param_type": "keyword_only" + }, + "traffic_restoration_time_to_healed_or_new_endpoints_in_minutes": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "response_based_origin_error_detection_settings": { + "type": "Optional[_models.ResponseBasedOriginErrorDetectionParameters]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "resource_state": "Optional", + "provisioning_state": "Optional", + "health_probe_settings": "Optional", + "origins": "Optional", + "traffic_restoration_time_to_healed_or_new_endpoints_in_minutes": "Optional", + "response_based_origin_error_detection_settings": "Optional" + } + }, + "OriginGroupProvisioningState": { + "type": "Enum", + "methods": {}, + "properties": { + "CREATING": "CREATING", + "DELETING": "DELETING", + "FAILED": "FAILED", + "SUCCEEDED": "SUCCEEDED", + "UPDATING": "UPDATING", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "OriginGroupResourceState": { + "type": "Enum", + "methods": {}, + "properties": { + "ACTIVE": "ACTIVE", + "CREATING": "CREATING", + "DELETING": "DELETING", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "OriginGroupUpdateParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.OriginGroupUpdatePropertiesParameters]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "properties": "Optional" + } + }, + "OriginGroupUpdatePropertiesParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "health_probe_settings": { + "type": "Optional[_models.HealthProbeParameters]", + "default": null, + "param_type": "keyword_only" + }, + "origins": { + "type": "Optional[list[_models.ResourceReference]]", + "default": null, + "param_type": "keyword_only" + }, + "traffic_restoration_time_to_healed_or_new_endpoints_in_minutes": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "response_based_origin_error_detection_settings": { + "type": "Optional[_models.ResponseBasedOriginErrorDetectionParameters]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "health_probe_settings": "Optional", + "origins": "Optional", + "traffic_restoration_time_to_healed_or_new_endpoints_in_minutes": "Optional", + "response_based_origin_error_detection_settings": "Optional" + } + }, + "OriginProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "host_name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "http_port": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "https_port": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "origin_host_header": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "priority": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "weight": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "enabled": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "private_link_alias": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "private_link_resource_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "private_link_location": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "private_link_approval_message": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "host_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "http_port": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "https_port": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "origin_host_header": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "priority": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "weight": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "enabled": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "private_link_alias": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "private_link_resource_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "private_link_location": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "private_link_approval_message": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "resource_state": "Optional", + "provisioning_state": "Optional", + "private_endpoint_status": "Optional", + "host_name": "Optional", + "http_port": "Optional", + "https_port": "Optional", + "origin_host_header": "Optional", + "priority": "Optional", + "weight": "Optional", + "enabled": "Optional", + "private_link_alias": "Optional", + "private_link_resource_id": "Optional", + "private_link_location": "Optional", + "private_link_approval_message": "Optional" + } + }, + "OriginProvisioningState": { + "type": "Enum", + "methods": {}, + "properties": { + "CREATING": "CREATING", + "DELETING": "DELETING", + "FAILED": "FAILED", + "SUCCEEDED": "SUCCEEDED", + "UPDATING": "UPDATING", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "OriginResourceState": { + "type": "Enum", + "methods": {}, + "properties": { + "ACTIVE": "ACTIVE", + "CREATING": "CREATING", + "DELETING": "DELETING", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "OriginUpdateParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.OriginUpdatePropertiesParameters]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "properties": "Optional" + } + }, + "OriginUpdatePropertiesParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "host_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "http_port": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "https_port": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "origin_host_header": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "priority": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "weight": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "enabled": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "private_link_alias": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "private_link_resource_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "private_link_location": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "private_link_approval_message": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "host_name": "Optional", + "http_port": "Optional", + "https_port": "Optional", + "origin_host_header": "Optional", + "priority": "Optional", + "weight": "Optional", + "enabled": "Optional", + "private_link_alias": "Optional", + "private_link_resource_id": "Optional", + "private_link_location": "Optional", + "private_link_approval_message": "Optional" + } + }, + "ParamIndicator": { + "type": "Enum", + "methods": {}, + "properties": { + "EXPIRES": "EXPIRES", + "KEY_ID": "KEY_ID", + "SIGNATURE": "SIGNATURE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "PolicyEnabledState": { + "type": "Enum", + "methods": {}, + "properties": { + "DISABLED": "DISABLED", + "ENABLED": "ENABLED", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "PolicyMode": { + "type": "Enum", + "methods": {}, + "properties": { + "DETECTION": "DETECTION", + "PREVENTION": "PREVENTION", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "PolicyResourceState": { + "type": "Enum", + "methods": {}, + "properties": { + "CREATING": "CREATING", + "DELETING": "DELETING", + "DISABLED": "DISABLED", + "DISABLING": "DISABLING", + "ENABLED": "ENABLED", + "ENABLING": "ENABLING", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "PolicySettings": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "enabled_state": { + "type": "Optional[Union[str, _models.PolicyEnabledState]]", + "default": null, + "param_type": "keyword_only" + }, + "mode": { + "type": "Optional[Union[str, _models.PolicyMode]]", + "default": null, + "param_type": "keyword_only" + }, + "default_redirect_url": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "default_custom_block_response_status_code": { + "type": "Optional[Union[int, _models.PolicySettingsDefaultCustomBlockResponseStatusCode]]", + "default": null, + "param_type": "keyword_only" + }, + "default_custom_block_response_body": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "enabled_state": "Optional", + "mode": "Optional", + "default_redirect_url": "Optional", + "default_custom_block_response_status_code": "Optional", + "default_custom_block_response_body": "Optional" + } + }, + "PolicySettingsDefaultCustomBlockResponseStatusCode": { + "type": "Enum", + "methods": {}, + "properties": { + "ENUM_200": "ENUM_200", + "ENUM_403": "ENUM_403", + "ENUM_405": "ENUM_405", + "ENUM_406": "ENUM_406", + "ENUM_429": "ENUM_429", + "as_integer_ratio": "as_integer_ratio", + "bit_count": "bit_count", + "bit_length": "bit_length", + "conjugate": "conjugate", + "denominator": "denominator", + "from_bytes": "from_bytes", + "imag": "imag", + "is_integer": "is_integer", + "numerator": "numerator", + "real": "real", + "to_bytes": "to_bytes" + } + }, + "PostArgsMatchConditionParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "operator": { + "type": "Union[str, _models.PostArgsOperator]", + "default": null, + "param_type": "keyword_only" + }, + "selector": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "negate_condition": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "match_values": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "transforms": { + "type": "Optional[list[Union[str, _models.Transform]]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "type_name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "selector": "Optional", + "operator": "Union", + "negate_condition": "Optional", + "match_values": "Optional", + "transforms": "Optional", + "type_name": null + } + }, + "PostArgsOperator": { + "type": "Enum", + "methods": {}, + "properties": { + "ANY": "ANY", + "BEGINS_WITH": "BEGINS_WITH", + "CONTAINS": "CONTAINS", + "ENDS_WITH": "ENDS_WITH", + "EQUAL": "EQUAL", + "GREATER_THAN": "GREATER_THAN", + "GREATER_THAN_OR_EQUAL": "GREATER_THAN_OR_EQUAL", + "LESS_THAN": "LESS_THAN", + "LESS_THAN_OR_EQUAL": "LESS_THAN_OR_EQUAL", + "REG_EX": "REG_EX", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "PrivateEndpointStatus": { + "type": "Enum", + "methods": {}, + "properties": { + "APPROVED": "APPROVED", + "DISCONNECTED": "DISCONNECTED", + "PENDING": "PENDING", + "REJECTED": "REJECTED", + "TIMEOUT": "TIMEOUT", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ProbeProtocol": { + "type": "Enum", + "methods": {}, + "properties": { + "HTTP": "HTTP", + "HTTPS": "HTTPS", + "NOT_SET": "NOT_SET", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "Profile": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "sku": { + "type": "_models.Sku", + "default": null, + "param_type": "keyword_only" + }, + "tags": { + "type": "Optional[dict[str, str]]", + "default": null, + "param_type": "keyword_only" + }, + "properties": { + "type": "Optional[_models.ProfileProperties]", + "default": null, + "param_type": "keyword_only" + }, + "identity": { + "type": "Optional[_models.ManagedServiceIdentity]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "tags": { + "type": "Optional[dict[str, str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "sku": null, + "kind": "Optional", + "identity": "Optional", + "tags": "Optional", + "location": null, + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "ProfileChangeSkuWafMapping": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "security_policy_name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "change_to_waf_policy": { + "type": "_models.ResourceReference", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "security_policy_name": null, + "change_to_waf_policy": null + } + }, + "ProfileLogScrubbing": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "state": { + "type": "Optional[Union[str, _models.ProfileScrubbingState]]", + "default": null, + "param_type": "keyword_only" + }, + "scrubbing_rules": { + "type": "Optional[list[_models.ProfileScrubbingRules]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "state": "Optional", + "scrubbing_rules": "Optional" + } + }, + "ProfileProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_response_timeout_seconds": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "log_scrubbing": { + "type": "Optional[_models.ProfileLogScrubbing]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "resource_state": "Optional", + "provisioning_state": "Optional", + "extended_properties": "Optional", + "front_door_id": "Optional", + "origin_response_timeout_seconds": "Optional", + "log_scrubbing": "Optional" + } + }, + "ProfilePropertiesUpdateParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_response_timeout_seconds": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "log_scrubbing": { + "type": "Optional[_models.ProfileLogScrubbing]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "origin_response_timeout_seconds": "Optional", + "log_scrubbing": "Optional" + } + }, + "ProfileProvisioningState": { + "type": "Enum", + "methods": {}, + "properties": { + "CREATING": "CREATING", + "DELETING": "DELETING", + "FAILED": "FAILED", + "SUCCEEDED": "SUCCEEDED", + "UPDATING": "UPDATING", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ProfileResourceState": { + "type": "Enum", + "methods": {}, + "properties": { + "ABORTING_MIGRATION": "ABORTING_MIGRATION", + "ACTIVE": "ACTIVE", + "COMMITTING_MIGRATION": "COMMITTING_MIGRATION", + "CREATING": "CREATING", + "DELETING": "DELETING", + "DISABLED": "DISABLED", + "MIGRATED": "MIGRATED", + "MIGRATING": "MIGRATING", + "PENDING_MIGRATION_COMMIT": "PENDING_MIGRATION_COMMIT", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ProfileScrubbingRules": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "match_variable": { + "type": "Union[str, _models.ScrubbingRuleEntryMatchVariable]", + "default": null, + "param_type": "keyword_only" + }, + "selector_match_operator": { + "type": "Union[str, _models.ScrubbingRuleEntryMatchOperator]", + "default": null, + "param_type": "keyword_only" + }, + "selector": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "state": { + "type": "Optional[Union[str, _models.ScrubbingRuleEntryState]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "match_variable": "Union", + "selector_match_operator": "Union", + "selector": "Optional", + "state": "Optional" + } + }, + "ProfileScrubbingState": { + "type": "Enum", + "methods": {}, + "properties": { + "DISABLED": "DISABLED", + "ENABLED": "ENABLED", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ProfileUpdateParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "tags": { + "type": "Optional[dict[str, str]]", + "default": null, + "param_type": "keyword_only" + }, + "identity": { + "type": "Optional[_models.ManagedServiceIdentity]", + "default": null, + "param_type": "keyword_only" + }, + "properties": { + "type": "Optional[_models.ProfilePropertiesUpdateParameters]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "tags": "Optional", + "identity": "Optional", + "properties": "Optional" + } + }, + "ProfileUpgradeParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "waf_mapping_list": { + "type": "list[_models.ProfileChangeSkuWafMapping]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "waf_mapping_list": "list" + } + }, + "ProtocolType": { + "type": "Enum", + "methods": {}, + "properties": { + "IP_BASED": "IP_BASED", + "SERVER_NAME_INDICATION": "SERVER_NAME_INDICATION", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ProvisioningState": { + "type": "Enum", + "methods": {}, + "properties": { + "CREATING": "CREATING", + "FAILED": "FAILED", + "SUCCEEDED": "SUCCEEDED", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ProxyResource": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "PurgeParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "content_paths": { + "type": "list[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "content_paths": "list" + } + }, + "QueryStringBehavior": { + "type": "Enum", + "methods": {}, + "properties": { + "EXCLUDE": "EXCLUDE", + "EXCLUDE_ALL": "EXCLUDE_ALL", + "INCLUDE": "INCLUDE", + "INCLUDE_ALL": "INCLUDE_ALL", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "QueryStringCachingBehavior": { + "type": "Enum", + "methods": {}, + "properties": { + "BYPASS_CACHING": "BYPASS_CACHING", + "IGNORE_QUERY_STRING": "IGNORE_QUERY_STRING", + "NOT_SET": "NOT_SET", + "USE_QUERY_STRING": "USE_QUERY_STRING", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "QueryStringMatchConditionParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "operator": { + "type": "Union[str, _models.QueryStringOperator]", + "default": null, + "param_type": "keyword_only" + }, + "negate_condition": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "match_values": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "transforms": { + "type": "Optional[list[Union[str, _models.Transform]]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "type_name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "operator": "Union", + "negate_condition": "Optional", + "match_values": "Optional", + "transforms": "Optional", + "type_name": null + } + }, + "QueryStringOperator": { + "type": "Enum", + "methods": {}, + "properties": { + "ANY": "ANY", + "BEGINS_WITH": "BEGINS_WITH", + "CONTAINS": "CONTAINS", + "ENDS_WITH": "ENDS_WITH", + "EQUAL": "EQUAL", + "GREATER_THAN": "GREATER_THAN", + "GREATER_THAN_OR_EQUAL": "GREATER_THAN_OR_EQUAL", + "LESS_THAN": "LESS_THAN", + "LESS_THAN_OR_EQUAL": "LESS_THAN_OR_EQUAL", + "REG_EX": "REG_EX", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "RankingsResponse": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "date_time_begin": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + }, + "date_time_end": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + }, + "tables": { + "type": "Optional[list[_models.RankingsResponseTablesItem]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "date_time_begin": "Optional", + "date_time_end": "Optional", + "tables": "Optional" + } + }, + "RankingsResponseTablesItem": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "ranking": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "data": { + "type": "Optional[list[_models.RankingsResponseTablesPropertiesItemsItem]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "ranking": "Optional", + "data": "Optional" + } + }, + "RankingsResponseTablesPropertiesItemsItem": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "metrics": { + "type": "Optional[list[_models.RankingsResponseTablesPropertiesItemsMetricsItem]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "name": "Optional", + "metrics": "Optional" + } + }, + "RankingsResponseTablesPropertiesItemsMetricsItem": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "metric": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "value": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "percentage": { + "type": "Optional[float]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "metric": "Optional", + "value": "Optional", + "percentage": "Optional" + } + }, + "RateLimitRule": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "priority": { + "type": "int", + "default": null, + "param_type": "keyword_only" + }, + "match_conditions": { + "type": "list[_models.MatchCondition]", + "default": null, + "param_type": "keyword_only" + }, + "action": { + "type": "Union[str, _models.ActionType]", + "default": null, + "param_type": "keyword_only" + }, + "rate_limit_threshold": { + "type": "int", + "default": null, + "param_type": "keyword_only" + }, + "rate_limit_duration_in_minutes": { + "type": "int", + "default": null, + "param_type": "keyword_only" + }, + "enabled_state": { + "type": "Optional[Union[str, _models.CustomRuleEnabledState]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "priority": { + "type": "int", + "default": null, + "param_type": "keyword_only" + }, + "match_conditions": { + "type": "list[_models.MatchCondition]", + "default": null, + "param_type": "keyword_only" + }, + "action": { + "type": "Union[str, _models.ActionType]", + "default": null, + "param_type": "keyword_only" + }, + "enabled_state": { + "type": "Optional[Union[str, _models.CustomRuleEnabledState]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "rate_limit_threshold": null, + "rate_limit_duration_in_minutes": null, + "name": null, + "enabled_state": "Optional", + "priority": null, + "match_conditions": "list", + "action": "Union" + } + }, + "RateLimitRuleList": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "rules": { + "type": "Optional[list[_models.RateLimitRule]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "rules": "Optional" + } + }, + "RedirectType": { + "type": "Enum", + "methods": {}, + "properties": { + "FOUND": "FOUND", + "MOVED": "MOVED", + "PERMANENT_REDIRECT": "PERMANENT_REDIRECT", + "TEMPORARY_REDIRECT": "TEMPORARY_REDIRECT", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "RemoteAddressMatchConditionParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "operator": { + "type": "Union[str, _models.RemoteAddressOperator]", + "default": null, + "param_type": "keyword_only" + }, + "negate_condition": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "match_values": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "transforms": { + "type": "Optional[list[Union[str, _models.Transform]]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "type_name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "operator": "Union", + "negate_condition": "Optional", + "match_values": "Optional", + "transforms": "Optional", + "type_name": null + } + }, + "RemoteAddressOperator": { + "type": "Enum", + "methods": {}, + "properties": { + "ANY": "ANY", + "GEO_MATCH": "GEO_MATCH", + "IP_MATCH": "IP_MATCH", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "RequestBodyMatchConditionParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "operator": { + "type": "Union[str, _models.RequestBodyOperator]", + "default": null, + "param_type": "keyword_only" + }, + "negate_condition": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "match_values": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "transforms": { + "type": "Optional[list[Union[str, _models.Transform]]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "type_name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "operator": "Union", + "negate_condition": "Optional", + "match_values": "Optional", + "transforms": "Optional", + "type_name": null + } + }, + "RequestBodyOperator": { + "type": "Enum", + "methods": {}, + "properties": { + "ANY": "ANY", + "BEGINS_WITH": "BEGINS_WITH", + "CONTAINS": "CONTAINS", + "ENDS_WITH": "ENDS_WITH", + "EQUAL": "EQUAL", + "GREATER_THAN": "GREATER_THAN", + "GREATER_THAN_OR_EQUAL": "GREATER_THAN_OR_EQUAL", + "LESS_THAN": "LESS_THAN", + "LESS_THAN_OR_EQUAL": "LESS_THAN_OR_EQUAL", + "REG_EX": "REG_EX", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "RequestHeaderMatchConditionParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "operator": { + "type": "Union[str, _models.RequestHeaderOperator]", + "default": null, + "param_type": "keyword_only" + }, + "selector": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "negate_condition": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "match_values": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "transforms": { + "type": "Optional[list[Union[str, _models.Transform]]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "type_name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "selector": "Optional", + "operator": "Union", + "negate_condition": "Optional", + "match_values": "Optional", + "transforms": "Optional", + "type_name": null + } + }, + "RequestHeaderOperator": { + "type": "Enum", + "methods": {}, + "properties": { + "ANY": "ANY", + "BEGINS_WITH": "BEGINS_WITH", + "CONTAINS": "CONTAINS", + "ENDS_WITH": "ENDS_WITH", + "EQUAL": "EQUAL", + "GREATER_THAN": "GREATER_THAN", + "GREATER_THAN_OR_EQUAL": "GREATER_THAN_OR_EQUAL", + "LESS_THAN": "LESS_THAN", + "LESS_THAN_OR_EQUAL": "LESS_THAN_OR_EQUAL", + "REG_EX": "REG_EX", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "RequestMethodMatchConditionParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "operator": { + "type": "Union[str, _models.RequestMethodOperator]", + "default": null, + "param_type": "keyword_only" + }, + "negate_condition": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "transforms": { + "type": "Optional[list[Union[str, _models.Transform]]]", + "default": null, + "param_type": "keyword_only" + }, + "match_values": { + "type": "Optional[list[Union[str, _models.RequestMethodMatchValue]]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "type_name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "operator": "Union", + "negate_condition": "Optional", + "transforms": "Optional", + "match_values": "Optional", + "type_name": null + } + }, + "RequestMethodMatchValue": { + "type": "Enum", + "methods": {}, + "properties": { + "DELETE": "DELETE", + "GET": "GET", + "HEAD": "HEAD", + "OPTIONS": "OPTIONS", + "POST": "POST", + "PUT": "PUT", + "TRACE": "TRACE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "RequestMethodOperator": { + "type": "Enum", + "methods": {}, + "properties": { + "EQUAL": "EQUAL", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "RequestSchemeMatchConditionParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "operator": { + "type": "Union[str, _models.RequestSchemeMatchConditionParametersOperator]", + "default": null, + "param_type": "keyword_only" + }, + "negate_condition": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "transforms": { + "type": "Optional[list[Union[str, _models.Transform]]]", + "default": null, + "param_type": "keyword_only" + }, + "match_values": { + "type": "Optional[list[Union[str, _models.RequestSchemeMatchValue]]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "type_name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "operator": "Union", + "negate_condition": "Optional", + "transforms": "Optional", + "match_values": "Optional", + "type_name": null + } + }, + "RequestSchemeMatchConditionParametersOperator": { + "type": "Enum", + "methods": {}, + "properties": { + "EQUAL": "EQUAL", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "RequestSchemeMatchValue": { + "type": "Enum", + "methods": {}, + "properties": { + "HTTP": "HTTP", + "HTTPS": "HTTPS", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "RequestUriMatchConditionParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "operator": { + "type": "Union[str, _models.RequestUriOperator]", + "default": null, + "param_type": "keyword_only" + }, + "negate_condition": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "match_values": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "transforms": { + "type": "Optional[list[Union[str, _models.Transform]]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "type_name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "operator": "Union", + "negate_condition": "Optional", + "match_values": "Optional", + "transforms": "Optional", + "type_name": null + } + }, + "RequestUriOperator": { + "type": "Enum", + "methods": {}, + "properties": { + "ANY": "ANY", + "BEGINS_WITH": "BEGINS_WITH", + "CONTAINS": "CONTAINS", + "ENDS_WITH": "ENDS_WITH", + "EQUAL": "EQUAL", + "GREATER_THAN": "GREATER_THAN", + "GREATER_THAN_OR_EQUAL": "GREATER_THAN_OR_EQUAL", + "LESS_THAN": "LESS_THAN", + "LESS_THAN_OR_EQUAL": "LESS_THAN_OR_EQUAL", + "REG_EX": "REG_EX", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "Resource": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "ResourceReference": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "id": "Optional" + } + }, + "ResourceType": { + "type": "Enum", + "methods": {}, + "properties": { + "MICROSOFT_CDN_PROFILES_AFD_ENDPOINTS": "MICROSOFT_CDN_PROFILES_AFD_ENDPOINTS", + "MICROSOFT_CDN_PROFILES_ENDPOINTS": "MICROSOFT_CDN_PROFILES_ENDPOINTS", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ResourceUsage": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "resource_type": "Optional", + "unit": "Optional", + "current_value": "Optional", + "limit": "Optional" + } + }, + "ResourceUsageUnit": { + "type": "Enum", + "methods": {}, + "properties": { + "COUNT": "COUNT", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ResourcesResponse": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoints": { + "type": "Optional[list[_models.ResourcesResponseEndpointsItem]]", + "default": null, + "param_type": "keyword_only" + }, + "custom_domains": { + "type": "Optional[list[_models.ResourcesResponseCustomDomainsItem]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "endpoints": "Optional", + "custom_domains": "Optional" + } + }, + "ResourcesResponseCustomDomainsItem": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "endpoint_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "history": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "id": "Optional", + "name": "Optional", + "endpoint_id": "Optional", + "history": "Optional" + } + }, + "ResourcesResponseEndpointsItem": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "history": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "custom_domains": { + "type": "Optional[list[_models.ResourcesResponseEndpointsPropertiesItemsItem]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "id": "Optional", + "name": "Optional", + "history": "Optional", + "custom_domains": "Optional" + } + }, + "ResourcesResponseEndpointsPropertiesItemsItem": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "endpoint_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "history": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "id": "Optional", + "name": "Optional", + "endpoint_id": "Optional", + "history": "Optional" + } + }, + "ResponseBasedDetectedErrorTypes": { + "type": "Enum", + "methods": {}, + "properties": { + "NONE": "NONE", + "TCP_AND_HTTP_ERRORS": "TCP_AND_HTTP_ERRORS", + "TCP_ERRORS_ONLY": "TCP_ERRORS_ONLY", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ResponseBasedOriginErrorDetectionParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "response_based_detected_error_types": { + "type": "Optional[Union[str, _models.ResponseBasedDetectedErrorTypes]]", + "default": null, + "param_type": "keyword_only" + }, + "response_based_failover_threshold_percentage": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "http_error_ranges": { + "type": "Optional[list[_models.HttpErrorRangeParameters]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "response_based_detected_error_types": "Optional", + "response_based_failover_threshold_percentage": "Optional", + "http_error_ranges": "Optional" + } + }, + "Route": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.RouteProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "RouteConfigurationOverrideActionParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_override": { + "type": "Optional[_models.OriginGroupOverride]", + "default": null, + "param_type": "keyword_only" + }, + "cache_configuration": { + "type": "Optional[_models.CacheConfiguration]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "type_name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "origin_group_override": "Optional", + "cache_configuration": "Optional", + "type_name": null + } + }, + "RouteProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domains": { + "type": "Optional[list[_models.ActivatedResourceReference]]", + "default": null, + "param_type": "keyword_only" + }, + "origin_group": { + "type": "Optional[_models.ResourceReference]", + "default": null, + "param_type": "keyword_only" + }, + "origin_path": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "rule_sets": { + "type": "Optional[list[_models.ResourceReference]]", + "default": null, + "param_type": "keyword_only" + }, + "supported_protocols": { + "type": "Optional[list[Union[str, _models.AFDEndpointProtocols]]]", + "default": null, + "param_type": "keyword_only" + }, + "patterns_to_match": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "cache_configuration": { + "type": "Optional[_models.AfdRouteCacheConfiguration]", + "default": null, + "param_type": "keyword_only" + }, + "forwarding_protocol": { + "type": "Optional[Union[str, _models.ForwardingProtocol]]", + "default": null, + "param_type": "keyword_only" + }, + "link_to_default_domain": { + "type": "Optional[Union[str, _models.LinkToDefaultDomain]]", + "default": null, + "param_type": "keyword_only" + }, + "https_redirect": { + "type": "Optional[Union[str, _models.HttpsRedirect]]", + "default": null, + "param_type": "keyword_only" + }, + "enabled_state": { + "type": "Optional[Union[str, _models.EnabledState]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "endpoint_name": "Optional", + "custom_domains": "Optional", + "origin_group": "Optional", + "origin_path": "Optional", + "rule_sets": "Optional", + "supported_protocols": "Optional", + "patterns_to_match": "Optional", + "cache_configuration": "Optional", + "forwarding_protocol": "Optional", + "link_to_default_domain": "Optional", + "https_redirect": "Optional", + "enabled_state": "Optional", + "provisioning_state": "Optional", + "deployment_status": "Optional" + } + }, + "RouteUpdateParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.RouteUpdatePropertiesParameters]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "properties": "Optional" + } + }, + "RouteUpdatePropertiesParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domains": { + "type": "Optional[list[_models.ActivatedResourceReference]]", + "default": null, + "param_type": "keyword_only" + }, + "origin_group": { + "type": "Optional[_models.ResourceReference]", + "default": null, + "param_type": "keyword_only" + }, + "origin_path": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "rule_sets": { + "type": "Optional[list[_models.ResourceReference]]", + "default": null, + "param_type": "keyword_only" + }, + "supported_protocols": { + "type": "Optional[list[Union[str, _models.AFDEndpointProtocols]]]", + "default": null, + "param_type": "keyword_only" + }, + "patterns_to_match": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "cache_configuration": { + "type": "Optional[_models.AfdRouteCacheConfiguration]", + "default": null, + "param_type": "keyword_only" + }, + "forwarding_protocol": { + "type": "Optional[Union[str, _models.ForwardingProtocol]]", + "default": null, + "param_type": "keyword_only" + }, + "link_to_default_domain": { + "type": "Optional[Union[str, _models.LinkToDefaultDomain]]", + "default": null, + "param_type": "keyword_only" + }, + "https_redirect": { + "type": "Optional[Union[str, _models.HttpsRedirect]]", + "default": null, + "param_type": "keyword_only" + }, + "enabled_state": { + "type": "Optional[Union[str, _models.EnabledState]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "endpoint_name": "Optional", + "custom_domains": "Optional", + "origin_group": "Optional", + "origin_path": "Optional", + "rule_sets": "Optional", + "supported_protocols": "Optional", + "patterns_to_match": "Optional", + "cache_configuration": "Optional", + "forwarding_protocol": "Optional", + "link_to_default_domain": "Optional", + "https_redirect": "Optional", + "enabled_state": "Optional" + } + }, + "Rule": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.RuleProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "RuleCacheBehavior": { + "type": "Enum", + "methods": {}, + "properties": { + "HONOR_ORIGIN": "HONOR_ORIGIN", + "OVERRIDE_ALWAYS": "OVERRIDE_ALWAYS", + "OVERRIDE_IF_ORIGIN_MISSING": "OVERRIDE_IF_ORIGIN_MISSING", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "RuleIsCompressionEnabled": { + "type": "Enum", + "methods": {}, + "properties": { + "DISABLED": "DISABLED", + "ENABLED": "ENABLED", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "RuleProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "order": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "conditions": { + "type": "Optional[list[_models.DeliveryRuleCondition]]", + "default": null, + "param_type": "keyword_only" + }, + "actions": { + "type": "Optional[list[_models.DeliveryRuleAction]]", + "default": null, + "param_type": "keyword_only" + }, + "match_processing_behavior": { + "type": "Optional[Union[str, _models.MatchProcessingBehavior]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "rule_set_name": "Optional", + "order": "Optional", + "conditions": "Optional", + "actions": "Optional", + "match_processing_behavior": "Optional", + "provisioning_state": "Optional", + "deployment_status": "Optional" + } + }, + "RuleQueryStringCachingBehavior": { + "type": "Enum", + "methods": {}, + "properties": { + "IGNORE_QUERY_STRING": "IGNORE_QUERY_STRING", + "IGNORE_SPECIFIED_QUERY_STRINGS": "IGNORE_SPECIFIED_QUERY_STRINGS", + "INCLUDE_SPECIFIED_QUERY_STRINGS": "INCLUDE_SPECIFIED_QUERY_STRINGS", + "USE_QUERY_STRING": "USE_QUERY_STRING", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "RuleSet": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.RuleSetProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "RuleSetProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "profile_name": "Optional", + "provisioning_state": "Optional", + "deployment_status": "Optional" + } + }, + "RuleUpdateParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.RuleUpdatePropertiesParameters]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "properties": "Optional" + } + }, + "RuleUpdatePropertiesParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "order": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "conditions": { + "type": "Optional[list[_models.DeliveryRuleCondition]]", + "default": null, + "param_type": "keyword_only" + }, + "actions": { + "type": "Optional[list[_models.DeliveryRuleAction]]", + "default": null, + "param_type": "keyword_only" + }, + "match_processing_behavior": { + "type": "Optional[Union[str, _models.MatchProcessingBehavior]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "rule_set_name": "Optional", + "order": "Optional", + "conditions": "Optional", + "actions": "Optional", + "match_processing_behavior": "Optional" + } + }, + "ScrubbingRuleEntryMatchOperator": { + "type": "Enum", + "methods": {}, + "properties": { + "EQUALS_ANY": "EQUALS_ANY", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ScrubbingRuleEntryMatchVariable": { + "type": "Enum", + "methods": {}, + "properties": { + "QUERY_STRING_ARG_NAMES": "QUERY_STRING_ARG_NAMES", + "REQUEST_IP_ADDRESS": "REQUEST_IP_ADDRESS", + "REQUEST_URI": "REQUEST_URI", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ScrubbingRuleEntryState": { + "type": "Enum", + "methods": {}, + "properties": { + "DISABLED": "DISABLED", + "ENABLED": "ENABLED", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "Secret": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.SecretProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "SecretParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "type": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "type": null + } + }, + "SecretProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "Optional[_models.SecretParameters]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "profile_name": "Optional", + "parameters": "Optional", + "provisioning_state": "Optional", + "deployment_status": "Optional" + } + }, + "SecretType": { + "type": "Enum", + "methods": {}, + "properties": { + "AZURE_FIRST_PARTY_MANAGED_CERTIFICATE": "AZURE_FIRST_PARTY_MANAGED_CERTIFICATE", + "CUSTOMER_CERTIFICATE": "CUSTOMER_CERTIFICATE", + "MANAGED_CERTIFICATE": "MANAGED_CERTIFICATE", + "URL_SIGNING_KEY": "URL_SIGNING_KEY", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "SecurityPolicy": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.SecurityPolicyProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "SecurityPolicyProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "Optional[_models.SecurityPolicyPropertiesParameters]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "profile_name": "Optional", + "parameters": "Optional", + "provisioning_state": "Optional", + "deployment_status": "Optional" + } + }, + "SecurityPolicyPropertiesParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "type": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "type": null + } + }, + "SecurityPolicyType": { + "type": "Enum", + "methods": {}, + "properties": { + "WEB_APPLICATION_FIREWALL": "WEB_APPLICATION_FIREWALL", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "SecurityPolicyUpdateParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.SecurityPolicyUpdateProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "properties": "Optional" + } + }, + "SecurityPolicyUpdateProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "Optional[_models.SecurityPolicyPropertiesParameters]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "parameters": "Optional" + } + }, + "SecurityPolicyWebApplicationFirewallAssociation": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "domains": { + "type": "Optional[list[_models.ActivatedResourceReference]]", + "default": null, + "param_type": "keyword_only" + }, + "patterns_to_match": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "domains": "Optional", + "patterns_to_match": "Optional" + } + }, + "SecurityPolicyWebApplicationFirewallParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "waf_policy": { + "type": "Optional[_models.ResourceReference]", + "default": null, + "param_type": "keyword_only" + }, + "associations": { + "type": "Optional[list[_models.SecurityPolicyWebApplicationFirewallAssociation]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "type": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "waf_policy": "Optional", + "associations": "Optional", + "type": null + } + }, + "ServerPortMatchConditionParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "operator": { + "type": "Union[str, _models.ServerPortOperator]", + "default": null, + "param_type": "keyword_only" + }, + "negate_condition": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "match_values": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "transforms": { + "type": "Optional[list[Union[str, _models.Transform]]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "type_name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "operator": "Union", + "negate_condition": "Optional", + "match_values": "Optional", + "transforms": "Optional", + "type_name": null + } + }, + "ServerPortOperator": { + "type": "Enum", + "methods": {}, + "properties": { + "ANY": "ANY", + "BEGINS_WITH": "BEGINS_WITH", + "CONTAINS": "CONTAINS", + "ENDS_WITH": "ENDS_WITH", + "EQUAL": "EQUAL", + "GREATER_THAN": "GREATER_THAN", + "GREATER_THAN_OR_EQUAL": "GREATER_THAN_OR_EQUAL", + "LESS_THAN": "LESS_THAN", + "LESS_THAN_OR_EQUAL": "LESS_THAN_OR_EQUAL", + "REG_EX": "REG_EX", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ServiceSpecification": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "log_specifications": { + "type": "Optional[list[_models.LogSpecification]]", + "default": null, + "param_type": "keyword_only" + }, + "metric_specifications": { + "type": "Optional[list[_models.MetricSpecification]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "log_specifications": "Optional", + "metric_specifications": "Optional" + } + }, + "SharedPrivateLinkResourceProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "private_link": { + "type": "Optional[_models.ResourceReference]", + "default": null, + "param_type": "keyword_only" + }, + "private_link_location": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "group_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "request_message": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "status": { + "type": "Optional[Union[str, _models.SharedPrivateLinkResourceStatus]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "private_link": "Optional", + "private_link_location": "Optional", + "group_id": "Optional", + "request_message": "Optional", + "status": "Optional" + } + }, + "SharedPrivateLinkResourceStatus": { + "type": "Enum", + "methods": {}, + "properties": { + "APPROVED": "APPROVED", + "DISCONNECTED": "DISCONNECTED", + "PENDING": "PENDING", + "REJECTED": "REJECTED", + "TIMEOUT": "TIMEOUT", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "Sku": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "Optional[Union[str, _models.SkuName]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "name": "Optional" + } + }, + "SkuName": { + "type": "Enum", + "methods": {}, + "properties": { + "CUSTOM_VERIZON": "CUSTOM_VERIZON", + "PREMIUM_AZURE_FRONT_DOOR": "PREMIUM_AZURE_FRONT_DOOR", + "PREMIUM_VERIZON": "PREMIUM_VERIZON", + "STANDARD955_BAND_WIDTH_CHINA_CDN": "STANDARD955_BAND_WIDTH_CHINA_CDN", + "STANDARD_AKAMAI": "STANDARD_AKAMAI", + "STANDARD_AVG_BAND_WIDTH_CHINA_CDN": "STANDARD_AVG_BAND_WIDTH_CHINA_CDN", + "STANDARD_AZURE_FRONT_DOOR": "STANDARD_AZURE_FRONT_DOOR", + "STANDARD_CHINA_CDN": "STANDARD_CHINA_CDN", + "STANDARD_MICROSOFT": "STANDARD_MICROSOFT", + "STANDARD_PLUS955_BAND_WIDTH_CHINA_CDN": "STANDARD_PLUS955_BAND_WIDTH_CHINA_CDN", + "STANDARD_PLUS_AVG_BAND_WIDTH_CHINA_CDN": "STANDARD_PLUS_AVG_BAND_WIDTH_CHINA_CDN", + "STANDARD_PLUS_CHINA_CDN": "STANDARD_PLUS_CHINA_CDN", + "STANDARD_VERIZON": "STANDARD_VERIZON", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "SocketAddrMatchConditionParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "operator": { + "type": "Union[str, _models.SocketAddrOperator]", + "default": null, + "param_type": "keyword_only" + }, + "negate_condition": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "match_values": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "transforms": { + "type": "Optional[list[Union[str, _models.Transform]]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "type_name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "operator": "Union", + "negate_condition": "Optional", + "match_values": "Optional", + "transforms": "Optional", + "type_name": null + } + }, + "SocketAddrOperator": { + "type": "Enum", + "methods": {}, + "properties": { + "ANY": "ANY", + "IP_MATCH": "IP_MATCH", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "SslProtocol": { + "type": "Enum", + "methods": {}, + "properties": { + "TL_SV1": "TL_SV1", + "TL_SV1_1": "TL_SV1_1", + "TL_SV1_2": "TL_SV1_2", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "SslProtocolMatchConditionParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "operator": { + "type": "Union[str, _models.SslProtocolOperator]", + "default": null, + "param_type": "keyword_only" + }, + "negate_condition": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "match_values": { + "type": "Optional[list[Union[str, _models.SslProtocol]]]", + "default": null, + "param_type": "keyword_only" + }, + "transforms": { + "type": "Optional[list[Union[str, _models.Transform]]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "type_name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "operator": "Union", + "negate_condition": "Optional", + "match_values": "Optional", + "transforms": "Optional", + "type_name": null + } + }, + "SslProtocolOperator": { + "type": "Enum", + "methods": {}, + "properties": { + "EQUAL": "EQUAL", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "SsoUri": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "sso_uri_value": "Optional" + } + }, + "Status": { + "type": "Enum", + "methods": {}, + "properties": { + "ACCESS_DENIED": "ACCESS_DENIED", + "CERTIFICATE_EXPIRED": "CERTIFICATE_EXPIRED", + "INVALID": "INVALID", + "VALID": "VALID", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "SupportedOptimizationTypesListResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "supported_optimization_types": "Optional" + } + }, + "SystemData": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "created_by": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "created_by_type": { + "type": "Optional[Union[str, _models.CreatedByType]]", + "default": null, + "param_type": "keyword_only" + }, + "created_at": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + }, + "last_modified_by": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "last_modified_by_type": { + "type": "Optional[Union[str, _models.CreatedByType]]", + "default": null, + "param_type": "keyword_only" + }, + "last_modified_at": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "created_by": "Optional", + "created_by_type": "Optional", + "created_at": "Optional", + "last_modified_by": "Optional", + "last_modified_by_type": "Optional", + "last_modified_at": "Optional" + } + }, + "TrackedResource": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "tags": { + "type": "Optional[dict[str, str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "tags": "Optional", + "location": null, + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "Transform": { + "type": "Enum", + "methods": {}, + "properties": { + "LOWERCASE": "LOWERCASE", + "REMOVE_NULLS": "REMOVE_NULLS", + "TRIM": "TRIM", + "UPPERCASE": "UPPERCASE", + "URL_DECODE": "URL_DECODE", + "URL_ENCODE": "URL_ENCODE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "TransformType": { + "type": "Enum", + "methods": {}, + "properties": { + "LOWERCASE": "LOWERCASE", + "REMOVE_NULLS": "REMOVE_NULLS", + "TRIM": "TRIM", + "UPPERCASE": "UPPERCASE", + "URL_DECODE": "URL_DECODE", + "URL_ENCODE": "URL_ENCODE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "UpdateRule": { + "type": "Enum", + "methods": {}, + "properties": { + "NO_ACTION": "NO_ACTION", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "UrlFileExtensionMatchConditionParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "operator": { + "type": "Union[str, _models.UrlFileExtensionOperator]", + "default": null, + "param_type": "keyword_only" + }, + "negate_condition": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "match_values": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "transforms": { + "type": "Optional[list[Union[str, _models.Transform]]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "type_name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "operator": "Union", + "negate_condition": "Optional", + "match_values": "Optional", + "transforms": "Optional", + "type_name": null + } + }, + "UrlFileExtensionOperator": { + "type": "Enum", + "methods": {}, + "properties": { + "ANY": "ANY", + "BEGINS_WITH": "BEGINS_WITH", + "CONTAINS": "CONTAINS", + "ENDS_WITH": "ENDS_WITH", + "EQUAL": "EQUAL", + "GREATER_THAN": "GREATER_THAN", + "GREATER_THAN_OR_EQUAL": "GREATER_THAN_OR_EQUAL", + "LESS_THAN": "LESS_THAN", + "LESS_THAN_OR_EQUAL": "LESS_THAN_OR_EQUAL", + "REG_EX": "REG_EX", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "UrlFileNameMatchConditionParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "operator": { + "type": "Union[str, _models.UrlFileNameOperator]", + "default": null, + "param_type": "keyword_only" + }, + "negate_condition": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "match_values": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "transforms": { + "type": "Optional[list[Union[str, _models.Transform]]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "type_name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "operator": "Union", + "negate_condition": "Optional", + "match_values": "Optional", + "transforms": "Optional", + "type_name": null + } + }, + "UrlFileNameOperator": { + "type": "Enum", + "methods": {}, + "properties": { + "ANY": "ANY", + "BEGINS_WITH": "BEGINS_WITH", + "CONTAINS": "CONTAINS", + "ENDS_WITH": "ENDS_WITH", + "EQUAL": "EQUAL", + "GREATER_THAN": "GREATER_THAN", + "GREATER_THAN_OR_EQUAL": "GREATER_THAN_OR_EQUAL", + "LESS_THAN": "LESS_THAN", + "LESS_THAN_OR_EQUAL": "LESS_THAN_OR_EQUAL", + "REG_EX": "REG_EX", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "UrlPathMatchConditionParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "operator": { + "type": "Union[str, _models.UrlPathOperator]", + "default": null, + "param_type": "keyword_only" + }, + "negate_condition": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "match_values": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "transforms": { + "type": "Optional[list[Union[str, _models.Transform]]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "type_name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "operator": "Union", + "negate_condition": "Optional", + "match_values": "Optional", + "transforms": "Optional", + "type_name": null + } + }, + "UrlPathOperator": { + "type": "Enum", + "methods": {}, + "properties": { + "ANY": "ANY", + "BEGINS_WITH": "BEGINS_WITH", + "CONTAINS": "CONTAINS", + "ENDS_WITH": "ENDS_WITH", + "EQUAL": "EQUAL", + "GREATER_THAN": "GREATER_THAN", + "GREATER_THAN_OR_EQUAL": "GREATER_THAN_OR_EQUAL", + "LESS_THAN": "LESS_THAN", + "LESS_THAN_OR_EQUAL": "LESS_THAN_OR_EQUAL", + "REG_EX": "REG_EX", + "WILDCARD": "WILDCARD", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "UrlRedirectAction": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "_models.UrlRedirectActionParameters", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "parameters": null, + "name": null + } + }, + "UrlRedirectActionParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "redirect_type": { + "type": "Union[str, _models.RedirectType]", + "default": null, + "param_type": "keyword_only" + }, + "destination_protocol": { + "type": "Optional[Union[str, _models.DestinationProtocol]]", + "default": null, + "param_type": "keyword_only" + }, + "custom_path": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "custom_hostname": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "custom_query_string": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "custom_fragment": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "type_name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "redirect_type": "Union", + "destination_protocol": "Optional", + "custom_path": "Optional", + "custom_hostname": "Optional", + "custom_query_string": "Optional", + "custom_fragment": "Optional", + "type_name": null + } + }, + "UrlRewriteAction": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "_models.UrlRewriteActionParameters", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "parameters": null, + "name": null + } + }, + "UrlRewriteActionParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "source_pattern": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "destination": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "preserve_unmatched_path": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "type_name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "source_pattern": null, + "destination": null, + "preserve_unmatched_path": "Optional", + "type_name": null + } + }, + "UrlSigningAction": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "_models.UrlSigningActionParameters", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "parameters": null, + "name": null + } + }, + "UrlSigningActionParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "algorithm": { + "type": "Optional[Union[str, _models.Algorithm]]", + "default": null, + "param_type": "keyword_only" + }, + "parameter_name_override": { + "type": "Optional[list[_models.UrlSigningParamIdentifier]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "type_name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "algorithm": "Optional", + "parameter_name_override": "Optional", + "type_name": null + } + }, + "UrlSigningKey": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key_id": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "key_source_parameters": { + "type": "_models.KeyVaultSigningKeyParameters", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "key_id": null, + "key_source_parameters": null + } + }, + "UrlSigningKeyParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key_id": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "secret_source": { + "type": "_models.ResourceReference", + "default": null, + "param_type": "keyword_only" + }, + "secret_version": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "type": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "key_id": null, + "secret_source": null, + "secret_version": null, + "type": null + } + }, + "UrlSigningParamIdentifier": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "param_indicator": { + "type": "Union[str, _models.ParamIndicator]", + "default": null, + "param_type": "keyword_only" + }, + "param_name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "param_indicator": "Union", + "param_name": null + } + }, + "Usage": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "unit": { + "type": "Union[str, _models.UsageUnit]", + "default": null, + "param_type": "keyword_only" + }, + "current_value": { + "type": "int", + "default": null, + "param_type": "keyword_only" + }, + "limit": { + "type": "int", + "default": null, + "param_type": "keyword_only" + }, + "name": { + "type": "_models.UsageName", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "id": "Optional", + "unit": "Union", + "current_value": null, + "limit": null, + "name": null + } + }, + "UsageName": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "localized_value": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "value": "Optional", + "localized_value": "Optional" + } + }, + "UsageUnit": { + "type": "Enum", + "methods": {}, + "properties": { + "COUNT": "COUNT", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "UserAssignedIdentity": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "principal_id": "Optional", + "client_id": "Optional" + } + }, + "UserManagedHttpsParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "protocol_type": { + "type": "Union[str, _models.ProtocolType]", + "default": null, + "param_type": "keyword_only" + }, + "certificate_source_parameters": { + "type": "_models.KeyVaultCertificateSourceParameters", + "default": null, + "param_type": "keyword_only" + }, + "minimum_tls_version": { + "type": "Optional[Union[str, _models.MinimumTlsVersion]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_source": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "protocol_type": { + "type": "Union[str, _models.ProtocolType]", + "default": null, + "param_type": "keyword_only" + }, + "minimum_tls_version": { + "type": "Optional[Union[str, _models.MinimumTlsVersion]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "certificate_source_parameters": null, + "certificate_source": null, + "protocol_type": "Union", + "minimum_tls_version": "Optional" + } + }, + "ValidateCustomDomainInput": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "host_name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "host_name": null + } + }, + "ValidateCustomDomainOutput": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "custom_domain_validated": "Optional", + "reason": "Optional", + "message": "Optional" + } + }, + "ValidateProbeInput": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "probe_url": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "probe_url": null + } + }, + "ValidateProbeOutput": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "is_valid": "Optional", + "error_code": "Optional", + "message": "Optional" + } + }, + "ValidateSecretInput": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "secret_type": { + "type": "Union[str, _models.SecretType]", + "default": null, + "param_type": "keyword_only" + }, + "secret_source": { + "type": "_models.ResourceReference", + "default": null, + "param_type": "keyword_only" + }, + "secret_version": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "secret_type": "Union", + "secret_source": null, + "secret_version": "Optional" + } + }, + "ValidateSecretOutput": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "status": { + "type": "Optional[Union[str, _models.Status]]", + "default": null, + "param_type": "keyword_only" + }, + "message": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "status": "Optional", + "message": "Optional" + } + }, + "WafAction": { + "type": "Enum", + "methods": {}, + "properties": { + "ALLOW": "ALLOW", + "BLOCK": "BLOCK", + "LOG": "LOG", + "REDIRECT": "REDIRECT", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "WafGranularity": { + "type": "Enum", + "methods": {}, + "properties": { + "P1_D": "P1_D", + "PT1_H": "PT1_H", + "PT5_M": "PT5_M", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "WafMatchVariable": { + "type": "Enum", + "methods": {}, + "properties": { + "COOKIES": "COOKIES", + "POST_ARGS": "POST_ARGS", + "QUERY_STRING": "QUERY_STRING", + "REMOTE_ADDR": "REMOTE_ADDR", + "REQUEST_BODY": "REQUEST_BODY", + "REQUEST_HEADER": "REQUEST_HEADER", + "REQUEST_METHOD": "REQUEST_METHOD", + "REQUEST_URI": "REQUEST_URI", + "SOCKET_ADDR": "SOCKET_ADDR", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "WafMetric": { + "type": "Enum", + "methods": {}, + "properties": { + "CLIENT_REQUEST_COUNT": "CLIENT_REQUEST_COUNT", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "WafMetricsGranularity": { + "type": "Enum", + "methods": {}, + "properties": { + "P1_D": "P1_D", + "PT1_H": "PT1_H", + "PT5_M": "PT5_M", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "WafMetricsResponse": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "date_time_begin": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + }, + "date_time_end": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + }, + "granularity": { + "type": "Optional[Union[str, _models.WafMetricsGranularity]]", + "default": null, + "param_type": "keyword_only" + }, + "series": { + "type": "Optional[list[_models.WafMetricsResponseSeriesItem]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "date_time_begin": "Optional", + "date_time_end": "Optional", + "granularity": "Optional", + "series": "Optional" + } + }, + "WafMetricsResponseSeriesItem": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "metric": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "unit": { + "type": "Optional[Union[str, _models.WafMetricsSeriesUnit]]", + "default": null, + "param_type": "keyword_only" + }, + "groups": { + "type": "Optional[list[_models.WafMetricsResponseSeriesPropertiesItemsItem]]", + "default": null, + "param_type": "keyword_only" + }, + "data": { + "type": "Optional[list[_models.Components18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsPropertiesDataItems]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "metric": "Optional", + "unit": "Optional", + "groups": "Optional", + "data": "Optional" + } + }, + "WafMetricsResponseSeriesPropertiesItemsItem": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "value": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "name": "Optional", + "value": "Optional" + } + }, + "WafMetricsSeriesUnit": { + "type": "Enum", + "methods": {}, + "properties": { + "COUNT": "COUNT", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "WafRankingGroupBy": { + "type": "Enum", + "methods": {}, + "properties": { + "CUSTOM_DOMAIN": "CUSTOM_DOMAIN", + "HTTP_STATUS_CODE": "HTTP_STATUS_CODE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "WafRankingType": { + "type": "Enum", + "methods": {}, + "properties": { + "ACTION": "ACTION", + "CLIENT_IP": "CLIENT_IP", + "COUNTRY_OR_REGION": "COUNTRY_OR_REGION", + "RULE_GROUP": "RULE_GROUP", + "RULE_ID": "RULE_ID", + "RULE_TYPE": "RULE_TYPE", + "URL": "URL", + "USER_AGENT": "USER_AGENT", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "WafRankingsResponse": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "date_time_begin": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + }, + "date_time_end": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + }, + "groups": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "data": { + "type": "Optional[list[_models.WafRankingsResponseDataItem]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "date_time_begin": "Optional", + "date_time_end": "Optional", + "groups": "Optional", + "data": "Optional" + } + }, + "WafRankingsResponseDataItem": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "group_values": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "metrics": { + "type": "Optional[list[_models.ComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItems]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "group_values": "Optional", + "metrics": "Optional" + } + }, + "WafRuleType": { + "type": "Enum", + "methods": {}, + "properties": { + "BOT": "BOT", + "CUSTOM": "CUSTOM", + "MANAGED": "MANAGED", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + } + }, + "function_nodes": {} + }, + "azure.mgmt.cdn.operations": { + "class_nodes": { + "AFDCustomDomainsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[AFDDomain]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain": { + "type": "AFDDomain", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[AFDDomain]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[AFDDomain]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[AFDDomain]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[None]", + "overloads": [] + }, + "begin_refresh_validation_token": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[None]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_update_properties": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[AFDDomain]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_update_properties": { + "type": "AFDDomainUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[AFDDomain]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_update_properties": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[AFDDomain]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_update_properties": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[AFDDomain]" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AFDDomain", + "overloads": [] + }, + "list_by_profile": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.AFDDomain]", + "overloads": [] + } + }, + "properties": {} + }, + "AFDEndpointsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[AFDEndpoint]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint": { + "type": "AFDEndpoint", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[AFDEndpoint]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[AFDEndpoint]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[AFDEndpoint]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[None]", + "overloads": [] + }, + "begin_purge_content": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "contents": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[None]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "contents": { + "type": "AfdPurgeParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[None]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "contents": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[None]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "contents": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[None]" + } + ] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_update_properties": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[AFDEndpoint]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_update_properties": { + "type": "AFDEndpointUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[AFDEndpoint]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_update_properties": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[AFDEndpoint]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_update_properties": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[AFDEndpoint]" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AFDEndpoint", + "overloads": [] + }, + "list_by_profile": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.AFDEndpoint]", + "overloads": [] + }, + "list_resource_usage": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.Usage]", + "overloads": [] + }, + "validate_custom_domain": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_properties": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ValidateCustomDomainOutput", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_properties": { + "type": "ValidateCustomDomainInput", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "ValidateCustomDomainOutput" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_properties": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "ValidateCustomDomainOutput" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_properties": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "ValidateCustomDomainOutput" + } + ] + } + }, + "properties": {} + }, + "AFDOriginGroupsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[AFDOriginGroup]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group": { + "type": "AFDOriginGroup", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[AFDOriginGroup]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[AFDOriginGroup]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[AFDOriginGroup]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[None]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_update_properties": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[AFDOriginGroup]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_update_properties": { + "type": "AFDOriginGroupUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[AFDOriginGroup]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_update_properties": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[AFDOriginGroup]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_update_properties": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[AFDOriginGroup]" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AFDOriginGroup", + "overloads": [] + }, + "list_by_profile": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.AFDOriginGroup]", + "overloads": [] + }, + "list_resource_usage": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.Usage]", + "overloads": [] + } + }, + "properties": {} + }, + "AFDOriginsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "origin": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[AFDOrigin]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin": { + "type": "AFDOrigin", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[AFDOrigin]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[AFDOrigin]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[AFDOrigin]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[None]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_update_properties": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[AFDOrigin]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_update_properties": { + "type": "AFDOriginUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[AFDOrigin]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_update_properties": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[AFDOrigin]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_update_properties": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[AFDOrigin]" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AFDOrigin", + "overloads": [] + }, + "list_by_origin_group": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.AFDOrigin]", + "overloads": [] + } + }, + "properties": {} + }, + "AFDProfilesOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_upgrade": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_upgrade_parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[Profile]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_upgrade_parameters": { + "type": "ProfileUpgradeParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[Profile]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_upgrade_parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[Profile]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_upgrade_parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[Profile]" + } + ] + }, + "check_endpoint_name_availability": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "check_endpoint_name_availability_input": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "CheckEndpointNameAvailabilityOutput", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "check_endpoint_name_availability_input": { + "type": "CheckEndpointNameAvailabilityInput", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "CheckEndpointNameAvailabilityOutput" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "check_endpoint_name_availability_input": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "CheckEndpointNameAvailabilityOutput" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "check_endpoint_name_availability_input": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "CheckEndpointNameAvailabilityOutput" + } + ] + }, + "check_host_name_availability": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "check_host_name_availability_input": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "CheckNameAvailabilityOutput", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "check_host_name_availability_input": { + "type": "CheckHostNameAvailabilityInput", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "CheckNameAvailabilityOutput" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "check_host_name_availability_input": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "CheckNameAvailabilityOutput" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "check_host_name_availability_input": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "CheckNameAvailabilityOutput" + } + ] + }, + "list_resource_usage": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.Usage]", + "overloads": [] + }, + "validate_secret": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "validate_secret_input": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ValidateSecretOutput", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "validate_secret_input": { + "type": "ValidateSecretInput", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "ValidateSecretOutput" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "validate_secret_input": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "ValidateSecretOutput" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "validate_secret_input": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "ValidateSecretOutput" + } + ] + } + }, + "properties": {} + }, + "CustomDomainsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_properties": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[CustomDomain]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_properties": { + "type": "CustomDomainParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[CustomDomain]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_properties": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[CustomDomain]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_properties": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[CustomDomain]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[CustomDomain]", + "overloads": [] + }, + "begin_disable_custom_https": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[CustomDomain]", + "overloads": [] + }, + "begin_enable_custom_https": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_https_parameters": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[CustomDomain]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_https_parameters": { + "type": "Optional[CustomDomainHttpsParameters]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[CustomDomain]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_https_parameters": { + "type": "Optional[JSON]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[CustomDomain]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_https_parameters": { + "type": "Optional[IO[bytes]]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[CustomDomain]" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "CustomDomain", + "overloads": [] + }, + "list_by_endpoint": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.CustomDomain]", + "overloads": [] + } + }, + "properties": {} + }, + "EdgeNodesOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.EdgeNode]", + "overloads": [] + } + }, + "properties": {} + }, + "EndpointsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[Endpoint]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint": { + "type": "Endpoint", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[Endpoint]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[Endpoint]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[Endpoint]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[None]", + "overloads": [] + }, + "begin_load_content": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_file_paths": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[None]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_file_paths": { + "type": "LoadParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[None]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_file_paths": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[None]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_file_paths": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[None]" + } + ] + }, + "begin_purge_content": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_file_paths": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[None]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_file_paths": { + "type": "PurgeParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[None]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_file_paths": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[None]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_file_paths": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[None]" + } + ] + }, + "begin_start": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[Endpoint]", + "overloads": [] + }, + "begin_stop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[Endpoint]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_update_properties": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[Endpoint]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_update_properties": { + "type": "EndpointUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[Endpoint]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_update_properties": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[Endpoint]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_update_properties": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[Endpoint]" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "Endpoint", + "overloads": [] + }, + "list_by_profile": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.Endpoint]", + "overloads": [] + }, + "list_resource_usage": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.ResourceUsage]", + "overloads": [] + }, + "validate_custom_domain": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_properties": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ValidateCustomDomainOutput", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_properties": { + "type": "ValidateCustomDomainInput", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "ValidateCustomDomainOutput" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_properties": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "ValidateCustomDomainOutput" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "custom_domain_properties": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "ValidateCustomDomainOutput" + } + ] + } + }, + "properties": {} + }, + "LogAnalyticsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "get_log_analytics_locations": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ContinentsResponse", + "overloads": [] + }, + "get_log_analytics_metrics": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "metrics": { + "default": null, + "param_type": "keyword_only" + }, + "date_time_begin": { + "default": null, + "param_type": "keyword_only" + }, + "date_time_end": { + "default": null, + "param_type": "keyword_only" + }, + "granularity": { + "default": null, + "param_type": "keyword_only" + }, + "custom_domains": { + "default": null, + "param_type": "keyword_only" + }, + "protocols": { + "default": null, + "param_type": "keyword_only" + }, + "group_by": { + "default": "none", + "param_type": "keyword_only" + }, + "continents": { + "default": "none", + "param_type": "keyword_only" + }, + "country_or_regions": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "MetricsResponse", + "overloads": [] + }, + "get_log_analytics_rankings": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "rankings": { + "default": null, + "param_type": "keyword_only" + }, + "metrics": { + "default": null, + "param_type": "keyword_only" + }, + "max_ranking": { + "default": null, + "param_type": "keyword_only" + }, + "date_time_begin": { + "default": null, + "param_type": "keyword_only" + }, + "date_time_end": { + "default": null, + "param_type": "keyword_only" + }, + "custom_domains": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "RankingsResponse", + "overloads": [] + }, + "get_log_analytics_resources": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ResourcesResponse", + "overloads": [] + }, + "get_waf_log_analytics_metrics": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "metrics": { + "default": null, + "param_type": "keyword_only" + }, + "date_time_begin": { + "default": null, + "param_type": "keyword_only" + }, + "date_time_end": { + "default": null, + "param_type": "keyword_only" + }, + "granularity": { + "default": null, + "param_type": "keyword_only" + }, + "actions": { + "default": "none", + "param_type": "keyword_only" + }, + "group_by": { + "default": "none", + "param_type": "keyword_only" + }, + "rule_types": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "WafMetricsResponse", + "overloads": [] + }, + "get_waf_log_analytics_rankings": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "metrics": { + "default": null, + "param_type": "keyword_only" + }, + "date_time_begin": { + "default": null, + "param_type": "keyword_only" + }, + "date_time_end": { + "default": null, + "param_type": "keyword_only" + }, + "max_ranking": { + "default": null, + "param_type": "keyword_only" + }, + "rankings": { + "default": null, + "param_type": "keyword_only" + }, + "actions": { + "default": "none", + "param_type": "keyword_only" + }, + "rule_types": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "WafRankingsResponse", + "overloads": [] + } + }, + "properties": {} + }, + "ManagedRuleSetsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.ManagedRuleSetDefinition]", + "overloads": [] + } + }, + "properties": {} + }, + "Operations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.Operation]", + "overloads": [] + } + }, + "properties": {} + }, + "OriginGroupsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[OriginGroup]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group": { + "type": "OriginGroup", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[OriginGroup]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[OriginGroup]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[OriginGroup]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[None]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_update_properties": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[OriginGroup]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_update_properties": { + "type": "OriginGroupUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[OriginGroup]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_update_properties": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[OriginGroup]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_update_properties": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[OriginGroup]" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "OriginGroup", + "overloads": [] + }, + "list_by_endpoint": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.OriginGroup]", + "overloads": [] + } + }, + "properties": {} + }, + "OriginsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "origin": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[Origin]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin": { + "type": "Origin", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[Origin]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[Origin]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[Origin]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[None]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_update_properties": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[Origin]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_update_properties": { + "type": "OriginUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[Origin]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_update_properties": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[Origin]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_update_properties": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[Origin]" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "origin_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "Origin", + "overloads": [] + }, + "list_by_endpoint": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.Origin]", + "overloads": [] + } + }, + "properties": {} + }, + "PoliciesOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cdn_web_application_firewall_policy": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[CdnWebApplicationFirewallPolicy]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cdn_web_application_firewall_policy": { + "type": "CdnWebApplicationFirewallPolicy", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[CdnWebApplicationFirewallPolicy]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cdn_web_application_firewall_policy": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[CdnWebApplicationFirewallPolicy]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cdn_web_application_firewall_policy": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[CdnWebApplicationFirewallPolicy]" + } + ] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cdn_web_application_firewall_policy_patch_parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[CdnWebApplicationFirewallPolicy]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cdn_web_application_firewall_policy_patch_parameters": { + "type": "CdnWebApplicationFirewallPolicyPatchParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[CdnWebApplicationFirewallPolicy]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cdn_web_application_firewall_policy_patch_parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[CdnWebApplicationFirewallPolicy]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cdn_web_application_firewall_policy_patch_parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[CdnWebApplicationFirewallPolicy]" + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "CdnWebApplicationFirewallPolicy", + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.CdnWebApplicationFirewallPolicy]", + "overloads": [] + } + }, + "properties": {} + }, + "ProfilesOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_can_migrate": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "can_migrate_parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[CanMigrateResult]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "can_migrate_parameters": { + "type": "CanMigrateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[CanMigrateResult]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "can_migrate_parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[CanMigrateResult]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "can_migrate_parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[CanMigrateResult]" + } + ] + }, + "begin_cdn_can_migrate_to_afd": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[CanMigrateResult]", + "overloads": [] + }, + "begin_cdn_migrate_to_afd": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "migration_parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[MigrateResult]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "migration_parameters": { + "type": "CdnMigrationToAfdParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[MigrateResult]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "migration_parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[MigrateResult]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "migration_parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[MigrateResult]" + } + ] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[Profile]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile": { + "type": "Profile", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[Profile]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[Profile]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[Profile]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[None]", + "overloads": [] + }, + "begin_migrate": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "migration_parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[MigrateResult]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "migration_parameters": { + "type": "MigrationParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[MigrateResult]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "migration_parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[MigrateResult]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "migration_parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[MigrateResult]" + } + ] + }, + "begin_migration_abort": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[None]", + "overloads": [] + }, + "begin_migration_commit": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[None]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_update_parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[Profile]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_update_parameters": { + "type": "ProfileUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[Profile]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_update_parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[Profile]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_update_parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[Profile]" + } + ] + }, + "generate_sso_uri": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "SsoUri", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "Profile", + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.Profile]", + "overloads": [] + }, + "list_by_resource_group": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.Profile]", + "overloads": [] + }, + "list_resource_usage": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.ResourceUsage]", + "overloads": [] + }, + "list_supported_optimization_types": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "SupportedOptimizationTypesListResult", + "overloads": [] + } + }, + "properties": {} + }, + "ResourceUsageOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.ResourceUsage]", + "overloads": [] + } + }, + "properties": {} + }, + "RoutesOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "route_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "route": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[Route]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "route_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "route": { + "type": "Route", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[Route]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "route_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "route": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[Route]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "route_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "route": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[Route]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "route_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[None]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "route_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "route_update_properties": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[Route]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "route_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "route_update_properties": { + "type": "RouteUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[Route]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "route_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "route_update_properties": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[Route]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "route_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "route_update_properties": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[Route]" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "route_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "Route", + "overloads": [] + }, + "list_by_endpoint": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.Route]", + "overloads": [] + } + }, + "properties": {} + }, + "RuleSetsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_set_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[None]", + "overloads": [] + }, + "create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_set_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "RuleSet", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_set_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "RuleSet", + "overloads": [] + }, + "list_by_profile": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.RuleSet]", + "overloads": [] + }, + "list_resource_usage": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_set_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.Usage]", + "overloads": [] + } + }, + "properties": {} + }, + "RulesOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_set_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "rule": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[Rule]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_set_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "rule": { + "type": "Rule", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[Rule]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_set_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "rule": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[Rule]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_set_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "rule": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[Rule]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_set_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[None]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_set_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_update_properties": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[Rule]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_set_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_update_properties": { + "type": "RuleUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[Rule]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_set_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_update_properties": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[Rule]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_set_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_update_properties": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[Rule]" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_set_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "Rule", + "overloads": [] + }, + "list_by_rule_set": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_set_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.Rule]", + "overloads": [] + } + }, + "properties": {} + }, + "SecretsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "secret_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "secret": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[Secret]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "secret_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "secret": { + "type": "Secret", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[Secret]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "secret_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "secret": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[Secret]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "secret_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "secret": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[Secret]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "secret_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[None]", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "secret_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "Secret", + "overloads": [] + }, + "list_by_profile": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.Secret]", + "overloads": [] + } + }, + "properties": {} + }, + "SecurityPoliciesOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "security_policy_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "security_policy": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[SecurityPolicy]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "security_policy_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "security_policy": { + "type": "SecurityPolicy", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[SecurityPolicy]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "security_policy_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "security_policy": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[SecurityPolicy]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "security_policy_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "security_policy": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[SecurityPolicy]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "security_policy_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[None]", + "overloads": [] + }, + "begin_patch": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "security_policy_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "security_policy_update_properties": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[SecurityPolicy]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "security_policy_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "security_policy_update_properties": { + "type": "SecurityPolicyUpdateParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[SecurityPolicy]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "security_policy_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "security_policy_update_properties": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[SecurityPolicy]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "security_policy_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "security_policy_update_properties": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[SecurityPolicy]" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "security_policy_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "SecurityPolicy", + "overloads": [] + }, + "list_by_profile": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "profile_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.SecurityPolicy]", + "overloads": [] + } + }, + "properties": {} + } + }, + "function_nodes": {} + } +} \ No newline at end of file diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_custom_domains_create.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_custom_domains_create.py index 9e83e8369513..bfa816267e1f 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_custom_domains_create.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_custom_domains_create.py @@ -1,15 +1,14 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient """ # PREREQUISITES @@ -26,9 +25,9 @@ def main(): - client = CdnManagementClient( + client = CdnClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.afd_custom_domains.begin_create( @@ -54,6 +53,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/AFDCustomDomains_Create.json +# x-ms-original-file: 2025-06-01/AFDCustomDomains_Create.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_custom_domains_delete.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_custom_domains_delete.py index a537ab9f1885..8bf327d227a0 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_custom_domains_delete.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_custom_domains_delete.py @@ -1,15 +1,14 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient """ # PREREQUISITES @@ -26,9 +25,9 @@ def main(): - client = CdnManagementClient( + client = CdnClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.afd_custom_domains.begin_delete( @@ -38,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/AFDCustomDomains_Delete.json +# x-ms-original-file: 2025-06-01/AFDCustomDomains_Delete.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_custom_domains_get.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_custom_domains_get.py index 950bfe5d7f29..37ba58c053e1 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_custom_domains_get.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_custom_domains_get.py @@ -1,15 +1,14 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient """ # PREREQUISITES @@ -26,9 +25,9 @@ def main(): - client = CdnManagementClient( + client = CdnClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.afd_custom_domains.get( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/AFDCustomDomains_Get.json +# x-ms-original-file: 2025-06-01/AFDCustomDomains_Get.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_custom_domains_list_by_profile.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_custom_domains_list_by_profile.py index c569f8c01c3e..0cba76dfbad1 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_custom_domains_list_by_profile.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_custom_domains_list_by_profile.py @@ -1,15 +1,14 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient """ # PREREQUISITES @@ -26,9 +25,9 @@ def main(): - client = CdnManagementClient( + client = CdnClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.afd_custom_domains.list_by_profile( @@ -39,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/AFDCustomDomains_ListByProfile.json +# x-ms-original-file: 2025-06-01/AFDCustomDomains_ListByProfile.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_custom_domains_refresh_validation_token.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_custom_domains_refresh_validation_token.py index 61db9f4523d2..c58318951eba 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_custom_domains_refresh_validation_token.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_custom_domains_refresh_validation_token.py @@ -1,15 +1,14 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient """ # PREREQUISITES @@ -26,9 +25,9 @@ def main(): - client = CdnManagementClient( + client = CdnClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.afd_custom_domains.begin_refresh_validation_token( @@ -38,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/AFDCustomDomains_RefreshValidationToken.json +# x-ms-original-file: 2025-06-01/AFDCustomDomains_RefreshValidationToken.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_custom_domains_update.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_custom_domains_update.py index c022ba457f31..d953dec17f21 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_custom_domains_update.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_custom_domains_update.py @@ -1,15 +1,14 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient """ # PREREQUISITES @@ -26,9 +25,9 @@ def main(): - client = CdnManagementClient( + client = CdnClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.afd_custom_domains.begin_update( @@ -53,6 +52,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/AFDCustomDomains_Update.json +# x-ms-original-file: 2025-06-01/AFDCustomDomains_Update.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_endpoints_create.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_endpoints_create.py index 34547765e57e..3c8fdd5e51f4 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_endpoints_create.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_endpoints_create.py @@ -1,15 +1,14 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient """ # PREREQUISITES @@ -26,9 +25,9 @@ def main(): - client = CdnManagementClient( + client = CdnClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.afd_endpoints.begin_create( @@ -44,6 +43,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/AFDEndpoints_Create.json +# x-ms-original-file: 2025-06-01/AFDEndpoints_Create.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_endpoints_delete.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_endpoints_delete.py index eebd2e2a3055..0003643d6456 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_endpoints_delete.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_endpoints_delete.py @@ -1,15 +1,14 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient """ # PREREQUISITES @@ -26,9 +25,9 @@ def main(): - client = CdnManagementClient( + client = CdnClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.afd_endpoints.begin_delete( @@ -38,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/AFDEndpoints_Delete.json +# x-ms-original-file: 2025-06-01/AFDEndpoints_Delete.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_endpoints_get.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_endpoints_get.py index ca756a968714..d8207e38bb60 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_endpoints_get.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_endpoints_get.py @@ -2,13 +2,13 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient """ # PREREQUISITES @@ -25,9 +25,9 @@ def main(): - client = CdnManagementClient( + client = CdnClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.afd_endpoints.get( @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/AFDEndpoints_Get.json +# x-ms-original-file: 2025-06-01/AFDEndpoints_Get.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_endpoints_list_by_profile.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_endpoints_list_by_profile.py index f7c279da295f..fa98fc4a16d0 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_endpoints_list_by_profile.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_endpoints_list_by_profile.py @@ -1,15 +1,14 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient """ # PREREQUISITES @@ -26,9 +25,9 @@ def main(): - client = CdnManagementClient( + client = CdnClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.afd_endpoints.list_by_profile( @@ -39,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/AFDEndpoints_ListByProfile.json +# x-ms-original-file: 2025-06-01/AFDEndpoints_ListByProfile.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_endpoints_list_resource_usage.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_endpoints_list_resource_usage.py index d2a5c14b81ab..73785bc252d8 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_endpoints_list_resource_usage.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_endpoints_list_resource_usage.py @@ -1,15 +1,14 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient """ # PREREQUISITES @@ -26,9 +25,9 @@ def main(): - client = CdnManagementClient( + client = CdnClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.afd_endpoints.list_resource_usage( @@ -40,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/AFDEndpoints_ListResourceUsage.json +# x-ms-original-file: 2025-06-01/AFDEndpoints_ListResourceUsage.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_endpoints_purge_content.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_endpoints_purge_content.py index b6a220d1c31d..e7c2c87ad4af 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_endpoints_purge_content.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_endpoints_purge_content.py @@ -1,15 +1,14 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient """ # PREREQUISITES @@ -26,9 +25,9 @@ def main(): - client = CdnManagementClient( + client = CdnClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.afd_endpoints.begin_purge_content( @@ -39,6 +38,6 @@ def main(): ).result() -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/AFDEndpoints_PurgeContent.json +# x-ms-original-file: 2025-06-01/AFDEndpoints_PurgeContent.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_endpoints_update.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_endpoints_update.py index e60b6c0e5602..7eac4196e6f8 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_endpoints_update.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_endpoints_update.py @@ -1,15 +1,14 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient """ # PREREQUISITES @@ -26,9 +25,9 @@ def main(): - client = CdnManagementClient( + client = CdnClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.afd_endpoints.begin_update( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/AFDEndpoints_Update.json +# x-ms-original-file: 2025-06-01/AFDEndpoints_Update.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_endpoints_validate_custom_domain.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_endpoints_validate_custom_domain.py index 23f735619e7d..34b962162907 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_endpoints_validate_custom_domain.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_endpoints_validate_custom_domain.py @@ -1,15 +1,14 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient """ # PREREQUISITES @@ -26,9 +25,9 @@ def main(): - client = CdnManagementClient( + client = CdnClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.afd_endpoints.validate_custom_domain( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/AFDEndpoints_ValidateCustomDomain.json +# x-ms-original-file: 2025-06-01/AFDEndpoints_ValidateCustomDomain.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_origin_groups_create.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_origin_groups_create.py index bc92c84cfb4a..6d85f4d3d838 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_origin_groups_create.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_origin_groups_create.py @@ -3,13 +3,13 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient """ # PREREQUISITES @@ -26,9 +26,9 @@ def main(): - client = CdnManagementClient( + client = CdnClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.afd_origin_groups.begin_create( @@ -62,6 +62,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/AFDOriginGroups_Create.json +# x-ms-original-file: 2025-06-01/AFDOriginGroups_Create.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_origin_groups_delete.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_origin_groups_delete.py index 13d620d40e7d..55f4caa40f1b 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_origin_groups_delete.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_origin_groups_delete.py @@ -1,15 +1,14 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient """ # PREREQUISITES @@ -26,9 +25,9 @@ def main(): - client = CdnManagementClient( + client = CdnClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.afd_origin_groups.begin_delete( @@ -38,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/AFDOriginGroups_Delete.json +# x-ms-original-file: 2025-06-01/AFDOriginGroups_Delete.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_origin_groups_get.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_origin_groups_get.py index 210dc52da731..8005c491e317 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_origin_groups_get.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_origin_groups_get.py @@ -1,15 +1,14 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient """ # PREREQUISITES @@ -26,9 +25,9 @@ def main(): - client = CdnManagementClient( + client = CdnClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.afd_origin_groups.get( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/AFDOriginGroups_Get.json +# x-ms-original-file: 2025-06-01/AFDOriginGroups_Get.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_origin_groups_list_by_profile.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_origin_groups_list_by_profile.py index 7fd3c62b205b..a821d1a77a75 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_origin_groups_list_by_profile.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_origin_groups_list_by_profile.py @@ -1,15 +1,14 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient """ # PREREQUISITES @@ -26,9 +25,9 @@ def main(): - client = CdnManagementClient( + client = CdnClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.afd_origin_groups.list_by_profile( @@ -39,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/AFDOriginGroups_ListByProfile.json +# x-ms-original-file: 2025-06-01/AFDOriginGroups_ListByProfile.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_origin_groups_list_resource_usage.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_origin_groups_list_resource_usage.py index b04b8575749a..f2aaaf84ba38 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_origin_groups_list_resource_usage.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_origin_groups_list_resource_usage.py @@ -1,15 +1,14 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient """ # PREREQUISITES @@ -26,9 +25,9 @@ def main(): - client = CdnManagementClient( + client = CdnClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.afd_origin_groups.list_resource_usage( @@ -40,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/AFDOriginGroups_ListResourceUsage.json +# x-ms-original-file: 2025-06-01/AFDOriginGroups_ListResourceUsage.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_origin_groups_update.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_origin_groups_update.py index df7627eebfd2..80367dab719f 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_origin_groups_update.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_origin_groups_update.py @@ -3,13 +3,13 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient """ # PREREQUISITES @@ -26,9 +26,9 @@ def main(): - client = CdnManagementClient( + client = CdnClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.afd_origin_groups.begin_update( @@ -62,6 +62,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/AFDOriginGroups_Update.json +# x-ms-original-file: 2025-06-01/AFDOriginGroups_Update.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_origins_create.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_origins_create.py index 023ca26633b3..0a2af2aa1758 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_origins_create.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_origins_create.py @@ -2,13 +2,13 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient """ # PREREQUISITES @@ -25,9 +25,9 @@ def main(): - client = CdnManagementClient( + client = CdnClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.afd_origins.begin_create( @@ -48,6 +48,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/AFDOrigins_Create.json +# x-ms-original-file: 2025-06-01/AFDOrigins_Create.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_origins_delete.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_origins_delete.py index 176d80af5131..8caf20a58d4b 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_origins_delete.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_origins_delete.py @@ -2,13 +2,13 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient """ # PREREQUISITES @@ -25,9 +25,9 @@ def main(): - client = CdnManagementClient( + client = CdnClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.afd_origins.begin_delete( @@ -38,6 +38,6 @@ def main(): ).result() -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/AFDOrigins_Delete.json +# x-ms-original-file: 2025-06-01/AFDOrigins_Delete.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_origins_get.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_origins_get.py index 786b006c3f1f..b69d4d2a2e6e 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_origins_get.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_origins_get.py @@ -2,13 +2,13 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient """ # PREREQUISITES @@ -25,9 +25,9 @@ def main(): - client = CdnManagementClient( + client = CdnClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.afd_origins.get( @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/AFDOrigins_Get.json +# x-ms-original-file: 2025-06-01/AFDOrigins_Get.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_origins_list_by_origin_group.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_origins_list_by_origin_group.py index d9044d71933e..4dcfab70c636 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_origins_list_by_origin_group.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_origins_list_by_origin_group.py @@ -1,15 +1,14 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient """ # PREREQUISITES @@ -26,9 +25,9 @@ def main(): - client = CdnManagementClient( + client = CdnClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.afd_origins.list_by_origin_group( @@ -40,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/AFDOrigins_ListByOriginGroup.json +# x-ms-original-file: 2025-06-01/AFDOrigins_ListByOriginGroup.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_origins_update.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_origins_update.py index d3cc9470d816..154c3cd67101 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_origins_update.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_origins_update.py @@ -2,13 +2,13 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient """ # PREREQUISITES @@ -25,9 +25,9 @@ def main(): - client = CdnManagementClient( + client = CdnClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.afd_origins.begin_update( @@ -47,6 +47,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/AFDOrigins_Update.json +# x-ms-original-file: 2025-06-01/AFDOrigins_Update.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_profiles_check_endpoint_name_availability.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_profiles_check_endpoint_name_availability.py index 718f7ee666b3..0bce9bf0f404 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_profiles_check_endpoint_name_availability.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_profiles_check_endpoint_name_availability.py @@ -1,15 +1,14 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient """ # PREREQUISITES @@ -26,9 +25,9 @@ def main(): - client = CdnManagementClient( + client = CdnClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.afd_profiles.check_endpoint_name_availability( @@ -43,6 +42,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/AFDProfiles_CheckEndpointNameAvailability.json +# x-ms-original-file: 2025-06-01/AFDProfiles_CheckEndpointNameAvailability.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_profiles_check_host_name_availability.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_profiles_check_host_name_availability.py index 160b7d7b4b61..d55f26aedac9 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_profiles_check_host_name_availability.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_profiles_check_host_name_availability.py @@ -1,15 +1,14 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient """ # PREREQUISITES @@ -26,9 +25,9 @@ def main(): - client = CdnManagementClient( + client = CdnClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.afd_profiles.check_host_name_availability( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/AFDProfiles_CheckHostNameAvailability.json +# x-ms-original-file: 2025-06-01/AFDProfiles_CheckHostNameAvailability.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_profiles_list_resource_usage.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_profiles_list_resource_usage.py index 8bf3e612f6f8..7b52398f5375 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_profiles_list_resource_usage.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_profiles_list_resource_usage.py @@ -1,15 +1,14 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient """ # PREREQUISITES @@ -26,9 +25,9 @@ def main(): - client = CdnManagementClient( + client = CdnClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.afd_profiles.list_resource_usage( @@ -39,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/AFDProfiles_ListResourceUsage.json +# x-ms-original-file: 2025-06-01/AFDProfiles_ListResourceUsage.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_profiles_upgrade.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_profiles_upgrade.py index 41225644e7b8..3796cc7aeaae 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_profiles_upgrade.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_profiles_upgrade.py @@ -3,13 +3,13 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient """ # PREREQUISITES @@ -26,9 +26,9 @@ def main(): - client = CdnManagementClient( + client = CdnClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.afd_profiles.begin_upgrade( @@ -48,6 +48,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/AFDProfiles_Upgrade.json +# x-ms-original-file: 2025-06-01/AFDProfiles_Upgrade.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_profiles_validate_secret.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_profiles_validate_secret.py index b9a63f1eb9b7..989afcba0ee3 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_profiles_validate_secret.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/afd_profiles_validate_secret.py @@ -3,13 +3,13 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient """ # PREREQUISITES @@ -26,9 +26,9 @@ def main(): - client = CdnManagementClient( + client = CdnClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.afd_profiles.validate_secret( @@ -44,6 +44,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/AFDProfiles_ValidateSecret.json +# x-ms-original-file: 2025-06-01/AFDProfiles_ValidateSecret.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/cdn_profiles_can_migrate.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/cdn_profiles_can_migrate.py index aaec77d1f482..622e529276eb 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/cdn_profiles_can_migrate.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/cdn_profiles_can_migrate.py @@ -1,15 +1,14 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient """ # PREREQUISITES @@ -26,9 +25,9 @@ def main(): - client = CdnManagementClient( + client = CdnClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.profiles.begin_cdn_can_migrate_to_afd( @@ -38,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/CdnProfiles_CanMigrate.json +# x-ms-original-file: 2025-06-01/CdnProfiles_CanMigrate.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/cdn_profiles_migrate.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/cdn_profiles_migrate.py index d28444604a54..adb04260febf 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/cdn_profiles_migrate.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/cdn_profiles_migrate.py @@ -1,15 +1,14 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient """ # PREREQUISITES @@ -26,9 +25,9 @@ def main(): - client = CdnManagementClient( + client = CdnClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.profiles.begin_cdn_migrate_to_afd( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/CdnProfiles_Migrate.json +# x-ms-original-file: 2025-06-01/CdnProfiles_Migrate.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/check_endpoint_name_availability.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/check_endpoint_name_availability.py index 9a8abf989b4e..60d21e74a14f 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/check_endpoint_name_availability.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/check_endpoint_name_availability.py @@ -1,15 +1,14 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient """ # PREREQUISITES @@ -26,9 +25,9 @@ def main(): - client = CdnManagementClient( + client = CdnClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.check_endpoint_name_availability( @@ -42,6 +41,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/CheckEndpointNameAvailability.json +# x-ms-original-file: 2025-06-01/CheckEndpointNameAvailability.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/check_name_availability.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/check_name_availability.py index 9efba1012d5c..7b587872b0a8 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/check_name_availability.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/check_name_availability.py @@ -1,15 +1,14 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient """ # PREREQUISITES @@ -26,7 +25,7 @@ def main(): - client = CdnManagementClient( + client = CdnClient( credential=DefaultAzureCredential(), subscription_id="SUBSCRIPTION_ID", ) @@ -37,6 +36,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/CheckNameAvailability.json +# x-ms-original-file: 2025-06-01/CheckNameAvailability.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/check_name_availability_with_subscription.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/check_name_availability_with_subscription.py index fd1d929c030f..6430aeae9634 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/check_name_availability_with_subscription.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/check_name_availability_with_subscription.py @@ -1,15 +1,14 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient """ # PREREQUISITES @@ -26,9 +25,9 @@ def main(): - client = CdnManagementClient( + client = CdnClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.check_name_availability_with_subscription( @@ -37,6 +36,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/CheckNameAvailabilityWithSubscription.json +# x-ms-original-file: 2025-06-01/CheckNameAvailabilityWithSubscription.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/custom_domains_create.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/custom_domains_create.py index d4959c427809..8e9182c729b1 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/custom_domains_create.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/custom_domains_create.py @@ -1,15 +1,14 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient """ # PREREQUISITES @@ -26,9 +25,9 @@ def main(): - client = CdnManagementClient( + client = CdnClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.custom_domains.begin_create( @@ -41,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/CustomDomains_Create.json +# x-ms-original-file: 2025-06-01/CustomDomains_Create.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/custom_domains_delete.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/custom_domains_delete.py index 5322c28aacfc..48e4ef9ddce4 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/custom_domains_delete.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/custom_domains_delete.py @@ -1,15 +1,14 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient """ # PREREQUISITES @@ -26,9 +25,9 @@ def main(): - client = CdnManagementClient( + client = CdnClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.custom_domains.begin_delete( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/CustomDomains_Delete.json +# x-ms-original-file: 2025-06-01/CustomDomains_Delete.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/custom_domains_disable_custom_https.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/custom_domains_disable_custom_https.py index 00f6fabc9efd..803d1507135c 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/custom_domains_disable_custom_https.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/custom_domains_disable_custom_https.py @@ -1,15 +1,14 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient """ # PREREQUISITES @@ -26,9 +25,9 @@ def main(): - client = CdnManagementClient( + client = CdnClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.custom_domains.begin_disable_custom_https( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/CustomDomains_DisableCustomHttps.json +# x-ms-original-file: 2025-06-01/CustomDomains_DisableCustomHttps.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/custom_domains_enable_custom_https_using_byoc.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/custom_domains_enable_custom_https_using_byoc.py index 8acf70264a2f..4b080711c8c8 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/custom_domains_enable_custom_https_using_byoc.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/custom_domains_enable_custom_https_using_byoc.py @@ -1,15 +1,14 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient """ # PREREQUISITES @@ -26,9 +25,9 @@ def main(): - client = CdnManagementClient( + client = CdnClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.custom_domains.begin_enable_custom_https( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/CustomDomains_EnableCustomHttpsUsingBYOC.json +# x-ms-original-file: 2025-06-01/CustomDomains_EnableCustomHttpsUsingBYOC.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/custom_domains_enable_custom_https_using_cdn_managed_certificate.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/custom_domains_enable_custom_https_using_cdn_managed_certificate.py index 243db9cb0120..29655151cbde 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/custom_domains_enable_custom_https_using_cdn_managed_certificate.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/custom_domains_enable_custom_https_using_cdn_managed_certificate.py @@ -1,15 +1,14 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient """ # PREREQUISITES @@ -26,9 +25,9 @@ def main(): - client = CdnManagementClient( + client = CdnClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.custom_domains.begin_enable_custom_https( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/CustomDomains_EnableCustomHttpsUsingCDNManagedCertificate.json +# x-ms-original-file: 2025-06-01/CustomDomains_EnableCustomHttpsUsingCDNManagedCertificate.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/custom_domains_get.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/custom_domains_get.py index a4b50d3f1e52..1fb91c80b501 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/custom_domains_get.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/custom_domains_get.py @@ -2,13 +2,13 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient """ # PREREQUISITES @@ -25,9 +25,9 @@ def main(): - client = CdnManagementClient( + client = CdnClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.custom_domains.get( @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/CustomDomains_Get.json +# x-ms-original-file: 2025-06-01/CustomDomains_Get.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/custom_domains_list_by_endpoint.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/custom_domains_list_by_endpoint.py index e51a7dbbb0b5..42fa0e1422f0 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/custom_domains_list_by_endpoint.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/custom_domains_list_by_endpoint.py @@ -1,15 +1,14 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient """ # PREREQUISITES @@ -26,9 +25,9 @@ def main(): - client = CdnManagementClient( + client = CdnClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.custom_domains.list_by_endpoint( @@ -40,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/CustomDomains_ListByEndpoint.json +# x-ms-original-file: 2025-06-01/CustomDomains_ListByEndpoint.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/edge_nodes_list.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/edge_nodes_list.py index 0cc034739ccb..d78652d04b0c 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/edge_nodes_list.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/edge_nodes_list.py @@ -2,13 +2,13 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient """ # PREREQUISITES @@ -25,7 +25,7 @@ def main(): - client = CdnManagementClient( + client = CdnClient( credential=DefaultAzureCredential(), subscription_id="SUBSCRIPTION_ID", ) @@ -35,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/EdgeNodes_List.json +# x-ms-original-file: 2025-06-01/EdgeNodes_List.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/endpoints_create.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/endpoints_create.py index 605aac0a2453..20aae576791f 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/endpoints_create.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/endpoints_create.py @@ -3,13 +3,13 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient """ # PREREQUISITES @@ -26,9 +26,9 @@ def main(): - client = CdnManagementClient( + client = CdnClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.endpoints.begin_create( @@ -155,6 +155,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/Endpoints_Create.json +# x-ms-original-file: 2025-06-01/Endpoints_Create.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/endpoints_delete.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/endpoints_delete.py index 10ad81899ad1..6d6bc58dba9f 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/endpoints_delete.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/endpoints_delete.py @@ -2,13 +2,13 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient """ # PREREQUISITES @@ -25,9 +25,9 @@ def main(): - client = CdnManagementClient( + client = CdnClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.endpoints.begin_delete( @@ -37,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/Endpoints_Delete.json +# x-ms-original-file: 2025-06-01/Endpoints_Delete.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/endpoints_get.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/endpoints_get.py index 27d87b25a7ec..ff12c0eb6def 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/endpoints_get.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/endpoints_get.py @@ -2,13 +2,13 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient """ # PREREQUISITES @@ -25,9 +25,9 @@ def main(): - client = CdnManagementClient( + client = CdnClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.endpoints.get( @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/Endpoints_Get.json +# x-ms-original-file: 2025-06-01/Endpoints_Get.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/endpoints_list_by_profile.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/endpoints_list_by_profile.py index 8a75d8b6ff0a..0fe40819ec8d 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/endpoints_list_by_profile.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/endpoints_list_by_profile.py @@ -1,15 +1,14 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient """ # PREREQUISITES @@ -26,9 +25,9 @@ def main(): - client = CdnManagementClient( + client = CdnClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.endpoints.list_by_profile( @@ -39,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/Endpoints_ListByProfile.json +# x-ms-original-file: 2025-06-01/Endpoints_ListByProfile.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/endpoints_list_resource_usage.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/endpoints_list_resource_usage.py index 4c56bc010dc2..c81e9017ba95 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/endpoints_list_resource_usage.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/endpoints_list_resource_usage.py @@ -1,15 +1,14 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient """ # PREREQUISITES @@ -26,9 +25,9 @@ def main(): - client = CdnManagementClient( + client = CdnClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.endpoints.list_resource_usage( @@ -40,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/Endpoints_ListResourceUsage.json +# x-ms-original-file: 2025-06-01/Endpoints_ListResourceUsage.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/endpoints_load_content.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/endpoints_load_content.py index 16a03c2547ce..e80921842be6 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/endpoints_load_content.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/endpoints_load_content.py @@ -1,15 +1,14 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient """ # PREREQUISITES @@ -26,9 +25,9 @@ def main(): - client = CdnManagementClient( + client = CdnClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.endpoints.begin_load_content( @@ -39,6 +38,6 @@ def main(): ).result() -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/Endpoints_LoadContent.json +# x-ms-original-file: 2025-06-01/Endpoints_LoadContent.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/endpoints_purge_content.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/endpoints_purge_content.py index 8e3b5ec99613..f8dbce047d85 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/endpoints_purge_content.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/endpoints_purge_content.py @@ -1,15 +1,14 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient """ # PREREQUISITES @@ -26,9 +25,9 @@ def main(): - client = CdnManagementClient( + client = CdnClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.endpoints.begin_purge_content( @@ -39,6 +38,6 @@ def main(): ).result() -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/Endpoints_PurgeContent.json +# x-ms-original-file: 2025-06-01/Endpoints_PurgeContent.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/endpoints_start.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/endpoints_start.py index a7079aa3c913..7d3237d4cbc6 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/endpoints_start.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/endpoints_start.py @@ -2,13 +2,13 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient """ # PREREQUISITES @@ -25,9 +25,9 @@ def main(): - client = CdnManagementClient( + client = CdnClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.endpoints.begin_start( @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/Endpoints_Start.json +# x-ms-original-file: 2025-06-01/Endpoints_Start.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/endpoints_stop.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/endpoints_stop.py index 38427e8f7965..b94afa2c839c 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/endpoints_stop.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/endpoints_stop.py @@ -2,13 +2,13 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient """ # PREREQUISITES @@ -25,9 +25,9 @@ def main(): - client = CdnManagementClient( + client = CdnClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.endpoints.begin_stop( @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/Endpoints_Stop.json +# x-ms-original-file: 2025-06-01/Endpoints_Stop.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/endpoints_update.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/endpoints_update.py index 41b5c5c3adbe..0ee44ce55a41 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/endpoints_update.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/endpoints_update.py @@ -2,13 +2,13 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient """ # PREREQUISITES @@ -25,9 +25,9 @@ def main(): - client = CdnManagementClient( + client = CdnClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.endpoints.begin_update( @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/Endpoints_Update.json +# x-ms-original-file: 2025-06-01/Endpoints_Update.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/endpoints_validate_custom_domain.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/endpoints_validate_custom_domain.py index 5940e854a6e9..478c93061a75 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/endpoints_validate_custom_domain.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/endpoints_validate_custom_domain.py @@ -1,15 +1,14 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient """ # PREREQUISITES @@ -26,9 +25,9 @@ def main(): - client = CdnManagementClient( + client = CdnClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.endpoints.validate_custom_domain( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/Endpoints_ValidateCustomDomain.json +# x-ms-original-file: 2025-06-01/Endpoints_ValidateCustomDomain.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/log_analytics_get_log_analytics_locations.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/log_analytics_get_log_analytics_locations.py index a9ede172ff83..aa002e62a5b7 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/log_analytics_get_log_analytics_locations.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/log_analytics_get_log_analytics_locations.py @@ -1,15 +1,14 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient """ # PREREQUISITES @@ -26,9 +25,9 @@ def main(): - client = CdnManagementClient( + client = CdnClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.log_analytics.get_log_analytics_locations( @@ -38,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/LogAnalytics_GetLogAnalyticsLocations.json +# x-ms-original-file: 2025-06-01/LogAnalytics_GetLogAnalyticsLocations.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/log_analytics_get_log_analytics_metrics.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/log_analytics_get_log_analytics_metrics.py index ba93233e3768..709adb8567c4 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/log_analytics_get_log_analytics_metrics.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/log_analytics_get_log_analytics_metrics.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -11,7 +10,7 @@ from azure.identity import DefaultAzureCredential -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient """ # PREREQUISITES @@ -28,9 +27,9 @@ def main(): - client = CdnManagementClient( + client = CdnClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.log_analytics.get_log_analytics_metrics( @@ -46,6 +45,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/LogAnalytics_GetLogAnalyticsMetrics.json +# x-ms-original-file: 2025-06-01/LogAnalytics_GetLogAnalyticsMetrics.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/log_analytics_get_log_analytics_rankings.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/log_analytics_get_log_analytics_rankings.py index ce8c5e1c23ac..584a4f12f18c 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/log_analytics_get_log_analytics_rankings.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/log_analytics_get_log_analytics_rankings.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -11,7 +10,7 @@ from azure.identity import DefaultAzureCredential -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient """ # PREREQUISITES @@ -28,9 +27,9 @@ def main(): - client = CdnManagementClient( + client = CdnClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.log_analytics.get_log_analytics_rankings( @@ -45,6 +44,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/LogAnalytics_GetLogAnalyticsRankings.json +# x-ms-original-file: 2025-06-01/LogAnalytics_GetLogAnalyticsRankings.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/log_analytics_get_log_analytics_resources.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/log_analytics_get_log_analytics_resources.py index bf9ca81ab1a5..1cfc54855fb6 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/log_analytics_get_log_analytics_resources.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/log_analytics_get_log_analytics_resources.py @@ -1,15 +1,14 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient """ # PREREQUISITES @@ -26,9 +25,9 @@ def main(): - client = CdnManagementClient( + client = CdnClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.log_analytics.get_log_analytics_resources( @@ -38,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/LogAnalytics_GetLogAnalyticsResources.json +# x-ms-original-file: 2025-06-01/LogAnalytics_GetLogAnalyticsResources.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/log_analytics_get_waf_log_analytics_metrics.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/log_analytics_get_waf_log_analytics_metrics.py index 2257efc12710..3d9252bce381 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/log_analytics_get_waf_log_analytics_metrics.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/log_analytics_get_waf_log_analytics_metrics.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -11,7 +10,7 @@ from azure.identity import DefaultAzureCredential -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient """ # PREREQUISITES @@ -28,9 +27,9 @@ def main(): - client = CdnManagementClient( + client = CdnClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.log_analytics.get_waf_log_analytics_metrics( @@ -44,6 +43,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/LogAnalytics_GetWafLogAnalyticsMetrics.json +# x-ms-original-file: 2025-06-01/LogAnalytics_GetWafLogAnalyticsMetrics.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/log_analytics_get_waf_log_analytics_rankings.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/log_analytics_get_waf_log_analytics_rankings.py index 423b09064ce4..99cda5cc6a86 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/log_analytics_get_waf_log_analytics_rankings.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/log_analytics_get_waf_log_analytics_rankings.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -11,7 +10,7 @@ from azure.identity import DefaultAzureCredential -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient """ # PREREQUISITES @@ -28,9 +27,9 @@ def main(): - client = CdnManagementClient( + client = CdnClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.log_analytics.get_waf_log_analytics_rankings( @@ -45,6 +44,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/LogAnalytics_GetWafLogAnalyticsRankings.json +# x-ms-original-file: 2025-06-01/LogAnalytics_GetWafLogAnalyticsRankings.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/operations_list.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/operations_list.py index 3484d5df0616..ecfe08acfc10 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/operations_list.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/operations_list.py @@ -2,13 +2,13 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient """ # PREREQUISITES @@ -25,7 +25,7 @@ def main(): - client = CdnManagementClient( + client = CdnClient( credential=DefaultAzureCredential(), subscription_id="SUBSCRIPTION_ID", ) @@ -35,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/Operations_List.json +# x-ms-original-file: 2025-06-01/Operations_List.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/origin_groups_create.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/origin_groups_create.py index 084525138507..73b6dc4ae7c7 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/origin_groups_create.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/origin_groups_create.py @@ -3,13 +3,13 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient """ # PREREQUISITES @@ -26,9 +26,9 @@ def main(): - client = CdnManagementClient( + client = CdnClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.origin_groups.begin_create( @@ -59,6 +59,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/OriginGroups_Create.json +# x-ms-original-file: 2025-06-01/OriginGroups_Create.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/origin_groups_delete.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/origin_groups_delete.py index ed9f3d27f93b..f7549f7aab1a 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/origin_groups_delete.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/origin_groups_delete.py @@ -1,15 +1,14 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient """ # PREREQUISITES @@ -26,9 +25,9 @@ def main(): - client = CdnManagementClient( + client = CdnClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.origin_groups.begin_delete( @@ -39,6 +38,6 @@ def main(): ).result() -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/OriginGroups_Delete.json +# x-ms-original-file: 2025-06-01/OriginGroups_Delete.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/origin_groups_get.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/origin_groups_get.py index 19d2eaabeb3a..b8b2b3a88f0b 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/origin_groups_get.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/origin_groups_get.py @@ -2,13 +2,13 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient """ # PREREQUISITES @@ -25,9 +25,9 @@ def main(): - client = CdnManagementClient( + client = CdnClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.origin_groups.get( @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/OriginGroups_Get.json +# x-ms-original-file: 2025-06-01/OriginGroups_Get.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/origin_groups_list_by_endpoint.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/origin_groups_list_by_endpoint.py index ea86f8bff275..c5bc63b6509e 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/origin_groups_list_by_endpoint.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/origin_groups_list_by_endpoint.py @@ -1,15 +1,14 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient """ # PREREQUISITES @@ -26,9 +25,9 @@ def main(): - client = CdnManagementClient( + client = CdnClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.origin_groups.list_by_endpoint( @@ -40,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/OriginGroups_ListByEndpoint.json +# x-ms-original-file: 2025-06-01/OriginGroups_ListByEndpoint.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/origin_groups_update.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/origin_groups_update.py index 81b86e4fb3f3..1870d092427e 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/origin_groups_update.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/origin_groups_update.py @@ -3,13 +3,13 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient """ # PREREQUISITES @@ -26,9 +26,9 @@ def main(): - client = CdnManagementClient( + client = CdnClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.origin_groups.begin_update( @@ -55,6 +55,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/OriginGroups_Update.json +# x-ms-original-file: 2025-06-01/OriginGroups_Update.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/origins_create.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/origins_create.py index 3a2536376ad5..7e05e87b5a1a 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/origins_create.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/origins_create.py @@ -3,13 +3,13 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient """ # PREREQUISITES @@ -26,9 +26,9 @@ def main(): - client = CdnManagementClient( + client = CdnClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.origins.begin_create( @@ -54,6 +54,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/Origins_Create.json +# x-ms-original-file: 2025-06-01/Origins_Create.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/origins_delete.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/origins_delete.py index a4fddec72615..b0ffded38c1e 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/origins_delete.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/origins_delete.py @@ -2,13 +2,13 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient """ # PREREQUISITES @@ -25,9 +25,9 @@ def main(): - client = CdnManagementClient( + client = CdnClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.origins.begin_delete( @@ -38,6 +38,6 @@ def main(): ).result() -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/Origins_Delete.json +# x-ms-original-file: 2025-06-01/Origins_Delete.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/origins_get.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/origins_get.py index f285b8d253e7..b918997350e7 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/origins_get.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/origins_get.py @@ -2,13 +2,13 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient """ # PREREQUISITES @@ -25,9 +25,9 @@ def main(): - client = CdnManagementClient( + client = CdnClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.origins.get( @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/Origins_Get.json +# x-ms-original-file: 2025-06-01/Origins_Get.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/origins_list_by_endpoint.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/origins_list_by_endpoint.py index c855bfff599b..d5c29349e914 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/origins_list_by_endpoint.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/origins_list_by_endpoint.py @@ -1,15 +1,14 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient """ # PREREQUISITES @@ -26,9 +25,9 @@ def main(): - client = CdnManagementClient( + client = CdnClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.origins.list_by_endpoint( @@ -40,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/Origins_ListByEndpoint.json +# x-ms-original-file: 2025-06-01/Origins_ListByEndpoint.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/origins_update.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/origins_update.py index 8a930cb7449c..9d6455060c88 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/origins_update.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/origins_update.py @@ -2,13 +2,13 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient """ # PREREQUISITES @@ -25,9 +25,9 @@ def main(): - client = CdnManagementClient( + client = CdnClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.origins.begin_update( @@ -50,6 +50,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/Origins_Update.json +# x-ms-original-file: 2025-06-01/Origins_Update.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/profiles_can_migrate.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/profiles_can_migrate.py index 58dee607611d..c109494ecac6 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/profiles_can_migrate.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/profiles_can_migrate.py @@ -1,15 +1,14 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient """ # PREREQUISITES @@ -26,9 +25,9 @@ def main(): - client = CdnManagementClient( + client = CdnClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.profiles.begin_can_migrate( @@ -42,6 +41,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/Profiles_CanMigrate.json +# x-ms-original-file: 2025-06-01/Profiles_CanMigrate.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/profiles_create.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/profiles_create.py index c94797f0b411..52d79771be59 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/profiles_create.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/profiles_create.py @@ -2,13 +2,13 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient """ # PREREQUISITES @@ -25,9 +25,9 @@ def main(): - client = CdnManagementClient( + client = CdnClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.profiles.begin_create( @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/Profiles_Create.json +# x-ms-original-file: 2025-06-01/Profiles_Create.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/profiles_delete.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/profiles_delete.py index 6cc4bb845edb..34409f7d9b3c 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/profiles_delete.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/profiles_delete.py @@ -2,13 +2,13 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient """ # PREREQUISITES @@ -25,9 +25,9 @@ def main(): - client = CdnManagementClient( + client = CdnClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.profiles.begin_delete( @@ -36,6 +36,6 @@ def main(): ).result() -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/Profiles_Delete.json +# x-ms-original-file: 2025-06-01/Profiles_Delete.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/profiles_generate_sso_uri.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/profiles_generate_sso_uri.py index 637bb8ba8063..d7a50d1f57da 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/profiles_generate_sso_uri.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/profiles_generate_sso_uri.py @@ -1,15 +1,14 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient """ # PREREQUISITES @@ -26,9 +25,9 @@ def main(): - client = CdnManagementClient( + client = CdnClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.profiles.generate_sso_uri( @@ -38,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/Profiles_GenerateSsoUri.json +# x-ms-original-file: 2025-06-01/Profiles_GenerateSsoUri.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/profiles_get.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/profiles_get.py index 7e2faaddb9e5..c316beb53753 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/profiles_get.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/profiles_get.py @@ -2,13 +2,13 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient """ # PREREQUISITES @@ -25,9 +25,9 @@ def main(): - client = CdnManagementClient( + client = CdnClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.profiles.get( @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/Profiles_Get.json +# x-ms-original-file: 2025-06-01/Profiles_Get.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/profiles_list.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/profiles_list.py index 90ffdbaf8c79..9bdd5b25e0d3 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/profiles_list.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/profiles_list.py @@ -2,13 +2,13 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient """ # PREREQUISITES @@ -25,9 +25,9 @@ def main(): - client = CdnManagementClient( + client = CdnClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.profiles.list() @@ -35,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/Profiles_List.json +# x-ms-original-file: 2025-06-01/Profiles_List.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/profiles_list_by_resource_group.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/profiles_list_by_resource_group.py index 205528432ec2..e4ce1d3aa151 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/profiles_list_by_resource_group.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/profiles_list_by_resource_group.py @@ -1,15 +1,14 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient """ # PREREQUISITES @@ -26,9 +25,9 @@ def main(): - client = CdnManagementClient( + client = CdnClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.profiles.list_by_resource_group( @@ -38,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/Profiles_ListByResourceGroup.json +# x-ms-original-file: 2025-06-01/Profiles_ListByResourceGroup.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/profiles_list_resource_usage.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/profiles_list_resource_usage.py index a9002d953c2f..2dd1d0831884 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/profiles_list_resource_usage.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/profiles_list_resource_usage.py @@ -1,15 +1,14 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient """ # PREREQUISITES @@ -26,9 +25,9 @@ def main(): - client = CdnManagementClient( + client = CdnClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.profiles.list_resource_usage( @@ -39,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/Profiles_ListResourceUsage.json +# x-ms-original-file: 2025-06-01/Profiles_ListResourceUsage.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/profiles_list_supported_optimization_types.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/profiles_list_supported_optimization_types.py index 96daa1ce2e91..91759c120183 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/profiles_list_supported_optimization_types.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/profiles_list_supported_optimization_types.py @@ -1,15 +1,14 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient """ # PREREQUISITES @@ -26,9 +25,9 @@ def main(): - client = CdnManagementClient( + client = CdnClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.profiles.list_supported_optimization_types( @@ -38,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/Profiles_ListSupportedOptimizationTypes.json +# x-ms-original-file: 2025-06-01/Profiles_ListSupportedOptimizationTypes.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/profiles_migrate.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/profiles_migrate.py index f95bc09a3bc1..37b70437b4ae 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/profiles_migrate.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/profiles_migrate.py @@ -2,13 +2,13 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient """ # PREREQUISITES @@ -25,9 +25,9 @@ def main(): - client = CdnManagementClient( + client = CdnClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.profiles.begin_migrate( @@ -43,6 +43,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/Profiles_Migrate.json +# x-ms-original-file: 2025-06-01/Profiles_Migrate.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/profiles_migration_abort.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/profiles_migration_abort.py index 23dc3fc366f2..a257265b0f1c 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/profiles_migration_abort.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/profiles_migration_abort.py @@ -1,15 +1,14 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient """ # PREREQUISITES @@ -26,9 +25,9 @@ def main(): - client = CdnManagementClient( + client = CdnClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.profiles.begin_migration_abort( @@ -37,6 +36,6 @@ def main(): ).result() -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/Profiles_MigrationAbort.json +# x-ms-original-file: 2025-06-01/Profiles_MigrationAbort.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/profiles_migration_commit.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/profiles_migration_commit.py index 98803bbbad8e..a6f8f33e2126 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/profiles_migration_commit.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/profiles_migration_commit.py @@ -1,15 +1,14 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient """ # PREREQUISITES @@ -26,9 +25,9 @@ def main(): - client = CdnManagementClient( + client = CdnClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.profiles.begin_migration_commit( @@ -37,6 +36,6 @@ def main(): ).result() -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/Profiles_MigrationCommit.json +# x-ms-original-file: 2025-06-01/Profiles_MigrationCommit.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/profiles_update.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/profiles_update.py index b27d79d3fdb3..a10dd65f892e 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/profiles_update.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/profiles_update.py @@ -2,13 +2,13 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient """ # PREREQUISITES @@ -25,9 +25,9 @@ def main(): - client = CdnManagementClient( + client = CdnClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.profiles.begin_update( @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/Profiles_Update.json +# x-ms-original-file: 2025-06-01/Profiles_Update.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/resource_usage_list.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/resource_usage_list.py index 124ae0a59312..54a42427a53c 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/resource_usage_list.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/resource_usage_list.py @@ -1,15 +1,14 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient """ # PREREQUISITES @@ -26,9 +25,9 @@ def main(): - client = CdnManagementClient( + client = CdnClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.resource_usage.list() @@ -36,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/ResourceUsage_List.json +# x-ms-original-file: 2025-06-01/ResourceUsage_List.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/routes_create.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/routes_create.py index a0cef3f31760..bb9efbd3c6db 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/routes_create.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/routes_create.py @@ -3,13 +3,13 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient """ # PREREQUISITES @@ -26,9 +26,9 @@ def main(): - client = CdnManagementClient( + client = CdnClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.routes.begin_create( @@ -72,6 +72,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/Routes_Create.json +# x-ms-original-file: 2025-06-01/Routes_Create.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/routes_delete.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/routes_delete.py index 716462c41f96..991734df0ca8 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/routes_delete.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/routes_delete.py @@ -2,13 +2,13 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient """ # PREREQUISITES @@ -25,9 +25,9 @@ def main(): - client = CdnManagementClient( + client = CdnClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.routes.begin_delete( @@ -38,6 +38,6 @@ def main(): ).result() -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/Routes_Delete.json +# x-ms-original-file: 2025-06-01/Routes_Delete.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/routes_get.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/routes_get.py index 3deef0cdbb0d..a761d095948c 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/routes_get.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/routes_get.py @@ -2,13 +2,13 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient """ # PREREQUISITES @@ -25,9 +25,9 @@ def main(): - client = CdnManagementClient( + client = CdnClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.routes.get( @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/Routes_Get.json +# x-ms-original-file: 2025-06-01/Routes_Get.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/routes_list_by_endpoint.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/routes_list_by_endpoint.py index 0b807e7ab1d1..62fcbd0b1e48 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/routes_list_by_endpoint.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/routes_list_by_endpoint.py @@ -1,15 +1,14 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient """ # PREREQUISITES @@ -26,9 +25,9 @@ def main(): - client = CdnManagementClient( + client = CdnClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.routes.list_by_endpoint( @@ -40,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/Routes_ListByEndpoint.json +# x-ms-original-file: 2025-06-01/Routes_ListByEndpoint.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/routes_update.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/routes_update.py index 3ea6386cd24a..b61601f940df 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/routes_update.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/routes_update.py @@ -3,13 +3,13 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient """ # PREREQUISITES @@ -26,9 +26,9 @@ def main(): - client = CdnManagementClient( + client = CdnClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.routes.begin_update( @@ -71,6 +71,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/Routes_Update.json +# x-ms-original-file: 2025-06-01/Routes_Update.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/rule_sets_create.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/rule_sets_create.py index c76bfba00ced..20b82c5b77f1 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/rule_sets_create.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/rule_sets_create.py @@ -2,13 +2,13 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient """ # PREREQUISITES @@ -25,9 +25,9 @@ def main(): - client = CdnManagementClient( + client = CdnClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.rule_sets.create( @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/RuleSets_Create.json +# x-ms-original-file: 2025-06-01/RuleSets_Create.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/rule_sets_delete.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/rule_sets_delete.py index e7550e82ce1f..68e9069a9219 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/rule_sets_delete.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/rule_sets_delete.py @@ -2,13 +2,13 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient """ # PREREQUISITES @@ -25,9 +25,9 @@ def main(): - client = CdnManagementClient( + client = CdnClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.rule_sets.begin_delete( @@ -37,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/RuleSets_Delete.json +# x-ms-original-file: 2025-06-01/RuleSets_Delete.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/rule_sets_get.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/rule_sets_get.py index 03d4b54b7a60..914e61de886d 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/rule_sets_get.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/rule_sets_get.py @@ -2,13 +2,13 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient """ # PREREQUISITES @@ -25,9 +25,9 @@ def main(): - client = CdnManagementClient( + client = CdnClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.rule_sets.get( @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/RuleSets_Get.json +# x-ms-original-file: 2025-06-01/RuleSets_Get.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/rule_sets_list_by_profile.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/rule_sets_list_by_profile.py index 4eb8cf1c1ad2..a244e2ca6221 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/rule_sets_list_by_profile.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/rule_sets_list_by_profile.py @@ -1,15 +1,14 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient """ # PREREQUISITES @@ -26,9 +25,9 @@ def main(): - client = CdnManagementClient( + client = CdnClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.rule_sets.list_by_profile( @@ -39,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/RuleSets_ListByProfile.json +# x-ms-original-file: 2025-06-01/RuleSets_ListByProfile.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/rule_sets_list_resource_usage.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/rule_sets_list_resource_usage.py index a4b180e834ac..af40f48b0e37 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/rule_sets_list_resource_usage.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/rule_sets_list_resource_usage.py @@ -1,15 +1,14 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient """ # PREREQUISITES @@ -26,9 +25,9 @@ def main(): - client = CdnManagementClient( + client = CdnClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.rule_sets.list_resource_usage( @@ -40,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/RuleSets_ListResourceUsage.json +# x-ms-original-file: 2025-06-01/RuleSets_ListResourceUsage.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/rules_create.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/rules_create.py index c8aefda93b55..03d4f959a125 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/rules_create.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/rules_create.py @@ -2,13 +2,13 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient """ # PREREQUISITES @@ -25,9 +25,9 @@ def main(): - client = CdnManagementClient( + client = CdnClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.rules.begin_create( @@ -66,6 +66,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/Rules_Create.json +# x-ms-original-file: 2025-06-01/Rules_Create.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/rules_delete.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/rules_delete.py index a6b72b4a3d26..a2462de20138 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/rules_delete.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/rules_delete.py @@ -2,13 +2,13 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient """ # PREREQUISITES @@ -25,9 +25,9 @@ def main(): - client = CdnManagementClient( + client = CdnClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.rules.begin_delete( @@ -38,6 +38,6 @@ def main(): ).result() -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/Rules_Delete.json +# x-ms-original-file: 2025-06-01/Rules_Delete.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/rules_get.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/rules_get.py index 56abf04fb0dc..7fc36af78553 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/rules_get.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/rules_get.py @@ -2,13 +2,13 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient """ # PREREQUISITES @@ -25,9 +25,9 @@ def main(): - client = CdnManagementClient( + client = CdnClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.rules.get( @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/Rules_Get.json +# x-ms-original-file: 2025-06-01/Rules_Get.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/rules_list_by_rule_set.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/rules_list_by_rule_set.py index b05afa9a1b12..7fbb631fb158 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/rules_list_by_rule_set.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/rules_list_by_rule_set.py @@ -1,15 +1,14 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient """ # PREREQUISITES @@ -26,9 +25,9 @@ def main(): - client = CdnManagementClient( + client = CdnClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.rules.list_by_rule_set( @@ -40,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/Rules_ListByRuleSet.json +# x-ms-original-file: 2025-06-01/Rules_ListByRuleSet.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/rules_update.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/rules_update.py index 0cf34d248f1b..389163f08962 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/rules_update.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/rules_update.py @@ -2,13 +2,13 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient """ # PREREQUISITES @@ -25,9 +25,9 @@ def main(): - client = CdnManagementClient( + client = CdnClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.rules.begin_update( @@ -55,6 +55,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/Rules_Update.json +# x-ms-original-file: 2025-06-01/Rules_Update.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/secrets_create.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/secrets_create.py index 8eb78497c0a9..3aad09090842 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/secrets_create.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/secrets_create.py @@ -3,13 +3,13 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient """ # PREREQUISITES @@ -26,9 +26,9 @@ def main(): - client = CdnManagementClient( + client = CdnClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.secrets.begin_create( @@ -51,6 +51,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/Secrets_Create.json +# x-ms-original-file: 2025-06-01/Secrets_Create.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/secrets_delete.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/secrets_delete.py index ada36628b632..34492a03cabd 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/secrets_delete.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/secrets_delete.py @@ -2,13 +2,13 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient """ # PREREQUISITES @@ -25,9 +25,9 @@ def main(): - client = CdnManagementClient( + client = CdnClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.secrets.begin_delete( @@ -37,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/Secrets_Delete.json +# x-ms-original-file: 2025-06-01/Secrets_Delete.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/secrets_get.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/secrets_get.py index 937b8354f6a7..dcb6d17db63b 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/secrets_get.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/secrets_get.py @@ -2,13 +2,13 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient """ # PREREQUISITES @@ -25,9 +25,9 @@ def main(): - client = CdnManagementClient( + client = CdnClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.secrets.get( @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/Secrets_Get.json +# x-ms-original-file: 2025-06-01/Secrets_Get.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/secrets_list_by_profile.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/secrets_list_by_profile.py index 177e91c8e916..a0ab9277511e 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/secrets_list_by_profile.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/secrets_list_by_profile.py @@ -1,15 +1,14 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient """ # PREREQUISITES @@ -26,9 +25,9 @@ def main(): - client = CdnManagementClient( + client = CdnClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.secrets.list_by_profile( @@ -39,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/Secrets_ListByProfile.json +# x-ms-original-file: 2025-06-01/Secrets_ListByProfile.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/security_policies_create.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/security_policies_create.py index 7a8aa5bc3f29..5ab9f3190ce2 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/security_policies_create.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/security_policies_create.py @@ -3,13 +3,13 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient """ # PREREQUISITES @@ -26,9 +26,9 @@ def main(): - client = CdnManagementClient( + client = CdnClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.security_policies.begin_create( @@ -62,6 +62,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/SecurityPolicies_Create.json +# x-ms-original-file: 2025-06-01/SecurityPolicies_Create.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/security_policies_delete.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/security_policies_delete.py index e7ff48ba7e67..c87098dd9c06 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/security_policies_delete.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/security_policies_delete.py @@ -1,15 +1,14 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient """ # PREREQUISITES @@ -26,9 +25,9 @@ def main(): - client = CdnManagementClient( + client = CdnClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.security_policies.begin_delete( @@ -38,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/SecurityPolicies_Delete.json +# x-ms-original-file: 2025-06-01/SecurityPolicies_Delete.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/security_policies_get.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/security_policies_get.py index c0e8d5ccd54b..68a89c54803f 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/security_policies_get.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/security_policies_get.py @@ -1,15 +1,14 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient """ # PREREQUISITES @@ -26,9 +25,9 @@ def main(): - client = CdnManagementClient( + client = CdnClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.security_policies.get( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/SecurityPolicies_Get.json +# x-ms-original-file: 2025-06-01/SecurityPolicies_Get.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/security_policies_list_by_profile.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/security_policies_list_by_profile.py index 0ba36f8d7ec6..23d5ce2e8738 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/security_policies_list_by_profile.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/security_policies_list_by_profile.py @@ -1,15 +1,14 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient """ # PREREQUISITES @@ -26,9 +25,9 @@ def main(): - client = CdnManagementClient( + client = CdnClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.security_policies.list_by_profile( @@ -39,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/SecurityPolicies_ListByProfile.json +# x-ms-original-file: 2025-06-01/SecurityPolicies_ListByProfile.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/security_policies_patch.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/security_policies_patch.py index f8f3f72f41c5..ce112cab1032 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/security_policies_patch.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/security_policies_patch.py @@ -3,13 +3,13 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient """ # PREREQUISITES @@ -26,9 +26,9 @@ def main(): - client = CdnManagementClient( + client = CdnClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.security_policies.begin_patch( @@ -62,6 +62,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/SecurityPolicies_Patch.json +# x-ms-original-file: 2025-06-01/SecurityPolicies_Patch.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/validate_probe.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/validate_probe.py index aa3d1ac6047c..a8cc33f57e31 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/validate_probe.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/validate_probe.py @@ -2,13 +2,13 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient """ # PREREQUISITES @@ -25,9 +25,9 @@ def main(): - client = CdnManagementClient( + client = CdnClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.validate_probe( @@ -36,6 +36,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/ValidateProbe.json +# x-ms-original-file: 2025-06-01/ValidateProbe.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/waf_list_managed_rule_sets.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/waf_list_managed_rule_sets.py index 9a39a5d28e5a..1d7db0565aa5 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/waf_list_managed_rule_sets.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/waf_list_managed_rule_sets.py @@ -1,15 +1,14 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient """ # PREREQUISITES @@ -26,9 +25,9 @@ def main(): - client = CdnManagementClient( + client = CdnClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.managed_rule_sets.list() @@ -36,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/WafListManagedRuleSets.json +# x-ms-original-file: 2025-06-01/WafListManagedRuleSets.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/waf_list_policies.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/waf_list_policies.py index 5292d6e933c9..5a0c8e905326 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/waf_list_policies.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/waf_list_policies.py @@ -2,13 +2,13 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient """ # PREREQUISITES @@ -25,9 +25,9 @@ def main(): - client = CdnManagementClient( + client = CdnClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.policies.list( @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/WafListPolicies.json +# x-ms-original-file: 2025-06-01/WafListPolicies.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/waf_patch_policy.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/waf_patch_policy.py index ba96a0c55f43..41850a9c936e 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/waf_patch_policy.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/waf_patch_policy.py @@ -2,13 +2,13 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient """ # PREREQUISITES @@ -25,9 +25,9 @@ def main(): - client = CdnManagementClient( + client = CdnClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.policies.begin_update( @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/WafPatchPolicy.json +# x-ms-original-file: 2025-06-01/WafPatchPolicy.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/waf_policy_create_or_update.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/waf_policy_create_or_update.py index 8c9bd2a420c4..f73cefbbfb54 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/waf_policy_create_or_update.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/waf_policy_create_or_update.py @@ -3,13 +3,13 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient """ # PREREQUISITES @@ -26,9 +26,9 @@ def main(): - client = CdnManagementClient( + client = CdnClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.policies.begin_create_or_update( @@ -124,6 +124,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/WafPolicyCreateOrUpdate.json +# x-ms-original-file: 2025-06-01/WafPolicyCreateOrUpdate.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/waf_policy_delete.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/waf_policy_delete.py index 16eda5ae27a7..8511859bf654 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/waf_policy_delete.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/waf_policy_delete.py @@ -2,13 +2,13 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient """ # PREREQUISITES @@ -25,9 +25,9 @@ def main(): - client = CdnManagementClient( + client = CdnClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) client.policies.delete( @@ -36,6 +36,6 @@ def main(): ) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/WafPolicyDelete.json +# x-ms-original-file: 2025-06-01/WafPolicyDelete.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_samples/waf_policy_get.py b/sdk/cdn/azure-mgmt-cdn/generated_samples/waf_policy_get.py index d0ff173f8b30..e44a5df12b2b 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_samples/waf_policy_get.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_samples/waf_policy_get.py @@ -2,13 +2,13 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient """ # PREREQUISITES @@ -25,9 +25,9 @@ def main(): - client = CdnManagementClient( + client = CdnClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="SUBSCRIPTION_ID", ) response = client.policies.get( @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-06-01/examples/WafPolicyGet.json +# x-ms-original-file: 2025-06-01/WafPolicyGet.json if __name__ == "__main__": main() diff --git a/sdk/cdn/azure-mgmt-cdn/generated_tests/conftest.py b/sdk/cdn/azure-mgmt-cdn/generated_tests/conftest.py index 02cbe090acc4..a5ac369e0d7f 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_tests/conftest.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_tests/conftest.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import os @@ -21,14 +21,14 @@ # For security, please avoid record sensitive identity information in recordings @pytest.fixture(scope="session", autouse=True) def add_sanitizers(test_proxy): - cdnmanagement_subscription_id = os.environ.get("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") - cdnmanagement_tenant_id = os.environ.get("AZURE_TENANT_ID", "00000000-0000-0000-0000-000000000000") - cdnmanagement_client_id = os.environ.get("AZURE_CLIENT_ID", "00000000-0000-0000-0000-000000000000") - cdnmanagement_client_secret = os.environ.get("AZURE_CLIENT_SECRET", "00000000-0000-0000-0000-000000000000") - add_general_regex_sanitizer(regex=cdnmanagement_subscription_id, value="00000000-0000-0000-0000-000000000000") - add_general_regex_sanitizer(regex=cdnmanagement_tenant_id, value="00000000-0000-0000-0000-000000000000") - add_general_regex_sanitizer(regex=cdnmanagement_client_id, value="00000000-0000-0000-0000-000000000000") - add_general_regex_sanitizer(regex=cdnmanagement_client_secret, value="00000000-0000-0000-0000-000000000000") + cdn_subscription_id = os.environ.get("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") + cdn_tenant_id = os.environ.get("AZURE_TENANT_ID", "00000000-0000-0000-0000-000000000000") + cdn_client_id = os.environ.get("AZURE_CLIENT_ID", "00000000-0000-0000-0000-000000000000") + cdn_client_secret = os.environ.get("AZURE_CLIENT_SECRET", "00000000-0000-0000-0000-000000000000") + add_general_regex_sanitizer(regex=cdn_subscription_id, value="00000000-0000-0000-0000-000000000000") + add_general_regex_sanitizer(regex=cdn_tenant_id, value="00000000-0000-0000-0000-000000000000") + add_general_regex_sanitizer(regex=cdn_client_id, value="00000000-0000-0000-0000-000000000000") + add_general_regex_sanitizer(regex=cdn_client_secret, value="00000000-0000-0000-0000-000000000000") add_header_regex_sanitizer(key="Set-Cookie", value="[set-cookie;]") add_header_regex_sanitizer(key="Cookie", value="cookie;") diff --git a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management.py b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn.py similarity index 85% rename from sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management.py rename to sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn.py index 789925061cb5..41c5810f2e10 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn.py @@ -2,11 +2,11 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy @@ -14,9 +14,9 @@ @pytest.mark.skip("you may need to update the auto-generated test case before run it") -class TestCdnManagement(AzureMgmtRecordedTestCase): +class TestCdn(AzureMgmtRecordedTestCase): def setup_method(self, method): - self.client = self.create_mgmt_client(CdnManagementClient) + self.client = self.create_mgmt_client(CdnClient) @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy @@ -28,7 +28,6 @@ def test_check_endpoint_name_availability(self, resource_group): "type": "str", "autoGeneratedDomainNameLabelScope": "str", }, - api_version="2025-06-01", ) # please add some check logic here by yourself @@ -39,7 +38,6 @@ def test_check_endpoint_name_availability(self, resource_group): def test_check_name_availability(self, resource_group): response = self.client.check_name_availability( check_name_availability_input={"name": "str", "type": "str"}, - api_version="2025-06-01", ) # please add some check logic here by yourself @@ -50,7 +48,6 @@ def test_check_name_availability(self, resource_group): def test_check_name_availability_with_subscription(self, resource_group): response = self.client.check_name_availability_with_subscription( check_name_availability_input={"name": "str", "type": "str"}, - api_version="2025-06-01", ) # please add some check logic here by yourself @@ -61,7 +58,6 @@ def test_check_name_availability_with_subscription(self, resource_group): def test_validate_probe(self, resource_group): response = self.client.validate_probe( validate_probe_input={"probeURL": "str"}, - api_version="2025-06-01", ) # please add some check logic here by yourself diff --git a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_afd_custom_domains_operations.py b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_afd_custom_domains_operations.py similarity index 68% rename from sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_afd_custom_domains_operations.py rename to sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_afd_custom_domains_operations.py index 3c14ccc638b6..ceb2208733ec 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_afd_custom_domains_operations.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_afd_custom_domains_operations.py @@ -2,11 +2,11 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy @@ -14,21 +14,9 @@ @pytest.mark.skip("you may need to update the auto-generated test case before run it") -class TestCdnManagementAFDCustomDomainsOperations(AzureMgmtRecordedTestCase): +class TestCdnAFDCustomDomainsOperations(AzureMgmtRecordedTestCase): def setup_method(self, method): - self.client = self.create_mgmt_client(CdnManagementClient) - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_afd_custom_domains_list_by_profile(self, resource_group): - response = self.client.afd_custom_domains.list_by_profile( - resource_group_name=resource_group.name, - profile_name="str", - api_version="2025-06-01", - ) - result = [r for r in response] - # please add some check logic here by yourself - # ... + self.client = self.create_mgmt_client(CdnClient) @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy @@ -37,7 +25,6 @@ def test_afd_custom_domains_get(self, resource_group): resource_group_name=resource_group.name, profile_name="str", custom_domain_name="str", - api_version="2025-06-01", ) # please add some check logic here by yourself @@ -51,16 +38,29 @@ def test_afd_custom_domains_begin_create(self, resource_group): profile_name="str", custom_domain_name="str", custom_domain={ - "azureDnsZone": {"id": "str"}, - "deploymentStatus": "str", - "domainValidationState": "str", - "extendedProperties": {"str": "str"}, - "hostName": "str", "id": "str", "name": "str", - "preValidatedCustomDomainResourceId": {"id": "str"}, - "profileName": "str", - "provisioningState": "str", + "properties": { + "hostName": "str", + "azureDnsZone": {"id": "str"}, + "deploymentStatus": "str", + "domainValidationState": "str", + "extendedProperties": {"str": "str"}, + "preValidatedCustomDomainResourceId": {"id": "str"}, + "profileName": "str", + "provisioningState": "str", + "tlsSettings": { + "certificateType": "str", + "cipherSuiteSetType": "str", + "customizedCipherSuiteSet": { + "cipherSuiteSetForTls12": ["str"], + "cipherSuiteSetForTls13": ["str"], + }, + "minimumTlsVersion": "str", + "secret": {"id": "str"}, + }, + "validationProperties": {"expirationDate": "str", "validationToken": "str"}, + }, "systemData": { "createdAt": "2020-02-20 00:00:00", "createdBy": "str", @@ -69,17 +69,8 @@ def test_afd_custom_domains_begin_create(self, resource_group): "lastModifiedBy": "str", "lastModifiedByType": "str", }, - "tlsSettings": { - "certificateType": "str", - "cipherSuiteSetType": "str", - "customizedCipherSuiteSet": {"cipherSuiteSetForTls12": ["str"], "cipherSuiteSetForTls13": ["str"]}, - "minimumTlsVersion": "str", - "secret": {"id": "str"}, - }, "type": "str", - "validationProperties": {"expirationDate": "str", "validationToken": "str"}, }, - api_version="2025-06-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -93,18 +84,22 @@ def test_afd_custom_domains_begin_update(self, resource_group): profile_name="str", custom_domain_name="str", custom_domain_update_properties={ - "azureDnsZone": {"id": "str"}, - "preValidatedCustomDomainResourceId": {"id": "str"}, - "profileName": "str", - "tlsSettings": { - "certificateType": "str", - "cipherSuiteSetType": "str", - "customizedCipherSuiteSet": {"cipherSuiteSetForTls12": ["str"], "cipherSuiteSetForTls13": ["str"]}, - "minimumTlsVersion": "str", - "secret": {"id": "str"}, - }, + "properties": { + "azureDnsZone": {"id": "str"}, + "preValidatedCustomDomainResourceId": {"id": "str"}, + "profileName": "str", + "tlsSettings": { + "certificateType": "str", + "cipherSuiteSetType": "str", + "customizedCipherSuiteSet": { + "cipherSuiteSetForTls12": ["str"], + "cipherSuiteSetForTls13": ["str"], + }, + "minimumTlsVersion": "str", + "secret": {"id": "str"}, + }, + } }, - api_version="2025-06-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -117,12 +112,22 @@ def test_afd_custom_domains_begin_delete(self, resource_group): resource_group_name=resource_group.name, profile_name="str", custom_domain_name="str", - api_version="2025-06-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_afd_custom_domains_list_by_profile(self, resource_group): + response = self.client.afd_custom_domains.list_by_profile( + resource_group_name=resource_group.name, + profile_name="str", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_afd_custom_domains_begin_refresh_validation_token(self, resource_group): @@ -130,7 +135,6 @@ def test_afd_custom_domains_begin_refresh_validation_token(self, resource_group) resource_group_name=resource_group.name, profile_name="str", custom_domain_name="str", - api_version="2025-06-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself diff --git a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_afd_custom_domains_operations_async.py b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_afd_custom_domains_operations_async.py similarity index 68% rename from sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_afd_custom_domains_operations_async.py rename to sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_afd_custom_domains_operations_async.py index 49a329d1118e..d67dc9cf12c8 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_afd_custom_domains_operations_async.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_afd_custom_domains_operations_async.py @@ -2,11 +2,11 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest -from azure.mgmt.cdn.aio import CdnManagementClient +from azure.mgmt.cdn.aio import CdnClient from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer from devtools_testutils.aio import recorded_by_proxy_async @@ -15,21 +15,9 @@ @pytest.mark.skip("you may need to update the auto-generated test case before run it") -class TestCdnManagementAFDCustomDomainsOperationsAsync(AzureMgmtRecordedTestCase): +class TestCdnAFDCustomDomainsOperationsAsync(AzureMgmtRecordedTestCase): def setup_method(self, method): - self.client = self.create_mgmt_client(CdnManagementClient, is_async=True) - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_afd_custom_domains_list_by_profile(self, resource_group): - response = self.client.afd_custom_domains.list_by_profile( - resource_group_name=resource_group.name, - profile_name="str", - api_version="2025-06-01", - ) - result = [r async for r in response] - # please add some check logic here by yourself - # ... + self.client = self.create_mgmt_client(CdnClient, is_async=True) @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async @@ -38,7 +26,6 @@ async def test_afd_custom_domains_get(self, resource_group): resource_group_name=resource_group.name, profile_name="str", custom_domain_name="str", - api_version="2025-06-01", ) # please add some check logic here by yourself @@ -53,16 +40,29 @@ async def test_afd_custom_domains_begin_create(self, resource_group): profile_name="str", custom_domain_name="str", custom_domain={ - "azureDnsZone": {"id": "str"}, - "deploymentStatus": "str", - "domainValidationState": "str", - "extendedProperties": {"str": "str"}, - "hostName": "str", "id": "str", "name": "str", - "preValidatedCustomDomainResourceId": {"id": "str"}, - "profileName": "str", - "provisioningState": "str", + "properties": { + "hostName": "str", + "azureDnsZone": {"id": "str"}, + "deploymentStatus": "str", + "domainValidationState": "str", + "extendedProperties": {"str": "str"}, + "preValidatedCustomDomainResourceId": {"id": "str"}, + "profileName": "str", + "provisioningState": "str", + "tlsSettings": { + "certificateType": "str", + "cipherSuiteSetType": "str", + "customizedCipherSuiteSet": { + "cipherSuiteSetForTls12": ["str"], + "cipherSuiteSetForTls13": ["str"], + }, + "minimumTlsVersion": "str", + "secret": {"id": "str"}, + }, + "validationProperties": {"expirationDate": "str", "validationToken": "str"}, + }, "systemData": { "createdAt": "2020-02-20 00:00:00", "createdBy": "str", @@ -71,20 +71,8 @@ async def test_afd_custom_domains_begin_create(self, resource_group): "lastModifiedBy": "str", "lastModifiedByType": "str", }, - "tlsSettings": { - "certificateType": "str", - "cipherSuiteSetType": "str", - "customizedCipherSuiteSet": { - "cipherSuiteSetForTls12": ["str"], - "cipherSuiteSetForTls13": ["str"], - }, - "minimumTlsVersion": "str", - "secret": {"id": "str"}, - }, "type": "str", - "validationProperties": {"expirationDate": "str", "validationToken": "str"}, }, - api_version="2025-06-01", ) ).result() # call '.result()' to poll until service return final result @@ -100,21 +88,22 @@ async def test_afd_custom_domains_begin_update(self, resource_group): profile_name="str", custom_domain_name="str", custom_domain_update_properties={ - "azureDnsZone": {"id": "str"}, - "preValidatedCustomDomainResourceId": {"id": "str"}, - "profileName": "str", - "tlsSettings": { - "certificateType": "str", - "cipherSuiteSetType": "str", - "customizedCipherSuiteSet": { - "cipherSuiteSetForTls12": ["str"], - "cipherSuiteSetForTls13": ["str"], + "properties": { + "azureDnsZone": {"id": "str"}, + "preValidatedCustomDomainResourceId": {"id": "str"}, + "profileName": "str", + "tlsSettings": { + "certificateType": "str", + "cipherSuiteSetType": "str", + "customizedCipherSuiteSet": { + "cipherSuiteSetForTls12": ["str"], + "cipherSuiteSetForTls13": ["str"], + }, + "minimumTlsVersion": "str", + "secret": {"id": "str"}, }, - "minimumTlsVersion": "str", - "secret": {"id": "str"}, - }, + } }, - api_version="2025-06-01", ) ).result() # call '.result()' to poll until service return final result @@ -129,13 +118,23 @@ async def test_afd_custom_domains_begin_delete(self, resource_group): resource_group_name=resource_group.name, profile_name="str", custom_domain_name="str", - api_version="2025-06-01", ) ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_afd_custom_domains_list_by_profile(self, resource_group): + response = self.client.afd_custom_domains.list_by_profile( + resource_group_name=resource_group.name, + profile_name="str", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_afd_custom_domains_begin_refresh_validation_token(self, resource_group): @@ -144,7 +143,6 @@ async def test_afd_custom_domains_begin_refresh_validation_token(self, resource_ resource_group_name=resource_group.name, profile_name="str", custom_domain_name="str", - api_version="2025-06-01", ) ).result() # call '.result()' to poll until service return final result diff --git a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_afd_endpoints_operations.py b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_afd_endpoints_operations.py similarity index 84% rename from sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_afd_endpoints_operations.py rename to sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_afd_endpoints_operations.py index e1a6af0617bc..82d007274612 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_afd_endpoints_operations.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_afd_endpoints_operations.py @@ -2,11 +2,11 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy @@ -14,21 +14,9 @@ @pytest.mark.skip("you may need to update the auto-generated test case before run it") -class TestCdnManagementAFDEndpointsOperations(AzureMgmtRecordedTestCase): +class TestCdnAFDEndpointsOperations(AzureMgmtRecordedTestCase): def setup_method(self, method): - self.client = self.create_mgmt_client(CdnManagementClient) - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_afd_endpoints_list_by_profile(self, resource_group): - response = self.client.afd_endpoints.list_by_profile( - resource_group_name=resource_group.name, - profile_name="str", - api_version="2025-06-01", - ) - result = [r for r in response] - # please add some check logic here by yourself - # ... + self.client = self.create_mgmt_client(CdnClient) @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy @@ -37,7 +25,6 @@ def test_afd_endpoints_get(self, resource_group): resource_group_name=resource_group.name, profile_name="str", endpoint_name="str", - api_version="2025-06-01", ) # please add some check logic here by yourself @@ -52,14 +39,16 @@ def test_afd_endpoints_begin_create(self, resource_group): endpoint_name="str", endpoint={ "location": "str", - "autoGeneratedDomainNameLabelScope": "str", - "deploymentStatus": "str", - "enabledState": "str", - "hostName": "str", "id": "str", "name": "str", - "profileName": "str", - "provisioningState": "str", + "properties": { + "autoGeneratedDomainNameLabelScope": "str", + "deploymentStatus": "str", + "enabledState": "str", + "hostName": "str", + "profileName": "str", + "provisioningState": "str", + }, "systemData": { "createdAt": "2020-02-20 00:00:00", "createdBy": "str", @@ -71,7 +60,6 @@ def test_afd_endpoints_begin_create(self, resource_group): "tags": {"str": "str"}, "type": "str", }, - api_version="2025-06-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -84,8 +72,10 @@ def test_afd_endpoints_begin_update(self, resource_group): resource_group_name=resource_group.name, profile_name="str", endpoint_name="str", - endpoint_update_properties={"enabledState": "str", "profileName": "str", "tags": {"str": "str"}}, - api_version="2025-06-01", + endpoint_update_properties={ + "properties": {"enabledState": "str", "profileName": "str"}, + "tags": {"str": "str"}, + }, ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -98,12 +88,22 @@ def test_afd_endpoints_begin_delete(self, resource_group): resource_group_name=resource_group.name, profile_name="str", endpoint_name="str", - api_version="2025-06-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_afd_endpoints_list_by_profile(self, resource_group): + response = self.client.afd_endpoints.list_by_profile( + resource_group_name=resource_group.name, + profile_name="str", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_afd_endpoints_begin_purge_content(self, resource_group): @@ -112,7 +112,6 @@ def test_afd_endpoints_begin_purge_content(self, resource_group): profile_name="str", endpoint_name="str", contents={"contentPaths": ["str"], "domains": ["str"]}, - api_version="2025-06-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -125,7 +124,6 @@ def test_afd_endpoints_list_resource_usage(self, resource_group): resource_group_name=resource_group.name, profile_name="str", endpoint_name="str", - api_version="2025-06-01", ) result = [r for r in response] # please add some check logic here by yourself @@ -139,7 +137,6 @@ def test_afd_endpoints_validate_custom_domain(self, resource_group): profile_name="str", endpoint_name="str", custom_domain_properties={"hostName": "str"}, - api_version="2025-06-01", ) # please add some check logic here by yourself diff --git a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_afd_endpoints_operations_async.py b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_afd_endpoints_operations_async.py similarity index 84% rename from sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_afd_endpoints_operations_async.py rename to sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_afd_endpoints_operations_async.py index 0a3c18c56d6e..d0ba2f1e9072 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_afd_endpoints_operations_async.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_afd_endpoints_operations_async.py @@ -2,11 +2,11 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest -from azure.mgmt.cdn.aio import CdnManagementClient +from azure.mgmt.cdn.aio import CdnClient from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer from devtools_testutils.aio import recorded_by_proxy_async @@ -15,21 +15,9 @@ @pytest.mark.skip("you may need to update the auto-generated test case before run it") -class TestCdnManagementAFDEndpointsOperationsAsync(AzureMgmtRecordedTestCase): +class TestCdnAFDEndpointsOperationsAsync(AzureMgmtRecordedTestCase): def setup_method(self, method): - self.client = self.create_mgmt_client(CdnManagementClient, is_async=True) - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_afd_endpoints_list_by_profile(self, resource_group): - response = self.client.afd_endpoints.list_by_profile( - resource_group_name=resource_group.name, - profile_name="str", - api_version="2025-06-01", - ) - result = [r async for r in response] - # please add some check logic here by yourself - # ... + self.client = self.create_mgmt_client(CdnClient, is_async=True) @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async @@ -38,7 +26,6 @@ async def test_afd_endpoints_get(self, resource_group): resource_group_name=resource_group.name, profile_name="str", endpoint_name="str", - api_version="2025-06-01", ) # please add some check logic here by yourself @@ -54,14 +41,16 @@ async def test_afd_endpoints_begin_create(self, resource_group): endpoint_name="str", endpoint={ "location": "str", - "autoGeneratedDomainNameLabelScope": "str", - "deploymentStatus": "str", - "enabledState": "str", - "hostName": "str", "id": "str", "name": "str", - "profileName": "str", - "provisioningState": "str", + "properties": { + "autoGeneratedDomainNameLabelScope": "str", + "deploymentStatus": "str", + "enabledState": "str", + "hostName": "str", + "profileName": "str", + "provisioningState": "str", + }, "systemData": { "createdAt": "2020-02-20 00:00:00", "createdBy": "str", @@ -73,7 +62,6 @@ async def test_afd_endpoints_begin_create(self, resource_group): "tags": {"str": "str"}, "type": "str", }, - api_version="2025-06-01", ) ).result() # call '.result()' to poll until service return final result @@ -88,8 +76,10 @@ async def test_afd_endpoints_begin_update(self, resource_group): resource_group_name=resource_group.name, profile_name="str", endpoint_name="str", - endpoint_update_properties={"enabledState": "str", "profileName": "str", "tags": {"str": "str"}}, - api_version="2025-06-01", + endpoint_update_properties={ + "properties": {"enabledState": "str", "profileName": "str"}, + "tags": {"str": "str"}, + }, ) ).result() # call '.result()' to poll until service return final result @@ -104,13 +94,23 @@ async def test_afd_endpoints_begin_delete(self, resource_group): resource_group_name=resource_group.name, profile_name="str", endpoint_name="str", - api_version="2025-06-01", ) ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_afd_endpoints_list_by_profile(self, resource_group): + response = self.client.afd_endpoints.list_by_profile( + resource_group_name=resource_group.name, + profile_name="str", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_afd_endpoints_begin_purge_content(self, resource_group): @@ -120,7 +120,6 @@ async def test_afd_endpoints_begin_purge_content(self, resource_group): profile_name="str", endpoint_name="str", contents={"contentPaths": ["str"], "domains": ["str"]}, - api_version="2025-06-01", ) ).result() # call '.result()' to poll until service return final result @@ -134,7 +133,6 @@ async def test_afd_endpoints_list_resource_usage(self, resource_group): resource_group_name=resource_group.name, profile_name="str", endpoint_name="str", - api_version="2025-06-01", ) result = [r async for r in response] # please add some check logic here by yourself @@ -148,7 +146,6 @@ async def test_afd_endpoints_validate_custom_domain(self, resource_group): profile_name="str", endpoint_name="str", custom_domain_properties={"hostName": "str"}, - api_version="2025-06-01", ) # please add some check logic here by yourself diff --git a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_afd_origin_groups_operations.py b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_afd_origin_groups_operations.py similarity index 66% rename from sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_afd_origin_groups_operations.py rename to sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_afd_origin_groups_operations.py index 95cb08f23f3e..0e2c28431e3d 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_afd_origin_groups_operations.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_afd_origin_groups_operations.py @@ -2,11 +2,11 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy @@ -14,21 +14,9 @@ @pytest.mark.skip("you may need to update the auto-generated test case before run it") -class TestCdnManagementAFDOriginGroupsOperations(AzureMgmtRecordedTestCase): +class TestCdnAFDOriginGroupsOperations(AzureMgmtRecordedTestCase): def setup_method(self, method): - self.client = self.create_mgmt_client(CdnManagementClient) - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_afd_origin_groups_list_by_profile(self, resource_group): - response = self.client.afd_origin_groups.list_by_profile( - resource_group_name=resource_group.name, - profile_name="str", - api_version="2025-06-01", - ) - result = [r for r in response] - # please add some check logic here by yourself - # ... + self.client = self.create_mgmt_client(CdnClient) @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy @@ -37,7 +25,6 @@ def test_afd_origin_groups_get(self, resource_group): resource_group_name=resource_group.name, profile_name="str", origin_group_name="str", - api_version="2025-06-01", ) # please add some check logic here by yourself @@ -51,24 +38,27 @@ def test_afd_origin_groups_begin_create(self, resource_group): profile_name="str", origin_group_name="str", origin_group={ - "authentication": {"scope": "str", "type": "str", "userAssignedIdentity": {"id": "str"}}, - "deploymentStatus": "str", - "healthProbeSettings": { - "probeIntervalInSeconds": 0, - "probePath": "str", - "probeProtocol": "str", - "probeRequestType": "str", - }, "id": "str", - "loadBalancingSettings": { - "additionalLatencyInMilliseconds": 0, - "sampleSize": 0, - "successfulSamplesRequired": 0, - }, "name": "str", - "profileName": "str", - "provisioningState": "str", - "sessionAffinityState": "str", + "properties": { + "authentication": {"scope": "str", "type": "str", "userAssignedIdentity": {"id": "str"}}, + "deploymentStatus": "str", + "healthProbeSettings": { + "probeIntervalInSeconds": 0, + "probePath": "str", + "probeProtocol": "str", + "probeRequestType": "str", + }, + "loadBalancingSettings": { + "additionalLatencyInMilliseconds": 0, + "sampleSize": 0, + "successfulSamplesRequired": 0, + }, + "profileName": "str", + "provisioningState": "str", + "sessionAffinityState": "str", + "trafficRestorationTimeToHealedOrNewEndpointsInMinutes": 0, + }, "systemData": { "createdAt": "2020-02-20 00:00:00", "createdBy": "str", @@ -77,10 +67,8 @@ def test_afd_origin_groups_begin_create(self, resource_group): "lastModifiedBy": "str", "lastModifiedByType": "str", }, - "trafficRestorationTimeToHealedOrNewEndpointsInMinutes": 0, "type": "str", }, - api_version="2025-06-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -94,23 +82,24 @@ def test_afd_origin_groups_begin_update(self, resource_group): profile_name="str", origin_group_name="str", origin_group_update_properties={ - "authentication": {"scope": "str", "type": "str", "userAssignedIdentity": {"id": "str"}}, - "healthProbeSettings": { - "probeIntervalInSeconds": 0, - "probePath": "str", - "probeProtocol": "str", - "probeRequestType": "str", - }, - "loadBalancingSettings": { - "additionalLatencyInMilliseconds": 0, - "sampleSize": 0, - "successfulSamplesRequired": 0, - }, - "profileName": "str", - "sessionAffinityState": "str", - "trafficRestorationTimeToHealedOrNewEndpointsInMinutes": 0, + "properties": { + "authentication": {"scope": "str", "type": "str", "userAssignedIdentity": {"id": "str"}}, + "healthProbeSettings": { + "probeIntervalInSeconds": 0, + "probePath": "str", + "probeProtocol": "str", + "probeRequestType": "str", + }, + "loadBalancingSettings": { + "additionalLatencyInMilliseconds": 0, + "sampleSize": 0, + "successfulSamplesRequired": 0, + }, + "profileName": "str", + "sessionAffinityState": "str", + "trafficRestorationTimeToHealedOrNewEndpointsInMinutes": 0, + } }, - api_version="2025-06-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -123,12 +112,22 @@ def test_afd_origin_groups_begin_delete(self, resource_group): resource_group_name=resource_group.name, profile_name="str", origin_group_name="str", - api_version="2025-06-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_afd_origin_groups_list_by_profile(self, resource_group): + response = self.client.afd_origin_groups.list_by_profile( + resource_group_name=resource_group.name, + profile_name="str", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_afd_origin_groups_list_resource_usage(self, resource_group): @@ -136,7 +135,6 @@ def test_afd_origin_groups_list_resource_usage(self, resource_group): resource_group_name=resource_group.name, profile_name="str", origin_group_name="str", - api_version="2025-06-01", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_afd_origin_groups_operations_async.py b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_afd_origin_groups_operations_async.py similarity index 67% rename from sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_afd_origin_groups_operations_async.py rename to sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_afd_origin_groups_operations_async.py index c9aeadbb09ae..6c00b28bc694 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_afd_origin_groups_operations_async.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_afd_origin_groups_operations_async.py @@ -2,11 +2,11 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest -from azure.mgmt.cdn.aio import CdnManagementClient +from azure.mgmt.cdn.aio import CdnClient from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer from devtools_testutils.aio import recorded_by_proxy_async @@ -15,21 +15,9 @@ @pytest.mark.skip("you may need to update the auto-generated test case before run it") -class TestCdnManagementAFDOriginGroupsOperationsAsync(AzureMgmtRecordedTestCase): +class TestCdnAFDOriginGroupsOperationsAsync(AzureMgmtRecordedTestCase): def setup_method(self, method): - self.client = self.create_mgmt_client(CdnManagementClient, is_async=True) - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_afd_origin_groups_list_by_profile(self, resource_group): - response = self.client.afd_origin_groups.list_by_profile( - resource_group_name=resource_group.name, - profile_name="str", - api_version="2025-06-01", - ) - result = [r async for r in response] - # please add some check logic here by yourself - # ... + self.client = self.create_mgmt_client(CdnClient, is_async=True) @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async @@ -38,7 +26,6 @@ async def test_afd_origin_groups_get(self, resource_group): resource_group_name=resource_group.name, profile_name="str", origin_group_name="str", - api_version="2025-06-01", ) # please add some check logic here by yourself @@ -53,24 +40,27 @@ async def test_afd_origin_groups_begin_create(self, resource_group): profile_name="str", origin_group_name="str", origin_group={ - "authentication": {"scope": "str", "type": "str", "userAssignedIdentity": {"id": "str"}}, - "deploymentStatus": "str", - "healthProbeSettings": { - "probeIntervalInSeconds": 0, - "probePath": "str", - "probeProtocol": "str", - "probeRequestType": "str", - }, "id": "str", - "loadBalancingSettings": { - "additionalLatencyInMilliseconds": 0, - "sampleSize": 0, - "successfulSamplesRequired": 0, - }, "name": "str", - "profileName": "str", - "provisioningState": "str", - "sessionAffinityState": "str", + "properties": { + "authentication": {"scope": "str", "type": "str", "userAssignedIdentity": {"id": "str"}}, + "deploymentStatus": "str", + "healthProbeSettings": { + "probeIntervalInSeconds": 0, + "probePath": "str", + "probeProtocol": "str", + "probeRequestType": "str", + }, + "loadBalancingSettings": { + "additionalLatencyInMilliseconds": 0, + "sampleSize": 0, + "successfulSamplesRequired": 0, + }, + "profileName": "str", + "provisioningState": "str", + "sessionAffinityState": "str", + "trafficRestorationTimeToHealedOrNewEndpointsInMinutes": 0, + }, "systemData": { "createdAt": "2020-02-20 00:00:00", "createdBy": "str", @@ -79,10 +69,8 @@ async def test_afd_origin_groups_begin_create(self, resource_group): "lastModifiedBy": "str", "lastModifiedByType": "str", }, - "trafficRestorationTimeToHealedOrNewEndpointsInMinutes": 0, "type": "str", }, - api_version="2025-06-01", ) ).result() # call '.result()' to poll until service return final result @@ -98,23 +86,24 @@ async def test_afd_origin_groups_begin_update(self, resource_group): profile_name="str", origin_group_name="str", origin_group_update_properties={ - "authentication": {"scope": "str", "type": "str", "userAssignedIdentity": {"id": "str"}}, - "healthProbeSettings": { - "probeIntervalInSeconds": 0, - "probePath": "str", - "probeProtocol": "str", - "probeRequestType": "str", - }, - "loadBalancingSettings": { - "additionalLatencyInMilliseconds": 0, - "sampleSize": 0, - "successfulSamplesRequired": 0, - }, - "profileName": "str", - "sessionAffinityState": "str", - "trafficRestorationTimeToHealedOrNewEndpointsInMinutes": 0, + "properties": { + "authentication": {"scope": "str", "type": "str", "userAssignedIdentity": {"id": "str"}}, + "healthProbeSettings": { + "probeIntervalInSeconds": 0, + "probePath": "str", + "probeProtocol": "str", + "probeRequestType": "str", + }, + "loadBalancingSettings": { + "additionalLatencyInMilliseconds": 0, + "sampleSize": 0, + "successfulSamplesRequired": 0, + }, + "profileName": "str", + "sessionAffinityState": "str", + "trafficRestorationTimeToHealedOrNewEndpointsInMinutes": 0, + } }, - api_version="2025-06-01", ) ).result() # call '.result()' to poll until service return final result @@ -129,13 +118,23 @@ async def test_afd_origin_groups_begin_delete(self, resource_group): resource_group_name=resource_group.name, profile_name="str", origin_group_name="str", - api_version="2025-06-01", ) ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_afd_origin_groups_list_by_profile(self, resource_group): + response = self.client.afd_origin_groups.list_by_profile( + resource_group_name=resource_group.name, + profile_name="str", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_afd_origin_groups_list_resource_usage(self, resource_group): @@ -143,7 +142,6 @@ async def test_afd_origin_groups_list_resource_usage(self, resource_group): resource_group_name=resource_group.name, profile_name="str", origin_group_name="str", - api_version="2025-06-01", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_afd_origins_operations.py b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_afd_origins_operations.py similarity index 66% rename from sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_afd_origins_operations.py rename to sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_afd_origins_operations.py index 2ea5f9735867..e345f2dab982 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_afd_origins_operations.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_afd_origins_operations.py @@ -2,11 +2,11 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy @@ -14,22 +14,9 @@ @pytest.mark.skip("you may need to update the auto-generated test case before run it") -class TestCdnManagementAFDOriginsOperations(AzureMgmtRecordedTestCase): +class TestCdnAFDOriginsOperations(AzureMgmtRecordedTestCase): def setup_method(self, method): - self.client = self.create_mgmt_client(CdnManagementClient) - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_afd_origins_list_by_origin_group(self, resource_group): - response = self.client.afd_origins.list_by_origin_group( - resource_group_name=resource_group.name, - profile_name="str", - origin_group_name="str", - api_version="2025-06-01", - ) - result = [r for r in response] - # please add some check logic here by yourself - # ... + self.client = self.create_mgmt_client(CdnClient) @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy @@ -39,7 +26,6 @@ def test_afd_origins_get(self, resource_group): profile_name="str", origin_group_name="str", origin_name="str", - api_version="2025-06-01", ) # please add some check logic here by yourself @@ -54,25 +40,28 @@ def test_afd_origins_begin_create(self, resource_group): origin_group_name="str", origin_name="str", origin={ - "azureOrigin": {"id": "str"}, - "deploymentStatus": "str", - "enabledState": "str", - "enforceCertificateNameCheck": True, - "hostName": "str", - "httpPort": 80, - "httpsPort": 443, "id": "str", "name": "str", - "originGroupName": "str", - "originHostHeader": "str", - "priority": 0, - "provisioningState": "str", - "sharedPrivateLinkResource": { - "groupId": "str", - "privateLink": {"id": "str"}, - "privateLinkLocation": "str", - "requestMessage": "str", - "status": "str", + "properties": { + "azureOrigin": {"id": "str"}, + "deploymentStatus": "str", + "enabledState": "str", + "enforceCertificateNameCheck": bool, + "hostName": "str", + "httpPort": 0, + "httpsPort": 0, + "originGroupName": "str", + "originHostHeader": "str", + "priority": 0, + "provisioningState": "str", + "sharedPrivateLinkResource": { + "groupId": "str", + "privateLink": {"id": "str"}, + "privateLinkLocation": "str", + "requestMessage": "str", + "status": "str", + }, + "weight": 0, }, "systemData": { "createdAt": "2020-02-20 00:00:00", @@ -83,9 +72,7 @@ def test_afd_origins_begin_create(self, resource_group): "lastModifiedByType": "str", }, "type": "str", - "weight": 0, }, - api_version="2025-06-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -100,25 +87,26 @@ def test_afd_origins_begin_update(self, resource_group): origin_group_name="str", origin_name="str", origin_update_properties={ - "azureOrigin": {"id": "str"}, - "enabledState": "str", - "enforceCertificateNameCheck": True, - "hostName": "str", - "httpPort": 80, - "httpsPort": 443, - "originGroupName": "str", - "originHostHeader": "str", - "priority": 0, - "sharedPrivateLinkResource": { - "groupId": "str", - "privateLink": {"id": "str"}, - "privateLinkLocation": "str", - "requestMessage": "str", - "status": "str", - }, - "weight": 0, + "properties": { + "azureOrigin": {"id": "str"}, + "enabledState": "str", + "enforceCertificateNameCheck": bool, + "hostName": "str", + "httpPort": 0, + "httpsPort": 0, + "originGroupName": "str", + "originHostHeader": "str", + "priority": 0, + "sharedPrivateLinkResource": { + "groupId": "str", + "privateLink": {"id": "str"}, + "privateLinkLocation": "str", + "requestMessage": "str", + "status": "str", + }, + "weight": 0, + } }, - api_version="2025-06-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -132,8 +120,19 @@ def test_afd_origins_begin_delete(self, resource_group): profile_name="str", origin_group_name="str", origin_name="str", - api_version="2025-06-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_afd_origins_list_by_origin_group(self, resource_group): + response = self.client.afd_origins.list_by_origin_group( + resource_group_name=resource_group.name, + profile_name="str", + origin_group_name="str", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_afd_origins_operations_async.py b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_afd_origins_operations_async.py similarity index 66% rename from sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_afd_origins_operations_async.py rename to sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_afd_origins_operations_async.py index 4d63be3edeee..556e1dfd9353 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_afd_origins_operations_async.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_afd_origins_operations_async.py @@ -2,11 +2,11 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest -from azure.mgmt.cdn.aio import CdnManagementClient +from azure.mgmt.cdn.aio import CdnClient from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer from devtools_testutils.aio import recorded_by_proxy_async @@ -15,22 +15,9 @@ @pytest.mark.skip("you may need to update the auto-generated test case before run it") -class TestCdnManagementAFDOriginsOperationsAsync(AzureMgmtRecordedTestCase): +class TestCdnAFDOriginsOperationsAsync(AzureMgmtRecordedTestCase): def setup_method(self, method): - self.client = self.create_mgmt_client(CdnManagementClient, is_async=True) - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_afd_origins_list_by_origin_group(self, resource_group): - response = self.client.afd_origins.list_by_origin_group( - resource_group_name=resource_group.name, - profile_name="str", - origin_group_name="str", - api_version="2025-06-01", - ) - result = [r async for r in response] - # please add some check logic here by yourself - # ... + self.client = self.create_mgmt_client(CdnClient, is_async=True) @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async @@ -40,7 +27,6 @@ async def test_afd_origins_get(self, resource_group): profile_name="str", origin_group_name="str", origin_name="str", - api_version="2025-06-01", ) # please add some check logic here by yourself @@ -56,25 +42,28 @@ async def test_afd_origins_begin_create(self, resource_group): origin_group_name="str", origin_name="str", origin={ - "azureOrigin": {"id": "str"}, - "deploymentStatus": "str", - "enabledState": "str", - "enforceCertificateNameCheck": True, - "hostName": "str", - "httpPort": 80, - "httpsPort": 443, "id": "str", "name": "str", - "originGroupName": "str", - "originHostHeader": "str", - "priority": 0, - "provisioningState": "str", - "sharedPrivateLinkResource": { - "groupId": "str", - "privateLink": {"id": "str"}, - "privateLinkLocation": "str", - "requestMessage": "str", - "status": "str", + "properties": { + "azureOrigin": {"id": "str"}, + "deploymentStatus": "str", + "enabledState": "str", + "enforceCertificateNameCheck": bool, + "hostName": "str", + "httpPort": 0, + "httpsPort": 0, + "originGroupName": "str", + "originHostHeader": "str", + "priority": 0, + "provisioningState": "str", + "sharedPrivateLinkResource": { + "groupId": "str", + "privateLink": {"id": "str"}, + "privateLinkLocation": "str", + "requestMessage": "str", + "status": "str", + }, + "weight": 0, }, "systemData": { "createdAt": "2020-02-20 00:00:00", @@ -85,9 +74,7 @@ async def test_afd_origins_begin_create(self, resource_group): "lastModifiedByType": "str", }, "type": "str", - "weight": 0, }, - api_version="2025-06-01", ) ).result() # call '.result()' to poll until service return final result @@ -104,25 +91,26 @@ async def test_afd_origins_begin_update(self, resource_group): origin_group_name="str", origin_name="str", origin_update_properties={ - "azureOrigin": {"id": "str"}, - "enabledState": "str", - "enforceCertificateNameCheck": True, - "hostName": "str", - "httpPort": 80, - "httpsPort": 443, - "originGroupName": "str", - "originHostHeader": "str", - "priority": 0, - "sharedPrivateLinkResource": { - "groupId": "str", - "privateLink": {"id": "str"}, - "privateLinkLocation": "str", - "requestMessage": "str", - "status": "str", - }, - "weight": 0, + "properties": { + "azureOrigin": {"id": "str"}, + "enabledState": "str", + "enforceCertificateNameCheck": bool, + "hostName": "str", + "httpPort": 0, + "httpsPort": 0, + "originGroupName": "str", + "originHostHeader": "str", + "priority": 0, + "sharedPrivateLinkResource": { + "groupId": "str", + "privateLink": {"id": "str"}, + "privateLinkLocation": "str", + "requestMessage": "str", + "status": "str", + }, + "weight": 0, + } }, - api_version="2025-06-01", ) ).result() # call '.result()' to poll until service return final result @@ -138,9 +126,20 @@ async def test_afd_origins_begin_delete(self, resource_group): profile_name="str", origin_group_name="str", origin_name="str", - api_version="2025-06-01", ) ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_afd_origins_list_by_origin_group(self, resource_group): + response = self.client.afd_origins.list_by_origin_group( + resource_group_name=resource_group.name, + profile_name="str", + origin_group_name="str", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_afd_profiles_operations.py b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_afd_profiles_operations.py similarity index 88% rename from sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_afd_profiles_operations.py rename to sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_afd_profiles_operations.py index caac8e80ef5f..4cb64a5578ca 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_afd_profiles_operations.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_afd_profiles_operations.py @@ -2,11 +2,11 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy @@ -14,9 +14,9 @@ @pytest.mark.skip("you may need to update the auto-generated test case before run it") -class TestCdnManagementAFDProfilesOperations(AzureMgmtRecordedTestCase): +class TestCdnAFDProfilesOperations(AzureMgmtRecordedTestCase): def setup_method(self, method): - self.client = self.create_mgmt_client(CdnManagementClient) + self.client = self.create_mgmt_client(CdnClient) @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy @@ -29,7 +29,6 @@ def test_afd_profiles_check_endpoint_name_availability(self, resource_group): "type": "str", "autoGeneratedDomainNameLabelScope": "str", }, - api_version="2025-06-01", ) # please add some check logic here by yourself @@ -41,7 +40,6 @@ def test_afd_profiles_list_resource_usage(self, resource_group): response = self.client.afd_profiles.list_resource_usage( resource_group_name=resource_group.name, profile_name="str", - api_version="2025-06-01", ) result = [r for r in response] # please add some check logic here by yourself @@ -54,7 +52,6 @@ def test_afd_profiles_check_host_name_availability(self, resource_group): resource_group_name=resource_group.name, profile_name="str", check_host_name_availability_input={"hostName": "str"}, - api_version="2025-06-01", ) # please add some check logic here by yourself @@ -67,7 +64,6 @@ def test_afd_profiles_validate_secret(self, resource_group): resource_group_name=resource_group.name, profile_name="str", validate_secret_input={"secretSource": {"id": "str"}, "secretType": "str", "secretVersion": "str"}, - api_version="2025-06-01", ) # please add some check logic here by yourself @@ -82,7 +78,6 @@ def test_afd_profiles_begin_upgrade(self, resource_group): profile_upgrade_parameters={ "wafMappingList": [{"changeToWafPolicy": {"id": "str"}, "securityPolicyName": "str"}] }, - api_version="2025-06-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself diff --git a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_afd_profiles_operations_async.py b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_afd_profiles_operations_async.py similarity index 88% rename from sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_afd_profiles_operations_async.py rename to sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_afd_profiles_operations_async.py index 69f58b48e81e..3d498d70a42f 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_afd_profiles_operations_async.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_afd_profiles_operations_async.py @@ -2,11 +2,11 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest -from azure.mgmt.cdn.aio import CdnManagementClient +from azure.mgmt.cdn.aio import CdnClient from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer from devtools_testutils.aio import recorded_by_proxy_async @@ -15,9 +15,9 @@ @pytest.mark.skip("you may need to update the auto-generated test case before run it") -class TestCdnManagementAFDProfilesOperationsAsync(AzureMgmtRecordedTestCase): +class TestCdnAFDProfilesOperationsAsync(AzureMgmtRecordedTestCase): def setup_method(self, method): - self.client = self.create_mgmt_client(CdnManagementClient, is_async=True) + self.client = self.create_mgmt_client(CdnClient, is_async=True) @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async @@ -30,7 +30,6 @@ async def test_afd_profiles_check_endpoint_name_availability(self, resource_grou "type": "str", "autoGeneratedDomainNameLabelScope": "str", }, - api_version="2025-06-01", ) # please add some check logic here by yourself @@ -42,7 +41,6 @@ async def test_afd_profiles_list_resource_usage(self, resource_group): response = self.client.afd_profiles.list_resource_usage( resource_group_name=resource_group.name, profile_name="str", - api_version="2025-06-01", ) result = [r async for r in response] # please add some check logic here by yourself @@ -55,7 +53,6 @@ async def test_afd_profiles_check_host_name_availability(self, resource_group): resource_group_name=resource_group.name, profile_name="str", check_host_name_availability_input={"hostName": "str"}, - api_version="2025-06-01", ) # please add some check logic here by yourself @@ -68,7 +65,6 @@ async def test_afd_profiles_validate_secret(self, resource_group): resource_group_name=resource_group.name, profile_name="str", validate_secret_input={"secretSource": {"id": "str"}, "secretType": "str", "secretVersion": "str"}, - api_version="2025-06-01", ) # please add some check logic here by yourself @@ -84,7 +80,6 @@ async def test_afd_profiles_begin_upgrade(self, resource_group): profile_upgrade_parameters={ "wafMappingList": [{"changeToWafPolicy": {"id": "str"}, "securityPolicyName": "str"}] }, - api_version="2025-06-01", ) ).result() # call '.result()' to poll until service return final result diff --git a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_async.py b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_async.py similarity index 85% rename from sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_async.py rename to sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_async.py index 5bd1f10ed667..491e4466b168 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_async.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_async.py @@ -2,11 +2,11 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest -from azure.mgmt.cdn.aio import CdnManagementClient +from azure.mgmt.cdn.aio import CdnClient from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer from devtools_testutils.aio import recorded_by_proxy_async @@ -15,9 +15,9 @@ @pytest.mark.skip("you may need to update the auto-generated test case before run it") -class TestCdnManagementAsync(AzureMgmtRecordedTestCase): +class TestCdnAsync(AzureMgmtRecordedTestCase): def setup_method(self, method): - self.client = self.create_mgmt_client(CdnManagementClient, is_async=True) + self.client = self.create_mgmt_client(CdnClient, is_async=True) @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async @@ -29,7 +29,6 @@ async def test_check_endpoint_name_availability(self, resource_group): "type": "str", "autoGeneratedDomainNameLabelScope": "str", }, - api_version="2025-06-01", ) # please add some check logic here by yourself @@ -40,7 +39,6 @@ async def test_check_endpoint_name_availability(self, resource_group): async def test_check_name_availability(self, resource_group): response = await self.client.check_name_availability( check_name_availability_input={"name": "str", "type": "str"}, - api_version="2025-06-01", ) # please add some check logic here by yourself @@ -51,7 +49,6 @@ async def test_check_name_availability(self, resource_group): async def test_check_name_availability_with_subscription(self, resource_group): response = await self.client.check_name_availability_with_subscription( check_name_availability_input={"name": "str", "type": "str"}, - api_version="2025-06-01", ) # please add some check logic here by yourself @@ -62,7 +59,6 @@ async def test_check_name_availability_with_subscription(self, resource_group): async def test_validate_probe(self, resource_group): response = await self.client.validate_probe( validate_probe_input={"probeURL": "str"}, - api_version="2025-06-01", ) # please add some check logic here by yourself diff --git a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_custom_domains_operations.py b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_custom_domains_operations.py similarity index 87% rename from sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_custom_domains_operations.py rename to sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_custom_domains_operations.py index e80b7ba3055f..d46ff0c4dfec 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_custom_domains_operations.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_custom_domains_operations.py @@ -2,11 +2,11 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy @@ -14,22 +14,9 @@ @pytest.mark.skip("you may need to update the auto-generated test case before run it") -class TestCdnManagementCustomDomainsOperations(AzureMgmtRecordedTestCase): +class TestCdnCustomDomainsOperations(AzureMgmtRecordedTestCase): def setup_method(self, method): - self.client = self.create_mgmt_client(CdnManagementClient) - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_custom_domains_list_by_endpoint(self, resource_group): - response = self.client.custom_domains.list_by_endpoint( - resource_group_name=resource_group.name, - profile_name="str", - endpoint_name="str", - api_version="2025-06-01", - ) - result = [r for r in response] - # please add some check logic here by yourself - # ... + self.client = self.create_mgmt_client(CdnClient) @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy @@ -39,7 +26,6 @@ def test_custom_domains_get(self, resource_group): profile_name="str", endpoint_name="str", custom_domain_name="str", - api_version="2025-06-01", ) # please add some check logic here by yourself @@ -53,8 +39,7 @@ def test_custom_domains_begin_create(self, resource_group): profile_name="str", endpoint_name="str", custom_domain_name="str", - custom_domain_properties={"hostName": "str"}, - api_version="2025-06-01", + custom_domain_properties={"properties": {"hostName": "str"}}, ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -68,12 +53,23 @@ def test_custom_domains_begin_delete(self, resource_group): profile_name="str", endpoint_name="str", custom_domain_name="str", - api_version="2025-06-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_custom_domains_list_by_endpoint(self, resource_group): + response = self.client.custom_domains.list_by_endpoint( + resource_group_name=resource_group.name, + profile_name="str", + endpoint_name="str", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_custom_domains_begin_disable_custom_https(self, resource_group): @@ -82,7 +78,6 @@ def test_custom_domains_begin_disable_custom_https(self, resource_group): profile_name="str", endpoint_name="str", custom_domain_name="str", - api_version="2025-06-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -96,7 +91,6 @@ def test_custom_domains_begin_enable_custom_https(self, resource_group): profile_name="str", endpoint_name="str", custom_domain_name="str", - api_version="2025-06-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself diff --git a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_custom_domains_operations_async.py b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_custom_domains_operations_async.py similarity index 87% rename from sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_custom_domains_operations_async.py rename to sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_custom_domains_operations_async.py index 4498aae77c81..8d8289313b42 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_custom_domains_operations_async.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_custom_domains_operations_async.py @@ -2,11 +2,11 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest -from azure.mgmt.cdn.aio import CdnManagementClient +from azure.mgmt.cdn.aio import CdnClient from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer from devtools_testutils.aio import recorded_by_proxy_async @@ -15,22 +15,9 @@ @pytest.mark.skip("you may need to update the auto-generated test case before run it") -class TestCdnManagementCustomDomainsOperationsAsync(AzureMgmtRecordedTestCase): +class TestCdnCustomDomainsOperationsAsync(AzureMgmtRecordedTestCase): def setup_method(self, method): - self.client = self.create_mgmt_client(CdnManagementClient, is_async=True) - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_custom_domains_list_by_endpoint(self, resource_group): - response = self.client.custom_domains.list_by_endpoint( - resource_group_name=resource_group.name, - profile_name="str", - endpoint_name="str", - api_version="2025-06-01", - ) - result = [r async for r in response] - # please add some check logic here by yourself - # ... + self.client = self.create_mgmt_client(CdnClient, is_async=True) @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async @@ -40,7 +27,6 @@ async def test_custom_domains_get(self, resource_group): profile_name="str", endpoint_name="str", custom_domain_name="str", - api_version="2025-06-01", ) # please add some check logic here by yourself @@ -55,8 +41,7 @@ async def test_custom_domains_begin_create(self, resource_group): profile_name="str", endpoint_name="str", custom_domain_name="str", - custom_domain_properties={"hostName": "str"}, - api_version="2025-06-01", + custom_domain_properties={"properties": {"hostName": "str"}}, ) ).result() # call '.result()' to poll until service return final result @@ -72,13 +57,24 @@ async def test_custom_domains_begin_delete(self, resource_group): profile_name="str", endpoint_name="str", custom_domain_name="str", - api_version="2025-06-01", ) ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_custom_domains_list_by_endpoint(self, resource_group): + response = self.client.custom_domains.list_by_endpoint( + resource_group_name=resource_group.name, + profile_name="str", + endpoint_name="str", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_custom_domains_begin_disable_custom_https(self, resource_group): @@ -88,7 +84,6 @@ async def test_custom_domains_begin_disable_custom_https(self, resource_group): profile_name="str", endpoint_name="str", custom_domain_name="str", - api_version="2025-06-01", ) ).result() # call '.result()' to poll until service return final result @@ -104,7 +99,6 @@ async def test_custom_domains_begin_enable_custom_https(self, resource_group): profile_name="str", endpoint_name="str", custom_domain_name="str", - api_version="2025-06-01", ) ).result() # call '.result()' to poll until service return final result diff --git a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_edge_nodes_operations.py b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_edge_nodes_operations.py similarity index 73% rename from sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_edge_nodes_operations.py rename to sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_edge_nodes_operations.py index 2625ebfdbcb2..2f6cc41b8325 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_edge_nodes_operations.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_edge_nodes_operations.py @@ -2,11 +2,11 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy @@ -14,16 +14,14 @@ @pytest.mark.skip("you may need to update the auto-generated test case before run it") -class TestCdnManagementEdgeNodesOperations(AzureMgmtRecordedTestCase): +class TestCdnEdgeNodesOperations(AzureMgmtRecordedTestCase): def setup_method(self, method): - self.client = self.create_mgmt_client(CdnManagementClient) + self.client = self.create_mgmt_client(CdnClient) @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_edge_nodes_list(self, resource_group): - response = self.client.edge_nodes.list( - api_version="2025-06-01", - ) + response = self.client.edge_nodes.list() result = [r for r in response] # please add some check logic here by yourself # ... diff --git a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_edge_nodes_operations_async.py b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_edge_nodes_operations_async.py similarity index 73% rename from sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_edge_nodes_operations_async.py rename to sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_edge_nodes_operations_async.py index e2d50d7db586..6c524035be3e 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_edge_nodes_operations_async.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_edge_nodes_operations_async.py @@ -2,11 +2,11 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest -from azure.mgmt.cdn.aio import CdnManagementClient +from azure.mgmt.cdn.aio import CdnClient from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer from devtools_testutils.aio import recorded_by_proxy_async @@ -15,16 +15,14 @@ @pytest.mark.skip("you may need to update the auto-generated test case before run it") -class TestCdnManagementEdgeNodesOperationsAsync(AzureMgmtRecordedTestCase): +class TestCdnEdgeNodesOperationsAsync(AzureMgmtRecordedTestCase): def setup_method(self, method): - self.client = self.create_mgmt_client(CdnManagementClient, is_async=True) + self.client = self.create_mgmt_client(CdnClient, is_async=True) @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_edge_nodes_list(self, resource_group): - response = self.client.edge_nodes.list( - api_version="2025-06-01", - ) + response = self.client.edge_nodes.list() result = [r async for r in response] # please add some check logic here by yourself # ... diff --git a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_endpoints_operations.py b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_endpoints_operations.py similarity index 54% rename from sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_endpoints_operations.py rename to sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_endpoints_operations.py index e1ec67f8cd62..dcc3201a6fc3 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_endpoints_operations.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_endpoints_operations.py @@ -2,11 +2,11 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy @@ -14,21 +14,9 @@ @pytest.mark.skip("you may need to update the auto-generated test case before run it") -class TestCdnManagementEndpointsOperations(AzureMgmtRecordedTestCase): +class TestCdnEndpointsOperations(AzureMgmtRecordedTestCase): def setup_method(self, method): - self.client = self.create_mgmt_client(CdnManagementClient) - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_endpoints_list_by_profile(self, resource_group): - response = self.client.endpoints.list_by_profile( - resource_group_name=resource_group.name, - profile_name="str", - api_version="2025-06-01", - ) - result = [r for r in response] - # please add some check logic here by yourself - # ... + self.client = self.create_mgmt_client(CdnClient) @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy @@ -37,7 +25,6 @@ def test_endpoints_get(self, resource_group): resource_group_name=resource_group.name, profile_name="str", endpoint_name="str", - api_version="2025-06-01", ) # please add some check logic here by yourself @@ -52,69 +39,89 @@ def test_endpoints_begin_create(self, resource_group): endpoint_name="str", endpoint={ "location": "str", - "contentTypesToCompress": ["str"], - "customDomains": [{"name": "str", "hostName": "str", "validationData": "str"}], - "defaultOriginGroup": {"id": "str"}, - "deliveryPolicy": { - "rules": [ + "id": "str", + "name": "str", + "properties": { + "origins": [ + { + "name": "str", + "properties": { + "hostName": "str", + "enabled": bool, + "httpPort": 0, + "httpsPort": 0, + "originHostHeader": "str", + "priority": 0, + "privateEndpointStatus": "str", + "privateLinkAlias": "str", + "privateLinkApprovalMessage": "str", + "privateLinkLocation": "str", + "privateLinkResourceId": "str", + "weight": 0, + }, + } + ], + "contentTypesToCompress": ["str"], + "customDomains": [{"name": "str", "properties": {"hostName": "str", "validationData": "str"}}], + "defaultOriginGroup": {"id": "str"}, + "deliveryPolicy": { + "rules": [ + { + "actions": ["delivery_rule_action"], + "order": 0, + "conditions": ["delivery_rule_condition"], + "name": "str", + } + ], + "description": "str", + }, + "geoFilters": [{"action": "str", "countryCodes": ["str"], "relativePath": "str"}], + "hostName": "str", + "isCompressionEnabled": bool, + "isHttpAllowed": bool, + "isHttpsAllowed": bool, + "optimizationType": "str", + "originGroups": [ { - "actions": ["delivery_rule_action"], - "order": 0, - "conditions": ["delivery_rule_condition"], "name": "str", + "properties": { + "origins": [{"id": "str"}], + "healthProbeSettings": { + "probeIntervalInSeconds": 0, + "probePath": "str", + "probeProtocol": "str", + "probeRequestType": "str", + }, + "responseBasedOriginErrorDetectionSettings": { + "httpErrorRanges": [{"begin": 0, "end": 0}], + "responseBasedDetectedErrorTypes": "str", + "responseBasedFailoverThresholdPercentage": 0, + }, + "trafficRestorationTimeToHealedOrNewEndpointsInMinutes": 0, + }, } ], - "description": "str", + "originHostHeader": "str", + "originPath": "str", + "probePath": "str", + "provisioningState": "str", + "queryStringCachingBehavior": "str", + "resourceState": "str", + "urlSigningKeys": [ + { + "keyId": "str", + "keySourceParameters": { + "resourceGroupName": "str", + "secretName": "str", + "secretVersion": "str", + "subscriptionId": "str", + "typeName": "str", + "vaultName": "str", + }, + } + ], + "webApplicationFirewallPolicyLink": {"id": "str"}, }, - "geoFilters": [{"action": "str", "countryCodes": ["str"], "relativePath": "str"}], - "hostName": "str", - "id": "str", - "isCompressionEnabled": bool, - "isHttpAllowed": True, - "isHttpsAllowed": True, - "name": "str", - "optimizationType": "str", - "originGroups": [ - { - "name": "str", - "healthProbeSettings": { - "probeIntervalInSeconds": 0, - "probePath": "str", - "probeProtocol": "str", - "probeRequestType": "str", - }, - "origins": [{"id": "str"}], - "responseBasedOriginErrorDetectionSettings": { - "httpErrorRanges": [{"begin": 0, "end": 0}], - "responseBasedDetectedErrorTypes": "str", - "responseBasedFailoverThresholdPercentage": 0, - }, - "trafficRestorationTimeToHealedOrNewEndpointsInMinutes": 0, - } - ], - "originHostHeader": "str", - "originPath": "str", - "origins": [ - { - "name": "str", - "enabled": bool, - "hostName": "str", - "httpPort": 0, - "httpsPort": 0, - "originHostHeader": "str", - "priority": 0, - "privateEndpointStatus": "str", - "privateLinkAlias": "str", - "privateLinkApprovalMessage": "str", - "privateLinkLocation": "str", - "privateLinkResourceId": "str", - "weight": 0, - } - ], - "probePath": "str", - "provisioningState": "str", - "queryStringCachingBehavior": "str", - "resourceState": "str", "systemData": { "createdAt": "2020-02-20 00:00:00", "createdBy": "str", @@ -125,22 +132,7 @@ def test_endpoints_begin_create(self, resource_group): }, "tags": {"str": "str"}, "type": "str", - "urlSigningKeys": [ - { - "keyId": "str", - "keySourceParameters": { - "resourceGroupName": "str", - "secretName": "str", - "secretVersion": "str", - "subscriptionId": "str", - "typeName": "str", - "vaultName": "str", - }, - } - ], - "webApplicationFirewallPolicyLink": {"id": "str"}, }, - api_version="2025-06-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -154,45 +146,46 @@ def test_endpoints_begin_update(self, resource_group): profile_name="str", endpoint_name="str", endpoint_update_properties={ - "contentTypesToCompress": ["str"], - "defaultOriginGroup": {"id": "str"}, - "deliveryPolicy": { - "rules": [ + "properties": { + "contentTypesToCompress": ["str"], + "defaultOriginGroup": {"id": "str"}, + "deliveryPolicy": { + "rules": [ + { + "actions": ["delivery_rule_action"], + "order": 0, + "conditions": ["delivery_rule_condition"], + "name": "str", + } + ], + "description": "str", + }, + "geoFilters": [{"action": "str", "countryCodes": ["str"], "relativePath": "str"}], + "isCompressionEnabled": bool, + "isHttpAllowed": bool, + "isHttpsAllowed": bool, + "optimizationType": "str", + "originHostHeader": "str", + "originPath": "str", + "probePath": "str", + "queryStringCachingBehavior": "str", + "urlSigningKeys": [ { - "actions": ["delivery_rule_action"], - "order": 0, - "conditions": ["delivery_rule_condition"], - "name": "str", + "keyId": "str", + "keySourceParameters": { + "resourceGroupName": "str", + "secretName": "str", + "secretVersion": "str", + "subscriptionId": "str", + "typeName": "str", + "vaultName": "str", + }, } ], - "description": "str", + "webApplicationFirewallPolicyLink": {"id": "str"}, }, - "geoFilters": [{"action": "str", "countryCodes": ["str"], "relativePath": "str"}], - "isCompressionEnabled": bool, - "isHttpAllowed": True, - "isHttpsAllowed": True, - "optimizationType": "str", - "originHostHeader": "str", - "originPath": "str", - "probePath": "str", - "queryStringCachingBehavior": "str", "tags": {"str": "str"}, - "urlSigningKeys": [ - { - "keyId": "str", - "keySourceParameters": { - "resourceGroupName": "str", - "secretName": "str", - "secretVersion": "str", - "subscriptionId": "str", - "typeName": "str", - "vaultName": "str", - }, - } - ], - "webApplicationFirewallPolicyLink": {"id": "str"}, }, - api_version="2025-06-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -205,12 +198,22 @@ def test_endpoints_begin_delete(self, resource_group): resource_group_name=resource_group.name, profile_name="str", endpoint_name="str", - api_version="2025-06-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_endpoints_list_by_profile(self, resource_group): + response = self.client.endpoints.list_by_profile( + resource_group_name=resource_group.name, + profile_name="str", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_endpoints_begin_start(self, resource_group): @@ -218,7 +221,6 @@ def test_endpoints_begin_start(self, resource_group): resource_group_name=resource_group.name, profile_name="str", endpoint_name="str", - api_version="2025-06-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -231,7 +233,6 @@ def test_endpoints_begin_stop(self, resource_group): resource_group_name=resource_group.name, profile_name="str", endpoint_name="str", - api_version="2025-06-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -245,7 +246,6 @@ def test_endpoints_begin_purge_content(self, resource_group): profile_name="str", endpoint_name="str", content_file_paths={"contentPaths": ["str"]}, - api_version="2025-06-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -259,7 +259,6 @@ def test_endpoints_begin_load_content(self, resource_group): profile_name="str", endpoint_name="str", content_file_paths={"contentPaths": ["str"]}, - api_version="2025-06-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -273,7 +272,6 @@ def test_endpoints_validate_custom_domain(self, resource_group): profile_name="str", endpoint_name="str", custom_domain_properties={"hostName": "str"}, - api_version="2025-06-01", ) # please add some check logic here by yourself @@ -286,7 +284,6 @@ def test_endpoints_list_resource_usage(self, resource_group): resource_group_name=resource_group.name, profile_name="str", endpoint_name="str", - api_version="2025-06-01", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_endpoints_operations_async.py b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_endpoints_operations_async.py similarity index 54% rename from sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_endpoints_operations_async.py rename to sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_endpoints_operations_async.py index 15bfef821377..28fc043d5e4f 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_endpoints_operations_async.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_endpoints_operations_async.py @@ -2,11 +2,11 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest -from azure.mgmt.cdn.aio import CdnManagementClient +from azure.mgmt.cdn.aio import CdnClient from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer from devtools_testutils.aio import recorded_by_proxy_async @@ -15,21 +15,9 @@ @pytest.mark.skip("you may need to update the auto-generated test case before run it") -class TestCdnManagementEndpointsOperationsAsync(AzureMgmtRecordedTestCase): +class TestCdnEndpointsOperationsAsync(AzureMgmtRecordedTestCase): def setup_method(self, method): - self.client = self.create_mgmt_client(CdnManagementClient, is_async=True) - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_endpoints_list_by_profile(self, resource_group): - response = self.client.endpoints.list_by_profile( - resource_group_name=resource_group.name, - profile_name="str", - api_version="2025-06-01", - ) - result = [r async for r in response] - # please add some check logic here by yourself - # ... + self.client = self.create_mgmt_client(CdnClient, is_async=True) @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async @@ -38,7 +26,6 @@ async def test_endpoints_get(self, resource_group): resource_group_name=resource_group.name, profile_name="str", endpoint_name="str", - api_version="2025-06-01", ) # please add some check logic here by yourself @@ -54,69 +41,89 @@ async def test_endpoints_begin_create(self, resource_group): endpoint_name="str", endpoint={ "location": "str", - "contentTypesToCompress": ["str"], - "customDomains": [{"name": "str", "hostName": "str", "validationData": "str"}], - "defaultOriginGroup": {"id": "str"}, - "deliveryPolicy": { - "rules": [ + "id": "str", + "name": "str", + "properties": { + "origins": [ + { + "name": "str", + "properties": { + "hostName": "str", + "enabled": bool, + "httpPort": 0, + "httpsPort": 0, + "originHostHeader": "str", + "priority": 0, + "privateEndpointStatus": "str", + "privateLinkAlias": "str", + "privateLinkApprovalMessage": "str", + "privateLinkLocation": "str", + "privateLinkResourceId": "str", + "weight": 0, + }, + } + ], + "contentTypesToCompress": ["str"], + "customDomains": [{"name": "str", "properties": {"hostName": "str", "validationData": "str"}}], + "defaultOriginGroup": {"id": "str"}, + "deliveryPolicy": { + "rules": [ + { + "actions": ["delivery_rule_action"], + "order": 0, + "conditions": ["delivery_rule_condition"], + "name": "str", + } + ], + "description": "str", + }, + "geoFilters": [{"action": "str", "countryCodes": ["str"], "relativePath": "str"}], + "hostName": "str", + "isCompressionEnabled": bool, + "isHttpAllowed": bool, + "isHttpsAllowed": bool, + "optimizationType": "str", + "originGroups": [ { - "actions": ["delivery_rule_action"], - "order": 0, - "conditions": ["delivery_rule_condition"], "name": "str", + "properties": { + "origins": [{"id": "str"}], + "healthProbeSettings": { + "probeIntervalInSeconds": 0, + "probePath": "str", + "probeProtocol": "str", + "probeRequestType": "str", + }, + "responseBasedOriginErrorDetectionSettings": { + "httpErrorRanges": [{"begin": 0, "end": 0}], + "responseBasedDetectedErrorTypes": "str", + "responseBasedFailoverThresholdPercentage": 0, + }, + "trafficRestorationTimeToHealedOrNewEndpointsInMinutes": 0, + }, } ], - "description": "str", + "originHostHeader": "str", + "originPath": "str", + "probePath": "str", + "provisioningState": "str", + "queryStringCachingBehavior": "str", + "resourceState": "str", + "urlSigningKeys": [ + { + "keyId": "str", + "keySourceParameters": { + "resourceGroupName": "str", + "secretName": "str", + "secretVersion": "str", + "subscriptionId": "str", + "typeName": "str", + "vaultName": "str", + }, + } + ], + "webApplicationFirewallPolicyLink": {"id": "str"}, }, - "geoFilters": [{"action": "str", "countryCodes": ["str"], "relativePath": "str"}], - "hostName": "str", - "id": "str", - "isCompressionEnabled": bool, - "isHttpAllowed": True, - "isHttpsAllowed": True, - "name": "str", - "optimizationType": "str", - "originGroups": [ - { - "name": "str", - "healthProbeSettings": { - "probeIntervalInSeconds": 0, - "probePath": "str", - "probeProtocol": "str", - "probeRequestType": "str", - }, - "origins": [{"id": "str"}], - "responseBasedOriginErrorDetectionSettings": { - "httpErrorRanges": [{"begin": 0, "end": 0}], - "responseBasedDetectedErrorTypes": "str", - "responseBasedFailoverThresholdPercentage": 0, - }, - "trafficRestorationTimeToHealedOrNewEndpointsInMinutes": 0, - } - ], - "originHostHeader": "str", - "originPath": "str", - "origins": [ - { - "name": "str", - "enabled": bool, - "hostName": "str", - "httpPort": 0, - "httpsPort": 0, - "originHostHeader": "str", - "priority": 0, - "privateEndpointStatus": "str", - "privateLinkAlias": "str", - "privateLinkApprovalMessage": "str", - "privateLinkLocation": "str", - "privateLinkResourceId": "str", - "weight": 0, - } - ], - "probePath": "str", - "provisioningState": "str", - "queryStringCachingBehavior": "str", - "resourceState": "str", "systemData": { "createdAt": "2020-02-20 00:00:00", "createdBy": "str", @@ -127,22 +134,7 @@ async def test_endpoints_begin_create(self, resource_group): }, "tags": {"str": "str"}, "type": "str", - "urlSigningKeys": [ - { - "keyId": "str", - "keySourceParameters": { - "resourceGroupName": "str", - "secretName": "str", - "secretVersion": "str", - "subscriptionId": "str", - "typeName": "str", - "vaultName": "str", - }, - } - ], - "webApplicationFirewallPolicyLink": {"id": "str"}, }, - api_version="2025-06-01", ) ).result() # call '.result()' to poll until service return final result @@ -158,45 +150,46 @@ async def test_endpoints_begin_update(self, resource_group): profile_name="str", endpoint_name="str", endpoint_update_properties={ - "contentTypesToCompress": ["str"], - "defaultOriginGroup": {"id": "str"}, - "deliveryPolicy": { - "rules": [ + "properties": { + "contentTypesToCompress": ["str"], + "defaultOriginGroup": {"id": "str"}, + "deliveryPolicy": { + "rules": [ + { + "actions": ["delivery_rule_action"], + "order": 0, + "conditions": ["delivery_rule_condition"], + "name": "str", + } + ], + "description": "str", + }, + "geoFilters": [{"action": "str", "countryCodes": ["str"], "relativePath": "str"}], + "isCompressionEnabled": bool, + "isHttpAllowed": bool, + "isHttpsAllowed": bool, + "optimizationType": "str", + "originHostHeader": "str", + "originPath": "str", + "probePath": "str", + "queryStringCachingBehavior": "str", + "urlSigningKeys": [ { - "actions": ["delivery_rule_action"], - "order": 0, - "conditions": ["delivery_rule_condition"], - "name": "str", + "keyId": "str", + "keySourceParameters": { + "resourceGroupName": "str", + "secretName": "str", + "secretVersion": "str", + "subscriptionId": "str", + "typeName": "str", + "vaultName": "str", + }, } ], - "description": "str", + "webApplicationFirewallPolicyLink": {"id": "str"}, }, - "geoFilters": [{"action": "str", "countryCodes": ["str"], "relativePath": "str"}], - "isCompressionEnabled": bool, - "isHttpAllowed": True, - "isHttpsAllowed": True, - "optimizationType": "str", - "originHostHeader": "str", - "originPath": "str", - "probePath": "str", - "queryStringCachingBehavior": "str", "tags": {"str": "str"}, - "urlSigningKeys": [ - { - "keyId": "str", - "keySourceParameters": { - "resourceGroupName": "str", - "secretName": "str", - "secretVersion": "str", - "subscriptionId": "str", - "typeName": "str", - "vaultName": "str", - }, - } - ], - "webApplicationFirewallPolicyLink": {"id": "str"}, }, - api_version="2025-06-01", ) ).result() # call '.result()' to poll until service return final result @@ -211,13 +204,23 @@ async def test_endpoints_begin_delete(self, resource_group): resource_group_name=resource_group.name, profile_name="str", endpoint_name="str", - api_version="2025-06-01", ) ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_endpoints_list_by_profile(self, resource_group): + response = self.client.endpoints.list_by_profile( + resource_group_name=resource_group.name, + profile_name="str", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_endpoints_begin_start(self, resource_group): @@ -226,7 +229,6 @@ async def test_endpoints_begin_start(self, resource_group): resource_group_name=resource_group.name, profile_name="str", endpoint_name="str", - api_version="2025-06-01", ) ).result() # call '.result()' to poll until service return final result @@ -241,7 +243,6 @@ async def test_endpoints_begin_stop(self, resource_group): resource_group_name=resource_group.name, profile_name="str", endpoint_name="str", - api_version="2025-06-01", ) ).result() # call '.result()' to poll until service return final result @@ -257,7 +258,6 @@ async def test_endpoints_begin_purge_content(self, resource_group): profile_name="str", endpoint_name="str", content_file_paths={"contentPaths": ["str"]}, - api_version="2025-06-01", ) ).result() # call '.result()' to poll until service return final result @@ -273,7 +273,6 @@ async def test_endpoints_begin_load_content(self, resource_group): profile_name="str", endpoint_name="str", content_file_paths={"contentPaths": ["str"]}, - api_version="2025-06-01", ) ).result() # call '.result()' to poll until service return final result @@ -288,7 +287,6 @@ async def test_endpoints_validate_custom_domain(self, resource_group): profile_name="str", endpoint_name="str", custom_domain_properties={"hostName": "str"}, - api_version="2025-06-01", ) # please add some check logic here by yourself @@ -301,7 +299,6 @@ async def test_endpoints_list_resource_usage(self, resource_group): resource_group_name=resource_group.name, profile_name="str", endpoint_name="str", - api_version="2025-06-01", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_log_analytics_operations.py b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_log_analytics_operations.py similarity index 89% rename from sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_log_analytics_operations.py rename to sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_log_analytics_operations.py index 063f04864481..e978f160fee6 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_log_analytics_operations.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_log_analytics_operations.py @@ -2,11 +2,11 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy @@ -14,9 +14,9 @@ @pytest.mark.skip("you may need to update the auto-generated test case before run it") -class TestCdnManagementLogAnalyticsOperations(AzureMgmtRecordedTestCase): +class TestCdnLogAnalyticsOperations(AzureMgmtRecordedTestCase): def setup_method(self, method): - self.client = self.create_mgmt_client(CdnManagementClient) + self.client = self.create_mgmt_client(CdnClient) @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy @@ -30,7 +30,6 @@ def test_log_analytics_get_log_analytics_metrics(self, resource_group): granularity="str", custom_domains=["str"], protocols=["str"], - api_version="2025-06-01", ) # please add some check logic here by yourself @@ -47,7 +46,6 @@ def test_log_analytics_get_log_analytics_rankings(self, resource_group): max_ranking=0, date_time_begin="2020-02-20 00:00:00", date_time_end="2020-02-20 00:00:00", - api_version="2025-06-01", ) # please add some check logic here by yourself @@ -59,7 +57,6 @@ def test_log_analytics_get_log_analytics_locations(self, resource_group): response = self.client.log_analytics.get_log_analytics_locations( resource_group_name=resource_group.name, profile_name="str", - api_version="2025-06-01", ) # please add some check logic here by yourself @@ -71,7 +68,6 @@ def test_log_analytics_get_log_analytics_resources(self, resource_group): response = self.client.log_analytics.get_log_analytics_resources( resource_group_name=resource_group.name, profile_name="str", - api_version="2025-06-01", ) # please add some check logic here by yourself @@ -87,7 +83,6 @@ def test_log_analytics_get_waf_log_analytics_metrics(self, resource_group): date_time_begin="2020-02-20 00:00:00", date_time_end="2020-02-20 00:00:00", granularity="str", - api_version="2025-06-01", ) # please add some check logic here by yourself @@ -104,7 +99,6 @@ def test_log_analytics_get_waf_log_analytics_rankings(self, resource_group): date_time_end="2020-02-20 00:00:00", max_ranking=0, rankings=["str"], - api_version="2025-06-01", ) # please add some check logic here by yourself diff --git a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_log_analytics_operations_async.py b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_log_analytics_operations_async.py similarity index 88% rename from sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_log_analytics_operations_async.py rename to sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_log_analytics_operations_async.py index 1fb5bbc98b37..f6aa91432c99 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_log_analytics_operations_async.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_log_analytics_operations_async.py @@ -2,11 +2,11 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest -from azure.mgmt.cdn.aio import CdnManagementClient +from azure.mgmt.cdn.aio import CdnClient from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer from devtools_testutils.aio import recorded_by_proxy_async @@ -15,9 +15,9 @@ @pytest.mark.skip("you may need to update the auto-generated test case before run it") -class TestCdnManagementLogAnalyticsOperationsAsync(AzureMgmtRecordedTestCase): +class TestCdnLogAnalyticsOperationsAsync(AzureMgmtRecordedTestCase): def setup_method(self, method): - self.client = self.create_mgmt_client(CdnManagementClient, is_async=True) + self.client = self.create_mgmt_client(CdnClient, is_async=True) @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async @@ -31,7 +31,6 @@ async def test_log_analytics_get_log_analytics_metrics(self, resource_group): granularity="str", custom_domains=["str"], protocols=["str"], - api_version="2025-06-01", ) # please add some check logic here by yourself @@ -48,7 +47,6 @@ async def test_log_analytics_get_log_analytics_rankings(self, resource_group): max_ranking=0, date_time_begin="2020-02-20 00:00:00", date_time_end="2020-02-20 00:00:00", - api_version="2025-06-01", ) # please add some check logic here by yourself @@ -60,7 +58,6 @@ async def test_log_analytics_get_log_analytics_locations(self, resource_group): response = await self.client.log_analytics.get_log_analytics_locations( resource_group_name=resource_group.name, profile_name="str", - api_version="2025-06-01", ) # please add some check logic here by yourself @@ -72,7 +69,6 @@ async def test_log_analytics_get_log_analytics_resources(self, resource_group): response = await self.client.log_analytics.get_log_analytics_resources( resource_group_name=resource_group.name, profile_name="str", - api_version="2025-06-01", ) # please add some check logic here by yourself @@ -88,7 +84,6 @@ async def test_log_analytics_get_waf_log_analytics_metrics(self, resource_group) date_time_begin="2020-02-20 00:00:00", date_time_end="2020-02-20 00:00:00", granularity="str", - api_version="2025-06-01", ) # please add some check logic here by yourself @@ -105,7 +100,6 @@ async def test_log_analytics_get_waf_log_analytics_rankings(self, resource_group date_time_end="2020-02-20 00:00:00", max_ranking=0, rankings=["str"], - api_version="2025-06-01", ) # please add some check logic here by yourself diff --git a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_managed_rule_sets_operations.py b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_managed_rule_sets_operations.py similarity index 72% rename from sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_managed_rule_sets_operations.py rename to sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_managed_rule_sets_operations.py index 8100c0030aaa..8c849dda983c 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_managed_rule_sets_operations.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_managed_rule_sets_operations.py @@ -2,11 +2,11 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy @@ -14,16 +14,14 @@ @pytest.mark.skip("you may need to update the auto-generated test case before run it") -class TestCdnManagementManagedRuleSetsOperations(AzureMgmtRecordedTestCase): +class TestCdnManagedRuleSetsOperations(AzureMgmtRecordedTestCase): def setup_method(self, method): - self.client = self.create_mgmt_client(CdnManagementClient) + self.client = self.create_mgmt_client(CdnClient) @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_managed_rule_sets_list(self, resource_group): - response = self.client.managed_rule_sets.list( - api_version="2025-06-01", - ) + response = self.client.managed_rule_sets.list() result = [r for r in response] # please add some check logic here by yourself # ... diff --git a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_managed_rule_sets_operations_async.py b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_managed_rule_sets_operations_async.py similarity index 72% rename from sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_managed_rule_sets_operations_async.py rename to sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_managed_rule_sets_operations_async.py index d48e4d1b1037..39700d6fdeab 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_managed_rule_sets_operations_async.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_managed_rule_sets_operations_async.py @@ -2,11 +2,11 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest -from azure.mgmt.cdn.aio import CdnManagementClient +from azure.mgmt.cdn.aio import CdnClient from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer from devtools_testutils.aio import recorded_by_proxy_async @@ -15,16 +15,14 @@ @pytest.mark.skip("you may need to update the auto-generated test case before run it") -class TestCdnManagementManagedRuleSetsOperationsAsync(AzureMgmtRecordedTestCase): +class TestCdnManagedRuleSetsOperationsAsync(AzureMgmtRecordedTestCase): def setup_method(self, method): - self.client = self.create_mgmt_client(CdnManagementClient, is_async=True) + self.client = self.create_mgmt_client(CdnClient, is_async=True) @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_managed_rule_sets_list(self, resource_group): - response = self.client.managed_rule_sets.list( - api_version="2025-06-01", - ) + response = self.client.managed_rule_sets.list() result = [r async for r in response] # please add some check logic here by yourself # ... diff --git a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_policies_operations.py b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_policies_operations.py deleted file mode 100644 index 93122aa76d4d..000000000000 --- a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_policies_operations.py +++ /dev/null @@ -1,164 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -import pytest -from azure.mgmt.cdn import CdnManagementClient - -from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy - -AZURE_LOCATION = "eastus" - - -@pytest.mark.skip("you may need to update the auto-generated test case before run it") -class TestCdnManagementPoliciesOperations(AzureMgmtRecordedTestCase): - def setup_method(self, method): - self.client = self.create_mgmt_client(CdnManagementClient) - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_policies_list(self, resource_group): - response = self.client.policies.list( - resource_group_name=resource_group.name, - api_version="2025-06-01", - ) - result = [r for r in response] - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_policies_get(self, resource_group): - response = self.client.policies.get( - resource_group_name=resource_group.name, - policy_name="str", - api_version="2025-06-01", - ) - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_policies_begin_create_or_update(self, resource_group): - response = self.client.policies.begin_create_or_update( - resource_group_name=resource_group.name, - policy_name="str", - cdn_web_application_firewall_policy={ - "location": "str", - "sku": {"name": "str"}, - "customRules": { - "rules": [ - { - "action": "str", - "matchConditions": [ - { - "matchValue": ["str"], - "matchVariable": "str", - "operator": "str", - "negateCondition": bool, - "selector": "str", - "transforms": ["str"], - } - ], - "name": "str", - "priority": 0, - "enabledState": "str", - } - ] - }, - "endpointLinks": [{"id": "str"}], - "etag": "str", - "extendedProperties": {"str": "str"}, - "id": "str", - "managedRules": { - "managedRuleSets": [ - { - "ruleSetType": "str", - "ruleSetVersion": "str", - "anomalyScore": 0, - "ruleGroupOverrides": [ - { - "ruleGroupName": "str", - "rules": [{"ruleId": "str", "action": "str", "enabledState": "str"}], - } - ], - } - ] - }, - "name": "str", - "policySettings": { - "defaultCustomBlockResponseBody": "str", - "defaultCustomBlockResponseStatusCode": 0, - "defaultRedirectUrl": "str", - "enabledState": "str", - "mode": "str", - }, - "provisioningState": "str", - "rateLimitRules": { - "rules": [ - { - "action": "str", - "matchConditions": [ - { - "matchValue": ["str"], - "matchVariable": "str", - "operator": "str", - "negateCondition": bool, - "selector": "str", - "transforms": ["str"], - } - ], - "name": "str", - "priority": 0, - "rateLimitDurationInMinutes": 0, - "rateLimitThreshold": 0, - "enabledState": "str", - } - ] - }, - "resourceState": "str", - "systemData": { - "createdAt": "2020-02-20 00:00:00", - "createdBy": "str", - "createdByType": "str", - "lastModifiedAt": "2020-02-20 00:00:00", - "lastModifiedBy": "str", - "lastModifiedByType": "str", - }, - "tags": {"str": "str"}, - "type": "str", - }, - api_version="2025-06-01", - ).result() # call '.result()' to poll until service return final result - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_policies_begin_update(self, resource_group): - response = self.client.policies.begin_update( - resource_group_name=resource_group.name, - policy_name="str", - cdn_web_application_firewall_policy_patch_parameters={"tags": {"str": "str"}}, - api_version="2025-06-01", - ).result() # call '.result()' to poll until service return final result - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_policies_delete(self, resource_group): - response = self.client.policies.delete( - resource_group_name=resource_group.name, - policy_name="str", - api_version="2025-06-01", - ) - - # please add some check logic here by yourself - # ... diff --git a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_operations.py b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_operations.py similarity index 73% rename from sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_operations.py rename to sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_operations.py index b76413ccb9af..1aee0618e48a 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_operations.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_operations.py @@ -2,11 +2,11 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy @@ -14,16 +14,14 @@ @pytest.mark.skip("you may need to update the auto-generated test case before run it") -class TestCdnManagementOperations(AzureMgmtRecordedTestCase): +class TestCdnOperations(AzureMgmtRecordedTestCase): def setup_method(self, method): - self.client = self.create_mgmt_client(CdnManagementClient) + self.client = self.create_mgmt_client(CdnClient) @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_operations_list(self, resource_group): - response = self.client.operations.list( - api_version="2025-06-01", - ) + response = self.client.operations.list() result = [r for r in response] # please add some check logic here by yourself # ... diff --git a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_operations_async.py b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_operations_async.py similarity index 73% rename from sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_operations_async.py rename to sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_operations_async.py index 747d6b74e898..12124f8cf13e 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_operations_async.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_operations_async.py @@ -2,11 +2,11 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest -from azure.mgmt.cdn.aio import CdnManagementClient +from azure.mgmt.cdn.aio import CdnClient from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer from devtools_testutils.aio import recorded_by_proxy_async @@ -15,16 +15,14 @@ @pytest.mark.skip("you may need to update the auto-generated test case before run it") -class TestCdnManagementOperationsAsync(AzureMgmtRecordedTestCase): +class TestCdnOperationsAsync(AzureMgmtRecordedTestCase): def setup_method(self, method): - self.client = self.create_mgmt_client(CdnManagementClient, is_async=True) + self.client = self.create_mgmt_client(CdnClient, is_async=True) @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_operations_list(self, resource_group): - response = self.client.operations.list( - api_version="2025-06-01", - ) + response = self.client.operations.list() result = [r async for r in response] # please add some check logic here by yourself # ... diff --git a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_origin_groups_operations.py b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_origin_groups_operations.py similarity index 67% rename from sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_origin_groups_operations.py rename to sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_origin_groups_operations.py index 309f06bd8bc5..4ebe6ad7097c 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_origin_groups_operations.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_origin_groups_operations.py @@ -2,11 +2,11 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy @@ -14,22 +14,9 @@ @pytest.mark.skip("you may need to update the auto-generated test case before run it") -class TestCdnManagementOriginGroupsOperations(AzureMgmtRecordedTestCase): +class TestCdnOriginGroupsOperations(AzureMgmtRecordedTestCase): def setup_method(self, method): - self.client = self.create_mgmt_client(CdnManagementClient) - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_origin_groups_list_by_endpoint(self, resource_group): - response = self.client.origin_groups.list_by_endpoint( - resource_group_name=resource_group.name, - profile_name="str", - endpoint_name="str", - api_version="2025-06-01", - ) - result = [r for r in response] - # please add some check logic here by yourself - # ... + self.client = self.create_mgmt_client(CdnClient) @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy @@ -39,7 +26,6 @@ def test_origin_groups_get(self, resource_group): profile_name="str", endpoint_name="str", origin_group_name="str", - api_version="2025-06-01", ) # please add some check logic here by yourself @@ -54,21 +40,24 @@ def test_origin_groups_begin_create(self, resource_group): endpoint_name="str", origin_group_name="str", origin_group={ - "healthProbeSettings": { - "probeIntervalInSeconds": 0, - "probePath": "str", - "probeProtocol": "str", - "probeRequestType": "str", - }, "id": "str", "name": "str", - "origins": [{"id": "str"}], - "provisioningState": "str", - "resourceState": "str", - "responseBasedOriginErrorDetectionSettings": { - "httpErrorRanges": [{"begin": 0, "end": 0}], - "responseBasedDetectedErrorTypes": "str", - "responseBasedFailoverThresholdPercentage": 0, + "properties": { + "healthProbeSettings": { + "probeIntervalInSeconds": 0, + "probePath": "str", + "probeProtocol": "str", + "probeRequestType": "str", + }, + "origins": [{"id": "str"}], + "provisioningState": "str", + "resourceState": "str", + "responseBasedOriginErrorDetectionSettings": { + "httpErrorRanges": [{"begin": 0, "end": 0}], + "responseBasedDetectedErrorTypes": "str", + "responseBasedFailoverThresholdPercentage": 0, + }, + "trafficRestorationTimeToHealedOrNewEndpointsInMinutes": 0, }, "systemData": { "createdAt": "2020-02-20 00:00:00", @@ -78,10 +67,8 @@ def test_origin_groups_begin_create(self, resource_group): "lastModifiedBy": "str", "lastModifiedByType": "str", }, - "trafficRestorationTimeToHealedOrNewEndpointsInMinutes": 0, "type": "str", }, - api_version="2025-06-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -96,21 +83,22 @@ def test_origin_groups_begin_update(self, resource_group): endpoint_name="str", origin_group_name="str", origin_group_update_properties={ - "healthProbeSettings": { - "probeIntervalInSeconds": 0, - "probePath": "str", - "probeProtocol": "str", - "probeRequestType": "str", - }, - "origins": [{"id": "str"}], - "responseBasedOriginErrorDetectionSettings": { - "httpErrorRanges": [{"begin": 0, "end": 0}], - "responseBasedDetectedErrorTypes": "str", - "responseBasedFailoverThresholdPercentage": 0, - }, - "trafficRestorationTimeToHealedOrNewEndpointsInMinutes": 0, + "properties": { + "healthProbeSettings": { + "probeIntervalInSeconds": 0, + "probePath": "str", + "probeProtocol": "str", + "probeRequestType": "str", + }, + "origins": [{"id": "str"}], + "responseBasedOriginErrorDetectionSettings": { + "httpErrorRanges": [{"begin": 0, "end": 0}], + "responseBasedDetectedErrorTypes": "str", + "responseBasedFailoverThresholdPercentage": 0, + }, + "trafficRestorationTimeToHealedOrNewEndpointsInMinutes": 0, + } }, - api_version="2025-06-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -124,8 +112,19 @@ def test_origin_groups_begin_delete(self, resource_group): profile_name="str", endpoint_name="str", origin_group_name="str", - api_version="2025-06-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_origin_groups_list_by_endpoint(self, resource_group): + response = self.client.origin_groups.list_by_endpoint( + resource_group_name=resource_group.name, + profile_name="str", + endpoint_name="str", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_origin_groups_operations_async.py b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_origin_groups_operations_async.py similarity index 67% rename from sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_origin_groups_operations_async.py rename to sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_origin_groups_operations_async.py index 79e817fc8eb4..9e4e91678ca7 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_origin_groups_operations_async.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_origin_groups_operations_async.py @@ -2,11 +2,11 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest -from azure.mgmt.cdn.aio import CdnManagementClient +from azure.mgmt.cdn.aio import CdnClient from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer from devtools_testutils.aio import recorded_by_proxy_async @@ -15,22 +15,9 @@ @pytest.mark.skip("you may need to update the auto-generated test case before run it") -class TestCdnManagementOriginGroupsOperationsAsync(AzureMgmtRecordedTestCase): +class TestCdnOriginGroupsOperationsAsync(AzureMgmtRecordedTestCase): def setup_method(self, method): - self.client = self.create_mgmt_client(CdnManagementClient, is_async=True) - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_origin_groups_list_by_endpoint(self, resource_group): - response = self.client.origin_groups.list_by_endpoint( - resource_group_name=resource_group.name, - profile_name="str", - endpoint_name="str", - api_version="2025-06-01", - ) - result = [r async for r in response] - # please add some check logic here by yourself - # ... + self.client = self.create_mgmt_client(CdnClient, is_async=True) @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async @@ -40,7 +27,6 @@ async def test_origin_groups_get(self, resource_group): profile_name="str", endpoint_name="str", origin_group_name="str", - api_version="2025-06-01", ) # please add some check logic here by yourself @@ -56,21 +42,24 @@ async def test_origin_groups_begin_create(self, resource_group): endpoint_name="str", origin_group_name="str", origin_group={ - "healthProbeSettings": { - "probeIntervalInSeconds": 0, - "probePath": "str", - "probeProtocol": "str", - "probeRequestType": "str", - }, "id": "str", "name": "str", - "origins": [{"id": "str"}], - "provisioningState": "str", - "resourceState": "str", - "responseBasedOriginErrorDetectionSettings": { - "httpErrorRanges": [{"begin": 0, "end": 0}], - "responseBasedDetectedErrorTypes": "str", - "responseBasedFailoverThresholdPercentage": 0, + "properties": { + "healthProbeSettings": { + "probeIntervalInSeconds": 0, + "probePath": "str", + "probeProtocol": "str", + "probeRequestType": "str", + }, + "origins": [{"id": "str"}], + "provisioningState": "str", + "resourceState": "str", + "responseBasedOriginErrorDetectionSettings": { + "httpErrorRanges": [{"begin": 0, "end": 0}], + "responseBasedDetectedErrorTypes": "str", + "responseBasedFailoverThresholdPercentage": 0, + }, + "trafficRestorationTimeToHealedOrNewEndpointsInMinutes": 0, }, "systemData": { "createdAt": "2020-02-20 00:00:00", @@ -80,10 +69,8 @@ async def test_origin_groups_begin_create(self, resource_group): "lastModifiedBy": "str", "lastModifiedByType": "str", }, - "trafficRestorationTimeToHealedOrNewEndpointsInMinutes": 0, "type": "str", }, - api_version="2025-06-01", ) ).result() # call '.result()' to poll until service return final result @@ -100,21 +87,22 @@ async def test_origin_groups_begin_update(self, resource_group): endpoint_name="str", origin_group_name="str", origin_group_update_properties={ - "healthProbeSettings": { - "probeIntervalInSeconds": 0, - "probePath": "str", - "probeProtocol": "str", - "probeRequestType": "str", - }, - "origins": [{"id": "str"}], - "responseBasedOriginErrorDetectionSettings": { - "httpErrorRanges": [{"begin": 0, "end": 0}], - "responseBasedDetectedErrorTypes": "str", - "responseBasedFailoverThresholdPercentage": 0, - }, - "trafficRestorationTimeToHealedOrNewEndpointsInMinutes": 0, + "properties": { + "healthProbeSettings": { + "probeIntervalInSeconds": 0, + "probePath": "str", + "probeProtocol": "str", + "probeRequestType": "str", + }, + "origins": [{"id": "str"}], + "responseBasedOriginErrorDetectionSettings": { + "httpErrorRanges": [{"begin": 0, "end": 0}], + "responseBasedDetectedErrorTypes": "str", + "responseBasedFailoverThresholdPercentage": 0, + }, + "trafficRestorationTimeToHealedOrNewEndpointsInMinutes": 0, + } }, - api_version="2025-06-01", ) ).result() # call '.result()' to poll until service return final result @@ -130,9 +118,20 @@ async def test_origin_groups_begin_delete(self, resource_group): profile_name="str", endpoint_name="str", origin_group_name="str", - api_version="2025-06-01", ) ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_origin_groups_list_by_endpoint(self, resource_group): + response = self.client.origin_groups.list_by_endpoint( + resource_group_name=resource_group.name, + profile_name="str", + endpoint_name="str", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_origins_operations.py b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_origins_operations.py similarity index 71% rename from sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_origins_operations.py rename to sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_origins_operations.py index d043c4623ce3..105bccb9cb44 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_origins_operations.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_origins_operations.py @@ -2,11 +2,11 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy @@ -14,22 +14,9 @@ @pytest.mark.skip("you may need to update the auto-generated test case before run it") -class TestCdnManagementOriginsOperations(AzureMgmtRecordedTestCase): +class TestCdnOriginsOperations(AzureMgmtRecordedTestCase): def setup_method(self, method): - self.client = self.create_mgmt_client(CdnManagementClient) - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_origins_list_by_endpoint(self, resource_group): - response = self.client.origins.list_by_endpoint( - resource_group_name=resource_group.name, - profile_name="str", - endpoint_name="str", - api_version="2025-06-01", - ) - result = [r for r in response] - # please add some check logic here by yourself - # ... + self.client = self.create_mgmt_client(CdnClient) @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy @@ -39,7 +26,6 @@ def test_origins_get(self, resource_group): profile_name="str", endpoint_name="str", origin_name="str", - api_version="2025-06-01", ) # please add some check logic here by yourself @@ -54,21 +40,24 @@ def test_origins_begin_create(self, resource_group): endpoint_name="str", origin_name="str", origin={ - "enabled": bool, - "hostName": "str", - "httpPort": 0, - "httpsPort": 0, "id": "str", "name": "str", - "originHostHeader": "str", - "priority": 0, - "privateEndpointStatus": "str", - "privateLinkAlias": "str", - "privateLinkApprovalMessage": "str", - "privateLinkLocation": "str", - "privateLinkResourceId": "str", - "provisioningState": "str", - "resourceState": "str", + "properties": { + "hostName": "str", + "enabled": bool, + "httpPort": 0, + "httpsPort": 0, + "originHostHeader": "str", + "priority": 0, + "privateEndpointStatus": "str", + "privateLinkAlias": "str", + "privateLinkApprovalMessage": "str", + "privateLinkLocation": "str", + "privateLinkResourceId": "str", + "provisioningState": "str", + "resourceState": "str", + "weight": 0, + }, "systemData": { "createdAt": "2020-02-20 00:00:00", "createdBy": "str", @@ -78,9 +67,7 @@ def test_origins_begin_create(self, resource_group): "lastModifiedByType": "str", }, "type": "str", - "weight": 0, }, - api_version="2025-06-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -95,19 +82,20 @@ def test_origins_begin_update(self, resource_group): endpoint_name="str", origin_name="str", origin_update_properties={ - "enabled": bool, - "hostName": "str", - "httpPort": 0, - "httpsPort": 0, - "originHostHeader": "str", - "priority": 0, - "privateLinkAlias": "str", - "privateLinkApprovalMessage": "str", - "privateLinkLocation": "str", - "privateLinkResourceId": "str", - "weight": 0, + "properties": { + "enabled": bool, + "hostName": "str", + "httpPort": 0, + "httpsPort": 0, + "originHostHeader": "str", + "priority": 0, + "privateLinkAlias": "str", + "privateLinkApprovalMessage": "str", + "privateLinkLocation": "str", + "privateLinkResourceId": "str", + "weight": 0, + } }, - api_version="2025-06-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -121,8 +109,19 @@ def test_origins_begin_delete(self, resource_group): profile_name="str", endpoint_name="str", origin_name="str", - api_version="2025-06-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_origins_list_by_endpoint(self, resource_group): + response = self.client.origins.list_by_endpoint( + resource_group_name=resource_group.name, + profile_name="str", + endpoint_name="str", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_origins_operations_async.py b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_origins_operations_async.py similarity index 71% rename from sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_origins_operations_async.py rename to sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_origins_operations_async.py index aac7dc3c736f..01aa69cbcbb2 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_origins_operations_async.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_origins_operations_async.py @@ -2,11 +2,11 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest -from azure.mgmt.cdn.aio import CdnManagementClient +from azure.mgmt.cdn.aio import CdnClient from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer from devtools_testutils.aio import recorded_by_proxy_async @@ -15,22 +15,9 @@ @pytest.mark.skip("you may need to update the auto-generated test case before run it") -class TestCdnManagementOriginsOperationsAsync(AzureMgmtRecordedTestCase): +class TestCdnOriginsOperationsAsync(AzureMgmtRecordedTestCase): def setup_method(self, method): - self.client = self.create_mgmt_client(CdnManagementClient, is_async=True) - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_origins_list_by_endpoint(self, resource_group): - response = self.client.origins.list_by_endpoint( - resource_group_name=resource_group.name, - profile_name="str", - endpoint_name="str", - api_version="2025-06-01", - ) - result = [r async for r in response] - # please add some check logic here by yourself - # ... + self.client = self.create_mgmt_client(CdnClient, is_async=True) @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async @@ -40,7 +27,6 @@ async def test_origins_get(self, resource_group): profile_name="str", endpoint_name="str", origin_name="str", - api_version="2025-06-01", ) # please add some check logic here by yourself @@ -56,21 +42,24 @@ async def test_origins_begin_create(self, resource_group): endpoint_name="str", origin_name="str", origin={ - "enabled": bool, - "hostName": "str", - "httpPort": 0, - "httpsPort": 0, "id": "str", "name": "str", - "originHostHeader": "str", - "priority": 0, - "privateEndpointStatus": "str", - "privateLinkAlias": "str", - "privateLinkApprovalMessage": "str", - "privateLinkLocation": "str", - "privateLinkResourceId": "str", - "provisioningState": "str", - "resourceState": "str", + "properties": { + "hostName": "str", + "enabled": bool, + "httpPort": 0, + "httpsPort": 0, + "originHostHeader": "str", + "priority": 0, + "privateEndpointStatus": "str", + "privateLinkAlias": "str", + "privateLinkApprovalMessage": "str", + "privateLinkLocation": "str", + "privateLinkResourceId": "str", + "provisioningState": "str", + "resourceState": "str", + "weight": 0, + }, "systemData": { "createdAt": "2020-02-20 00:00:00", "createdBy": "str", @@ -80,9 +69,7 @@ async def test_origins_begin_create(self, resource_group): "lastModifiedByType": "str", }, "type": "str", - "weight": 0, }, - api_version="2025-06-01", ) ).result() # call '.result()' to poll until service return final result @@ -99,19 +86,20 @@ async def test_origins_begin_update(self, resource_group): endpoint_name="str", origin_name="str", origin_update_properties={ - "enabled": bool, - "hostName": "str", - "httpPort": 0, - "httpsPort": 0, - "originHostHeader": "str", - "priority": 0, - "privateLinkAlias": "str", - "privateLinkApprovalMessage": "str", - "privateLinkLocation": "str", - "privateLinkResourceId": "str", - "weight": 0, + "properties": { + "enabled": bool, + "hostName": "str", + "httpPort": 0, + "httpsPort": 0, + "originHostHeader": "str", + "priority": 0, + "privateLinkAlias": "str", + "privateLinkApprovalMessage": "str", + "privateLinkLocation": "str", + "privateLinkResourceId": "str", + "weight": 0, + } }, - api_version="2025-06-01", ) ).result() # call '.result()' to poll until service return final result @@ -127,9 +115,20 @@ async def test_origins_begin_delete(self, resource_group): profile_name="str", endpoint_name="str", origin_name="str", - api_version="2025-06-01", ) ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_origins_list_by_endpoint(self, resource_group): + response = self.client.origins.list_by_endpoint( + resource_group_name=resource_group.name, + profile_name="str", + endpoint_name="str", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_policies_operations_async.py b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_policies_operations.py similarity index 68% rename from sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_policies_operations_async.py rename to sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_policies_operations.py index 5f6192bef892..5a82ea914fd3 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_policies_operations_async.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_policies_operations.py @@ -2,56 +2,46 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest -from azure.mgmt.cdn.aio import CdnManagementClient +from azure.mgmt.cdn import CdnClient -from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer -from devtools_testutils.aio import recorded_by_proxy_async +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy AZURE_LOCATION = "eastus" @pytest.mark.skip("you may need to update the auto-generated test case before run it") -class TestCdnManagementPoliciesOperationsAsync(AzureMgmtRecordedTestCase): +class TestCdnPoliciesOperations(AzureMgmtRecordedTestCase): def setup_method(self, method): - self.client = self.create_mgmt_client(CdnManagementClient, is_async=True) + self.client = self.create_mgmt_client(CdnClient) @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_policies_list(self, resource_group): - response = self.client.policies.list( - resource_group_name=resource_group.name, - api_version="2025-06-01", - ) - result = [r async for r in response] - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_policies_get(self, resource_group): - response = await self.client.policies.get( + @recorded_by_proxy + def test_policies_get(self, resource_group): + response = self.client.policies.get( resource_group_name=resource_group.name, policy_name="str", - api_version="2025-06-01", ) # please add some check logic here by yourself # ... @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_policies_begin_create_or_update(self, resource_group): - response = await ( - await self.client.policies.begin_create_or_update( - resource_group_name=resource_group.name, - policy_name="str", - cdn_web_application_firewall_policy={ - "location": "str", - "sku": {"name": "str"}, + @recorded_by_proxy + def test_policies_begin_create_or_update(self, resource_group): + response = self.client.policies.begin_create_or_update( + resource_group_name=resource_group.name, + policy_name="str", + cdn_web_application_firewall_policy={ + "location": "str", + "sku": {"name": "str"}, + "etag": "str", + "id": "str", + "name": "str", + "properties": { "customRules": { "rules": [ { @@ -73,9 +63,7 @@ async def test_policies_begin_create_or_update(self, resource_group): ] }, "endpointLinks": [{"id": "str"}], - "etag": "str", "extendedProperties": {"str": "str"}, - "id": "str", "managedRules": { "managedRuleSets": [ { @@ -91,7 +79,6 @@ async def test_policies_begin_create_or_update(self, resource_group): } ] }, - "name": "str", "policySettings": { "defaultCustomBlockResponseBody": "str", "defaultCustomBlockResponseStatusCode": 0, @@ -123,47 +110,52 @@ async def test_policies_begin_create_or_update(self, resource_group): ] }, "resourceState": "str", - "systemData": { - "createdAt": "2020-02-20 00:00:00", - "createdBy": "str", - "createdByType": "str", - "lastModifiedAt": "2020-02-20 00:00:00", - "lastModifiedBy": "str", - "lastModifiedByType": "str", - }, - "tags": {"str": "str"}, - "type": "str", }, - api_version="2025-06-01", - ) + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "tags": {"str": "str"}, + "type": "str", + }, ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_policies_begin_update(self, resource_group): - response = await ( - await self.client.policies.begin_update( - resource_group_name=resource_group.name, - policy_name="str", - cdn_web_application_firewall_policy_patch_parameters={"tags": {"str": "str"}}, - api_version="2025-06-01", - ) + @recorded_by_proxy + def test_policies_begin_update(self, resource_group): + response = self.client.policies.begin_update( + resource_group_name=resource_group.name, + policy_name="str", + cdn_web_application_firewall_policy_patch_parameters={"tags": {"str": "str"}}, ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_policies_delete(self, resource_group): - response = await self.client.policies.delete( + @recorded_by_proxy + def test_policies_delete(self, resource_group): + response = self.client.policies.delete( resource_group_name=resource_group.name, policy_name="str", - api_version="2025-06-01", ) # please add some check logic here by yourself # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_policies_list(self, resource_group): + response = self.client.policies.list( + resource_group_name=resource_group.name, + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_policies_operations_async.py b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_policies_operations_async.py new file mode 100644 index 000000000000..6031a4815930 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_policies_operations_async.py @@ -0,0 +1,166 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.cdn.aio import CdnClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestCdnPoliciesOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(CdnClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_policies_get(self, resource_group): + response = await self.client.policies.get( + resource_group_name=resource_group.name, + policy_name="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_policies_begin_create_or_update(self, resource_group): + response = await ( + await self.client.policies.begin_create_or_update( + resource_group_name=resource_group.name, + policy_name="str", + cdn_web_application_firewall_policy={ + "location": "str", + "sku": {"name": "str"}, + "etag": "str", + "id": "str", + "name": "str", + "properties": { + "customRules": { + "rules": [ + { + "action": "str", + "matchConditions": [ + { + "matchValue": ["str"], + "matchVariable": "str", + "operator": "str", + "negateCondition": bool, + "selector": "str", + "transforms": ["str"], + } + ], + "name": "str", + "priority": 0, + "enabledState": "str", + } + ] + }, + "endpointLinks": [{"id": "str"}], + "extendedProperties": {"str": "str"}, + "managedRules": { + "managedRuleSets": [ + { + "ruleSetType": "str", + "ruleSetVersion": "str", + "anomalyScore": 0, + "ruleGroupOverrides": [ + { + "ruleGroupName": "str", + "rules": [{"ruleId": "str", "action": "str", "enabledState": "str"}], + } + ], + } + ] + }, + "policySettings": { + "defaultCustomBlockResponseBody": "str", + "defaultCustomBlockResponseStatusCode": 0, + "defaultRedirectUrl": "str", + "enabledState": "str", + "mode": "str", + }, + "provisioningState": "str", + "rateLimitRules": { + "rules": [ + { + "action": "str", + "matchConditions": [ + { + "matchValue": ["str"], + "matchVariable": "str", + "operator": "str", + "negateCondition": bool, + "selector": "str", + "transforms": ["str"], + } + ], + "name": "str", + "priority": 0, + "rateLimitDurationInMinutes": 0, + "rateLimitThreshold": 0, + "enabledState": "str", + } + ] + }, + "resourceState": "str", + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "tags": {"str": "str"}, + "type": "str", + }, + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_policies_begin_update(self, resource_group): + response = await ( + await self.client.policies.begin_update( + resource_group_name=resource_group.name, + policy_name="str", + cdn_web_application_firewall_policy_patch_parameters={"tags": {"str": "str"}}, + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_policies_delete(self, resource_group): + response = await self.client.policies.delete( + resource_group_name=resource_group.name, + policy_name="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_policies_list(self, resource_group): + response = self.client.policies.list( + resource_group_name=resource_group.name, + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_profiles_operations.py b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_profiles_operations.py similarity index 84% rename from sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_profiles_operations.py rename to sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_profiles_operations.py index 59ed0c520cd7..5e862ee3cd03 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_profiles_operations.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_profiles_operations.py @@ -2,11 +2,11 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy @@ -14,30 +14,9 @@ @pytest.mark.skip("you may need to update the auto-generated test case before run it") -class TestCdnManagementProfilesOperations(AzureMgmtRecordedTestCase): +class TestCdnProfilesOperations(AzureMgmtRecordedTestCase): def setup_method(self, method): - self.client = self.create_mgmt_client(CdnManagementClient) - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_profiles_list(self, resource_group): - response = self.client.profiles.list( - api_version="2025-06-01", - ) - result = [r for r in response] - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_profiles_list_by_resource_group(self, resource_group): - response = self.client.profiles.list_by_resource_group( - resource_group_name=resource_group.name, - api_version="2025-06-01", - ) - result = [r for r in response] - # please add some check logic here by yourself - # ... + self.client = self.create_mgmt_client(CdnClient) @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy @@ -45,7 +24,6 @@ def test_profiles_get(self, resource_group): response = self.client.profiles.get( resource_group_name=resource_group.name, profile_name="str", - api_version="2025-06-01", ) # please add some check logic here by yourself @@ -60,8 +38,6 @@ def test_profiles_begin_create(self, resource_group): profile={ "location": "str", "sku": {"name": "str"}, - "extendedProperties": {"str": "str"}, - "frontDoorId": "str", "id": "str", "identity": { "type": "str", @@ -70,16 +46,20 @@ def test_profiles_begin_create(self, resource_group): "userAssignedIdentities": {"str": {"clientId": "str", "principalId": "str"}}, }, "kind": "str", - "logScrubbing": { - "scrubbingRules": [ - {"matchVariable": "str", "selectorMatchOperator": "str", "selector": "str", "state": "str"} - ], - "state": "str", - }, "name": "str", - "originResponseTimeoutSeconds": 0, - "provisioningState": "str", - "resourceState": "str", + "properties": { + "extendedProperties": {"str": "str"}, + "frontDoorId": "str", + "logScrubbing": { + "scrubbingRules": [ + {"matchVariable": "str", "selectorMatchOperator": "str", "selector": "str", "state": "str"} + ], + "state": "str", + }, + "originResponseTimeoutSeconds": 0, + "provisioningState": "str", + "resourceState": "str", + }, "systemData": { "createdAt": "2020-02-20 00:00:00", "createdBy": "str", @@ -91,7 +71,6 @@ def test_profiles_begin_create(self, resource_group): "tags": {"str": "str"}, "type": "str", }, - api_version="2025-06-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -110,16 +89,17 @@ def test_profiles_begin_update(self, resource_group): "tenantId": "str", "userAssignedIdentities": {"str": {"clientId": "str", "principalId": "str"}}, }, - "logScrubbing": { - "scrubbingRules": [ - {"matchVariable": "str", "selectorMatchOperator": "str", "selector": "str", "state": "str"} - ], - "state": "str", + "properties": { + "logScrubbing": { + "scrubbingRules": [ + {"matchVariable": "str", "selectorMatchOperator": "str", "selector": "str", "state": "str"} + ], + "state": "str", + }, + "originResponseTimeoutSeconds": 0, }, - "originResponseTimeoutSeconds": 0, "tags": {"str": "str"}, }, - api_version="2025-06-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -131,7 +111,6 @@ def test_profiles_begin_delete(self, resource_group): response = self.client.profiles.begin_delete( resource_group_name=resource_group.name, profile_name="str", - api_version="2025-06-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -139,32 +118,19 @@ def test_profiles_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_profiles_begin_can_migrate(self, resource_group): - response = self.client.profiles.begin_can_migrate( + def test_profiles_list_by_resource_group(self, resource_group): + response = self.client.profiles.list_by_resource_group( resource_group_name=resource_group.name, - can_migrate_parameters={"classicResourceReference": {"id": "str"}}, - api_version="2025-06-01", - ).result() # call '.result()' to poll until service return final result - + ) + result = [r for r in response] # please add some check logic here by yourself # ... @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_profiles_begin_migrate(self, resource_group): - response = self.client.profiles.begin_migrate( - resource_group_name=resource_group.name, - migration_parameters={ - "classicResourceReference": {"id": "str"}, - "profileName": "str", - "sku": {"name": "str"}, - "migrationWebApplicationFirewallMappings": [ - {"migratedFrom": {"id": "str"}, "migratedTo": {"id": "str"}} - ], - }, - api_version="2025-06-01", - ).result() # call '.result()' to poll until service return final result - + def test_profiles_list(self, resource_group): + response = self.client.profiles.list() + result = [r for r in response] # please add some check logic here by yourself # ... @@ -174,7 +140,6 @@ def test_profiles_begin_migration_commit(self, resource_group): response = self.client.profiles.begin_migration_commit( resource_group_name=resource_group.name, profile_name="str", - api_version="2025-06-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -186,7 +151,6 @@ def test_profiles_generate_sso_uri(self, resource_group): response = self.client.profiles.generate_sso_uri( resource_group_name=resource_group.name, profile_name="str", - api_version="2025-06-01", ) # please add some check logic here by yourself @@ -198,7 +162,6 @@ def test_profiles_list_supported_optimization_types(self, resource_group): response = self.client.profiles.list_supported_optimization_types( resource_group_name=resource_group.name, profile_name="str", - api_version="2025-06-01", ) # please add some check logic here by yourself @@ -210,7 +173,6 @@ def test_profiles_list_resource_usage(self, resource_group): response = self.client.profiles.list_resource_usage( resource_group_name=resource_group.name, profile_name="str", - api_version="2025-06-01", ) result = [r for r in response] # please add some check logic here by yourself @@ -222,7 +184,6 @@ def test_profiles_begin_cdn_can_migrate_to_afd(self, resource_group): response = self.client.profiles.begin_cdn_can_migrate_to_afd( resource_group_name=resource_group.name, profile_name="str", - api_version="2025-06-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -238,7 +199,6 @@ def test_profiles_begin_cdn_migrate_to_afd(self, resource_group): "sku": {"name": "str"}, "migrationEndpointMappings": [{"migratedFrom": "str", "migratedTo": "str"}], }, - api_version="2025-06-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -250,7 +210,35 @@ def test_profiles_begin_migration_abort(self, resource_group): response = self.client.profiles.begin_migration_abort( resource_group_name=resource_group.name, profile_name="str", - api_version="2025-06-01", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_profiles_begin_can_migrate(self, resource_group): + response = self.client.profiles.begin_can_migrate( + resource_group_name=resource_group.name, + can_migrate_parameters={"classicResourceReference": {"id": "str"}}, + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_profiles_begin_migrate(self, resource_group): + response = self.client.profiles.begin_migrate( + resource_group_name=resource_group.name, + migration_parameters={ + "classicResourceReference": {"id": "str"}, + "profileName": "str", + "sku": {"name": "str"}, + "migrationWebApplicationFirewallMappings": [ + {"migratedFrom": {"id": "str"}, "migratedTo": {"id": "str"}} + ], + }, ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself diff --git a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_profiles_operations_async.py b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_profiles_operations_async.py similarity index 84% rename from sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_profiles_operations_async.py rename to sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_profiles_operations_async.py index adaa4d688d17..d6fb39a52fd6 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_profiles_operations_async.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_profiles_operations_async.py @@ -2,11 +2,11 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest -from azure.mgmt.cdn.aio import CdnManagementClient +from azure.mgmt.cdn.aio import CdnClient from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer from devtools_testutils.aio import recorded_by_proxy_async @@ -15,30 +15,9 @@ @pytest.mark.skip("you may need to update the auto-generated test case before run it") -class TestCdnManagementProfilesOperationsAsync(AzureMgmtRecordedTestCase): +class TestCdnProfilesOperationsAsync(AzureMgmtRecordedTestCase): def setup_method(self, method): - self.client = self.create_mgmt_client(CdnManagementClient, is_async=True) - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_profiles_list(self, resource_group): - response = self.client.profiles.list( - api_version="2025-06-01", - ) - result = [r async for r in response] - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_profiles_list_by_resource_group(self, resource_group): - response = self.client.profiles.list_by_resource_group( - resource_group_name=resource_group.name, - api_version="2025-06-01", - ) - result = [r async for r in response] - # please add some check logic here by yourself - # ... + self.client = self.create_mgmt_client(CdnClient, is_async=True) @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async @@ -46,7 +25,6 @@ async def test_profiles_get(self, resource_group): response = await self.client.profiles.get( resource_group_name=resource_group.name, profile_name="str", - api_version="2025-06-01", ) # please add some check logic here by yourself @@ -62,8 +40,6 @@ async def test_profiles_begin_create(self, resource_group): profile={ "location": "str", "sku": {"name": "str"}, - "extendedProperties": {"str": "str"}, - "frontDoorId": "str", "id": "str", "identity": { "type": "str", @@ -72,16 +48,25 @@ async def test_profiles_begin_create(self, resource_group): "userAssignedIdentities": {"str": {"clientId": "str", "principalId": "str"}}, }, "kind": "str", - "logScrubbing": { - "scrubbingRules": [ - {"matchVariable": "str", "selectorMatchOperator": "str", "selector": "str", "state": "str"} - ], - "state": "str", - }, "name": "str", - "originResponseTimeoutSeconds": 0, - "provisioningState": "str", - "resourceState": "str", + "properties": { + "extendedProperties": {"str": "str"}, + "frontDoorId": "str", + "logScrubbing": { + "scrubbingRules": [ + { + "matchVariable": "str", + "selectorMatchOperator": "str", + "selector": "str", + "state": "str", + } + ], + "state": "str", + }, + "originResponseTimeoutSeconds": 0, + "provisioningState": "str", + "resourceState": "str", + }, "systemData": { "createdAt": "2020-02-20 00:00:00", "createdBy": "str", @@ -93,7 +78,6 @@ async def test_profiles_begin_create(self, resource_group): "tags": {"str": "str"}, "type": "str", }, - api_version="2025-06-01", ) ).result() # call '.result()' to poll until service return final result @@ -114,16 +98,22 @@ async def test_profiles_begin_update(self, resource_group): "tenantId": "str", "userAssignedIdentities": {"str": {"clientId": "str", "principalId": "str"}}, }, - "logScrubbing": { - "scrubbingRules": [ - {"matchVariable": "str", "selectorMatchOperator": "str", "selector": "str", "state": "str"} - ], - "state": "str", + "properties": { + "logScrubbing": { + "scrubbingRules": [ + { + "matchVariable": "str", + "selectorMatchOperator": "str", + "selector": "str", + "state": "str", + } + ], + "state": "str", + }, + "originResponseTimeoutSeconds": 0, }, - "originResponseTimeoutSeconds": 0, "tags": {"str": "str"}, }, - api_version="2025-06-01", ) ).result() # call '.result()' to poll until service return final result @@ -137,7 +127,6 @@ async def test_profiles_begin_delete(self, resource_group): await self.client.profiles.begin_delete( resource_group_name=resource_group.name, profile_name="str", - api_version="2025-06-01", ) ).result() # call '.result()' to poll until service return final result @@ -146,36 +135,19 @@ async def test_profiles_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_profiles_begin_can_migrate(self, resource_group): - response = await ( - await self.client.profiles.begin_can_migrate( - resource_group_name=resource_group.name, - can_migrate_parameters={"classicResourceReference": {"id": "str"}}, - api_version="2025-06-01", - ) - ).result() # call '.result()' to poll until service return final result - + async def test_profiles_list_by_resource_group(self, resource_group): + response = self.client.profiles.list_by_resource_group( + resource_group_name=resource_group.name, + ) + result = [r async for r in response] # please add some check logic here by yourself # ... @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_profiles_begin_migrate(self, resource_group): - response = await ( - await self.client.profiles.begin_migrate( - resource_group_name=resource_group.name, - migration_parameters={ - "classicResourceReference": {"id": "str"}, - "profileName": "str", - "sku": {"name": "str"}, - "migrationWebApplicationFirewallMappings": [ - {"migratedFrom": {"id": "str"}, "migratedTo": {"id": "str"}} - ], - }, - api_version="2025-06-01", - ) - ).result() # call '.result()' to poll until service return final result - + async def test_profiles_list(self, resource_group): + response = self.client.profiles.list() + result = [r async for r in response] # please add some check logic here by yourself # ... @@ -186,7 +158,6 @@ async def test_profiles_begin_migration_commit(self, resource_group): await self.client.profiles.begin_migration_commit( resource_group_name=resource_group.name, profile_name="str", - api_version="2025-06-01", ) ).result() # call '.result()' to poll until service return final result @@ -199,7 +170,6 @@ async def test_profiles_generate_sso_uri(self, resource_group): response = await self.client.profiles.generate_sso_uri( resource_group_name=resource_group.name, profile_name="str", - api_version="2025-06-01", ) # please add some check logic here by yourself @@ -211,7 +181,6 @@ async def test_profiles_list_supported_optimization_types(self, resource_group): response = await self.client.profiles.list_supported_optimization_types( resource_group_name=resource_group.name, profile_name="str", - api_version="2025-06-01", ) # please add some check logic here by yourself @@ -223,7 +192,6 @@ async def test_profiles_list_resource_usage(self, resource_group): response = self.client.profiles.list_resource_usage( resource_group_name=resource_group.name, profile_name="str", - api_version="2025-06-01", ) result = [r async for r in response] # please add some check logic here by yourself @@ -236,7 +204,6 @@ async def test_profiles_begin_cdn_can_migrate_to_afd(self, resource_group): await self.client.profiles.begin_cdn_can_migrate_to_afd( resource_group_name=resource_group.name, profile_name="str", - api_version="2025-06-01", ) ).result() # call '.result()' to poll until service return final result @@ -254,7 +221,6 @@ async def test_profiles_begin_cdn_migrate_to_afd(self, resource_group): "sku": {"name": "str"}, "migrationEndpointMappings": [{"migratedFrom": "str", "migratedTo": "str"}], }, - api_version="2025-06-01", ) ).result() # call '.result()' to poll until service return final result @@ -268,7 +234,39 @@ async def test_profiles_begin_migration_abort(self, resource_group): await self.client.profiles.begin_migration_abort( resource_group_name=resource_group.name, profile_name="str", - api_version="2025-06-01", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_profiles_begin_can_migrate(self, resource_group): + response = await ( + await self.client.profiles.begin_can_migrate( + resource_group_name=resource_group.name, + can_migrate_parameters={"classicResourceReference": {"id": "str"}}, + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_profiles_begin_migrate(self, resource_group): + response = await ( + await self.client.profiles.begin_migrate( + resource_group_name=resource_group.name, + migration_parameters={ + "classicResourceReference": {"id": "str"}, + "profileName": "str", + "sku": {"name": "str"}, + "migrationWebApplicationFirewallMappings": [ + {"migratedFrom": {"id": "str"}, "migratedTo": {"id": "str"}} + ], + }, ) ).result() # call '.result()' to poll until service return final result diff --git a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_resource_usage_operations.py b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_resource_usage_operations.py similarity index 72% rename from sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_resource_usage_operations.py rename to sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_resource_usage_operations.py index 0b75189e5138..515c7cd9c6c7 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_resource_usage_operations.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_resource_usage_operations.py @@ -2,11 +2,11 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy @@ -14,16 +14,14 @@ @pytest.mark.skip("you may need to update the auto-generated test case before run it") -class TestCdnManagementResourceUsageOperations(AzureMgmtRecordedTestCase): +class TestCdnResourceUsageOperations(AzureMgmtRecordedTestCase): def setup_method(self, method): - self.client = self.create_mgmt_client(CdnManagementClient) + self.client = self.create_mgmt_client(CdnClient) @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_resource_usage_list(self, resource_group): - response = self.client.resource_usage.list( - api_version="2025-06-01", - ) + response = self.client.resource_usage.list() result = [r for r in response] # please add some check logic here by yourself # ... diff --git a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_resource_usage_operations_async.py b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_resource_usage_operations_async.py similarity index 72% rename from sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_resource_usage_operations_async.py rename to sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_resource_usage_operations_async.py index 694143a334f6..484b22d07dee 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_resource_usage_operations_async.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_resource_usage_operations_async.py @@ -2,11 +2,11 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest -from azure.mgmt.cdn.aio import CdnManagementClient +from azure.mgmt.cdn.aio import CdnClient from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer from devtools_testutils.aio import recorded_by_proxy_async @@ -15,16 +15,14 @@ @pytest.mark.skip("you may need to update the auto-generated test case before run it") -class TestCdnManagementResourceUsageOperationsAsync(AzureMgmtRecordedTestCase): +class TestCdnResourceUsageOperationsAsync(AzureMgmtRecordedTestCase): def setup_method(self, method): - self.client = self.create_mgmt_client(CdnManagementClient, is_async=True) + self.client = self.create_mgmt_client(CdnClient, is_async=True) @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_resource_usage_list(self, resource_group): - response = self.client.resource_usage.list( - api_version="2025-06-01", - ) + response = self.client.resource_usage.list() result = [r async for r in response] # please add some check logic here by yourself # ... diff --git a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_routes_operations.py b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_routes_operations.py similarity index 63% rename from sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_routes_operations.py rename to sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_routes_operations.py index fa71dfbfc529..22d0ee20a03d 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_routes_operations.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_routes_operations.py @@ -2,11 +2,11 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy @@ -14,22 +14,9 @@ @pytest.mark.skip("you may need to update the auto-generated test case before run it") -class TestCdnManagementRoutesOperations(AzureMgmtRecordedTestCase): +class TestCdnRoutesOperations(AzureMgmtRecordedTestCase): def setup_method(self, method): - self.client = self.create_mgmt_client(CdnManagementClient) - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_routes_list_by_endpoint(self, resource_group): - response = self.client.routes.list_by_endpoint( - resource_group_name=resource_group.name, - profile_name="str", - endpoint_name="str", - api_version="2025-06-01", - ) - result = [r for r in response] - # please add some check logic here by yourself - # ... + self.client = self.create_mgmt_client(CdnClient) @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy @@ -39,7 +26,6 @@ def test_routes_get(self, resource_group): profile_name="str", endpoint_name="str", route_name="str", - api_version="2025-06-01", ) # please add some check logic here by yourself @@ -54,26 +40,28 @@ def test_routes_begin_create(self, resource_group): endpoint_name="str", route_name="str", route={ - "cacheConfiguration": { - "compressionSettings": {"contentTypesToCompress": ["str"], "isCompressionEnabled": bool}, - "queryParameters": "str", - "queryStringCachingBehavior": "str", - }, - "customDomains": [{"id": "str", "isActive": bool}], - "deploymentStatus": "str", - "enabledState": "str", - "endpointName": "str", - "forwardingProtocol": "str", - "httpsRedirect": "Disabled", "id": "str", - "linkToDefaultDomain": "Disabled", "name": "str", - "originGroup": {"id": "str"}, - "originPath": "str", - "patternsToMatch": ["str"], - "provisioningState": "str", - "ruleSets": [{"id": "str"}], - "supportedProtocols": [["Http", "Https"]], + "properties": { + "cacheConfiguration": { + "compressionSettings": {"contentTypesToCompress": ["str"], "isCompressionEnabled": bool}, + "queryParameters": "str", + "queryStringCachingBehavior": "str", + }, + "customDomains": [{"id": "str", "isActive": bool}], + "deploymentStatus": "str", + "enabledState": "str", + "endpointName": "str", + "forwardingProtocol": "str", + "httpsRedirect": "str", + "linkToDefaultDomain": "str", + "originGroup": {"id": "str"}, + "originPath": "str", + "patternsToMatch": ["str"], + "provisioningState": "str", + "ruleSets": [{"id": "str"}], + "supportedProtocols": ["str"], + }, "systemData": { "createdAt": "2020-02-20 00:00:00", "createdBy": "str", @@ -84,7 +72,6 @@ def test_routes_begin_create(self, resource_group): }, "type": "str", }, - api_version="2025-06-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -99,24 +86,25 @@ def test_routes_begin_update(self, resource_group): endpoint_name="str", route_name="str", route_update_properties={ - "cacheConfiguration": { - "compressionSettings": {"contentTypesToCompress": ["str"], "isCompressionEnabled": bool}, - "queryParameters": "str", - "queryStringCachingBehavior": "str", - }, - "customDomains": [{"id": "str", "isActive": bool}], - "enabledState": "str", - "endpointName": "str", - "forwardingProtocol": "str", - "httpsRedirect": "Disabled", - "linkToDefaultDomain": "Disabled", - "originGroup": {"id": "str"}, - "originPath": "str", - "patternsToMatch": ["str"], - "ruleSets": [{"id": "str"}], - "supportedProtocols": [["Http", "Https"]], + "properties": { + "cacheConfiguration": { + "compressionSettings": {"contentTypesToCompress": ["str"], "isCompressionEnabled": bool}, + "queryParameters": "str", + "queryStringCachingBehavior": "str", + }, + "customDomains": [{"id": "str", "isActive": bool}], + "enabledState": "str", + "endpointName": "str", + "forwardingProtocol": "str", + "httpsRedirect": "str", + "linkToDefaultDomain": "str", + "originGroup": {"id": "str"}, + "originPath": "str", + "patternsToMatch": ["str"], + "ruleSets": [{"id": "str"}], + "supportedProtocols": ["str"], + } }, - api_version="2025-06-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -130,8 +118,19 @@ def test_routes_begin_delete(self, resource_group): profile_name="str", endpoint_name="str", route_name="str", - api_version="2025-06-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_routes_list_by_endpoint(self, resource_group): + response = self.client.routes.list_by_endpoint( + resource_group_name=resource_group.name, + profile_name="str", + endpoint_name="str", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_routes_operations_async.py b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_routes_operations_async.py similarity index 63% rename from sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_routes_operations_async.py rename to sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_routes_operations_async.py index d3f351d79914..8b380e7d7527 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_routes_operations_async.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_routes_operations_async.py @@ -2,11 +2,11 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest -from azure.mgmt.cdn.aio import CdnManagementClient +from azure.mgmt.cdn.aio import CdnClient from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer from devtools_testutils.aio import recorded_by_proxy_async @@ -15,22 +15,9 @@ @pytest.mark.skip("you may need to update the auto-generated test case before run it") -class TestCdnManagementRoutesOperationsAsync(AzureMgmtRecordedTestCase): +class TestCdnRoutesOperationsAsync(AzureMgmtRecordedTestCase): def setup_method(self, method): - self.client = self.create_mgmt_client(CdnManagementClient, is_async=True) - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_routes_list_by_endpoint(self, resource_group): - response = self.client.routes.list_by_endpoint( - resource_group_name=resource_group.name, - profile_name="str", - endpoint_name="str", - api_version="2025-06-01", - ) - result = [r async for r in response] - # please add some check logic here by yourself - # ... + self.client = self.create_mgmt_client(CdnClient, is_async=True) @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async @@ -40,7 +27,6 @@ async def test_routes_get(self, resource_group): profile_name="str", endpoint_name="str", route_name="str", - api_version="2025-06-01", ) # please add some check logic here by yourself @@ -56,26 +42,28 @@ async def test_routes_begin_create(self, resource_group): endpoint_name="str", route_name="str", route={ - "cacheConfiguration": { - "compressionSettings": {"contentTypesToCompress": ["str"], "isCompressionEnabled": bool}, - "queryParameters": "str", - "queryStringCachingBehavior": "str", - }, - "customDomains": [{"id": "str", "isActive": bool}], - "deploymentStatus": "str", - "enabledState": "str", - "endpointName": "str", - "forwardingProtocol": "str", - "httpsRedirect": "Disabled", "id": "str", - "linkToDefaultDomain": "Disabled", "name": "str", - "originGroup": {"id": "str"}, - "originPath": "str", - "patternsToMatch": ["str"], - "provisioningState": "str", - "ruleSets": [{"id": "str"}], - "supportedProtocols": [["Http", "Https"]], + "properties": { + "cacheConfiguration": { + "compressionSettings": {"contentTypesToCompress": ["str"], "isCompressionEnabled": bool}, + "queryParameters": "str", + "queryStringCachingBehavior": "str", + }, + "customDomains": [{"id": "str", "isActive": bool}], + "deploymentStatus": "str", + "enabledState": "str", + "endpointName": "str", + "forwardingProtocol": "str", + "httpsRedirect": "str", + "linkToDefaultDomain": "str", + "originGroup": {"id": "str"}, + "originPath": "str", + "patternsToMatch": ["str"], + "provisioningState": "str", + "ruleSets": [{"id": "str"}], + "supportedProtocols": ["str"], + }, "systemData": { "createdAt": "2020-02-20 00:00:00", "createdBy": "str", @@ -86,7 +74,6 @@ async def test_routes_begin_create(self, resource_group): }, "type": "str", }, - api_version="2025-06-01", ) ).result() # call '.result()' to poll until service return final result @@ -103,24 +90,25 @@ async def test_routes_begin_update(self, resource_group): endpoint_name="str", route_name="str", route_update_properties={ - "cacheConfiguration": { - "compressionSettings": {"contentTypesToCompress": ["str"], "isCompressionEnabled": bool}, - "queryParameters": "str", - "queryStringCachingBehavior": "str", - }, - "customDomains": [{"id": "str", "isActive": bool}], - "enabledState": "str", - "endpointName": "str", - "forwardingProtocol": "str", - "httpsRedirect": "Disabled", - "linkToDefaultDomain": "Disabled", - "originGroup": {"id": "str"}, - "originPath": "str", - "patternsToMatch": ["str"], - "ruleSets": [{"id": "str"}], - "supportedProtocols": [["Http", "Https"]], + "properties": { + "cacheConfiguration": { + "compressionSettings": {"contentTypesToCompress": ["str"], "isCompressionEnabled": bool}, + "queryParameters": "str", + "queryStringCachingBehavior": "str", + }, + "customDomains": [{"id": "str", "isActive": bool}], + "enabledState": "str", + "endpointName": "str", + "forwardingProtocol": "str", + "httpsRedirect": "str", + "linkToDefaultDomain": "str", + "originGroup": {"id": "str"}, + "originPath": "str", + "patternsToMatch": ["str"], + "ruleSets": [{"id": "str"}], + "supportedProtocols": ["str"], + } }, - api_version="2025-06-01", ) ).result() # call '.result()' to poll until service return final result @@ -136,9 +124,20 @@ async def test_routes_begin_delete(self, resource_group): profile_name="str", endpoint_name="str", route_name="str", - api_version="2025-06-01", ) ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_routes_list_by_endpoint(self, resource_group): + response = self.client.routes.list_by_endpoint( + resource_group_name=resource_group.name, + profile_name="str", + endpoint_name="str", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_rule_sets_operations.py b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_rule_sets_operations.py similarity index 86% rename from sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_rule_sets_operations.py rename to sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_rule_sets_operations.py index b343f15529aa..5c857e00ae54 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_rule_sets_operations.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_rule_sets_operations.py @@ -2,11 +2,11 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy @@ -14,21 +14,9 @@ @pytest.mark.skip("you may need to update the auto-generated test case before run it") -class TestCdnManagementRuleSetsOperations(AzureMgmtRecordedTestCase): +class TestCdnRuleSetsOperations(AzureMgmtRecordedTestCase): def setup_method(self, method): - self.client = self.create_mgmt_client(CdnManagementClient) - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_rule_sets_list_by_profile(self, resource_group): - response = self.client.rule_sets.list_by_profile( - resource_group_name=resource_group.name, - profile_name="str", - api_version="2025-06-01", - ) - result = [r for r in response] - # please add some check logic here by yourself - # ... + self.client = self.create_mgmt_client(CdnClient) @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy @@ -37,7 +25,6 @@ def test_rule_sets_get(self, resource_group): resource_group_name=resource_group.name, profile_name="str", rule_set_name="str", - api_version="2025-06-01", ) # please add some check logic here by yourself @@ -50,7 +37,6 @@ def test_rule_sets_create(self, resource_group): resource_group_name=resource_group.name, profile_name="str", rule_set_name="str", - api_version="2025-06-01", ) # please add some check logic here by yourself @@ -63,12 +49,22 @@ def test_rule_sets_begin_delete(self, resource_group): resource_group_name=resource_group.name, profile_name="str", rule_set_name="str", - api_version="2025-06-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_rule_sets_list_by_profile(self, resource_group): + response = self.client.rule_sets.list_by_profile( + resource_group_name=resource_group.name, + profile_name="str", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_rule_sets_list_resource_usage(self, resource_group): @@ -76,7 +72,6 @@ def test_rule_sets_list_resource_usage(self, resource_group): resource_group_name=resource_group.name, profile_name="str", rule_set_name="str", - api_version="2025-06-01", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_rule_sets_operations_async.py b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_rule_sets_operations_async.py similarity index 86% rename from sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_rule_sets_operations_async.py rename to sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_rule_sets_operations_async.py index 368773723d54..08b4f51ea294 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_rule_sets_operations_async.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_rule_sets_operations_async.py @@ -2,11 +2,11 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest -from azure.mgmt.cdn.aio import CdnManagementClient +from azure.mgmt.cdn.aio import CdnClient from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer from devtools_testutils.aio import recorded_by_proxy_async @@ -15,21 +15,9 @@ @pytest.mark.skip("you may need to update the auto-generated test case before run it") -class TestCdnManagementRuleSetsOperationsAsync(AzureMgmtRecordedTestCase): +class TestCdnRuleSetsOperationsAsync(AzureMgmtRecordedTestCase): def setup_method(self, method): - self.client = self.create_mgmt_client(CdnManagementClient, is_async=True) - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_rule_sets_list_by_profile(self, resource_group): - response = self.client.rule_sets.list_by_profile( - resource_group_name=resource_group.name, - profile_name="str", - api_version="2025-06-01", - ) - result = [r async for r in response] - # please add some check logic here by yourself - # ... + self.client = self.create_mgmt_client(CdnClient, is_async=True) @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async @@ -38,7 +26,6 @@ async def test_rule_sets_get(self, resource_group): resource_group_name=resource_group.name, profile_name="str", rule_set_name="str", - api_version="2025-06-01", ) # please add some check logic here by yourself @@ -51,7 +38,6 @@ async def test_rule_sets_create(self, resource_group): resource_group_name=resource_group.name, profile_name="str", rule_set_name="str", - api_version="2025-06-01", ) # please add some check logic here by yourself @@ -65,13 +51,23 @@ async def test_rule_sets_begin_delete(self, resource_group): resource_group_name=resource_group.name, profile_name="str", rule_set_name="str", - api_version="2025-06-01", ) ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_rule_sets_list_by_profile(self, resource_group): + response = self.client.rule_sets.list_by_profile( + resource_group_name=resource_group.name, + profile_name="str", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_rule_sets_list_resource_usage(self, resource_group): @@ -79,7 +75,6 @@ async def test_rule_sets_list_resource_usage(self, resource_group): resource_group_name=resource_group.name, profile_name="str", rule_set_name="str", - api_version="2025-06-01", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_rules_operations.py b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_rules_operations.py similarity index 78% rename from sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_rules_operations.py rename to sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_rules_operations.py index 1c2ebdae8415..af3713f59666 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_rules_operations.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_rules_operations.py @@ -2,11 +2,11 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy @@ -14,22 +14,9 @@ @pytest.mark.skip("you may need to update the auto-generated test case before run it") -class TestCdnManagementRulesOperations(AzureMgmtRecordedTestCase): +class TestCdnRulesOperations(AzureMgmtRecordedTestCase): def setup_method(self, method): - self.client = self.create_mgmt_client(CdnManagementClient) - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_rules_list_by_rule_set(self, resource_group): - response = self.client.rules.list_by_rule_set( - resource_group_name=resource_group.name, - profile_name="str", - rule_set_name="str", - api_version="2025-06-01", - ) - result = [r for r in response] - # please add some check logic here by yourself - # ... + self.client = self.create_mgmt_client(CdnClient) @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy @@ -39,7 +26,6 @@ def test_rules_get(self, resource_group): profile_name="str", rule_set_name="str", rule_name="str", - api_version="2025-06-01", ) # please add some check logic here by yourself @@ -54,15 +40,17 @@ def test_rules_begin_create(self, resource_group): rule_set_name="str", rule_name="str", rule={ - "actions": ["delivery_rule_action"], - "conditions": ["delivery_rule_condition"], - "deploymentStatus": "str", "id": "str", - "matchProcessingBehavior": "Continue", "name": "str", - "order": 0, - "provisioningState": "str", - "ruleSetName": "str", + "properties": { + "actions": ["delivery_rule_action"], + "conditions": ["delivery_rule_condition"], + "deploymentStatus": "str", + "matchProcessingBehavior": "str", + "order": 0, + "provisioningState": "str", + "ruleSetName": "str", + }, "systemData": { "createdAt": "2020-02-20 00:00:00", "createdBy": "str", @@ -73,7 +61,6 @@ def test_rules_begin_create(self, resource_group): }, "type": "str", }, - api_version="2025-06-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -88,13 +75,14 @@ def test_rules_begin_update(self, resource_group): rule_set_name="str", rule_name="str", rule_update_properties={ - "actions": ["delivery_rule_action"], - "conditions": ["delivery_rule_condition"], - "matchProcessingBehavior": "Continue", - "order": 0, - "ruleSetName": "str", + "properties": { + "actions": ["delivery_rule_action"], + "conditions": ["delivery_rule_condition"], + "matchProcessingBehavior": "str", + "order": 0, + "ruleSetName": "str", + } }, - api_version="2025-06-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -108,8 +96,19 @@ def test_rules_begin_delete(self, resource_group): profile_name="str", rule_set_name="str", rule_name="str", - api_version="2025-06-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_rules_list_by_rule_set(self, resource_group): + response = self.client.rules.list_by_rule_set( + resource_group_name=resource_group.name, + profile_name="str", + rule_set_name="str", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_rules_operations_async.py b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_rules_operations_async.py similarity index 78% rename from sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_rules_operations_async.py rename to sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_rules_operations_async.py index ed1917a6e596..7ee4b9145bbd 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_rules_operations_async.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_rules_operations_async.py @@ -2,11 +2,11 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest -from azure.mgmt.cdn.aio import CdnManagementClient +from azure.mgmt.cdn.aio import CdnClient from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer from devtools_testutils.aio import recorded_by_proxy_async @@ -15,22 +15,9 @@ @pytest.mark.skip("you may need to update the auto-generated test case before run it") -class TestCdnManagementRulesOperationsAsync(AzureMgmtRecordedTestCase): +class TestCdnRulesOperationsAsync(AzureMgmtRecordedTestCase): def setup_method(self, method): - self.client = self.create_mgmt_client(CdnManagementClient, is_async=True) - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_rules_list_by_rule_set(self, resource_group): - response = self.client.rules.list_by_rule_set( - resource_group_name=resource_group.name, - profile_name="str", - rule_set_name="str", - api_version="2025-06-01", - ) - result = [r async for r in response] - # please add some check logic here by yourself - # ... + self.client = self.create_mgmt_client(CdnClient, is_async=True) @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async @@ -40,7 +27,6 @@ async def test_rules_get(self, resource_group): profile_name="str", rule_set_name="str", rule_name="str", - api_version="2025-06-01", ) # please add some check logic here by yourself @@ -56,15 +42,17 @@ async def test_rules_begin_create(self, resource_group): rule_set_name="str", rule_name="str", rule={ - "actions": ["delivery_rule_action"], - "conditions": ["delivery_rule_condition"], - "deploymentStatus": "str", "id": "str", - "matchProcessingBehavior": "Continue", "name": "str", - "order": 0, - "provisioningState": "str", - "ruleSetName": "str", + "properties": { + "actions": ["delivery_rule_action"], + "conditions": ["delivery_rule_condition"], + "deploymentStatus": "str", + "matchProcessingBehavior": "str", + "order": 0, + "provisioningState": "str", + "ruleSetName": "str", + }, "systemData": { "createdAt": "2020-02-20 00:00:00", "createdBy": "str", @@ -75,7 +63,6 @@ async def test_rules_begin_create(self, resource_group): }, "type": "str", }, - api_version="2025-06-01", ) ).result() # call '.result()' to poll until service return final result @@ -92,13 +79,14 @@ async def test_rules_begin_update(self, resource_group): rule_set_name="str", rule_name="str", rule_update_properties={ - "actions": ["delivery_rule_action"], - "conditions": ["delivery_rule_condition"], - "matchProcessingBehavior": "Continue", - "order": 0, - "ruleSetName": "str", + "properties": { + "actions": ["delivery_rule_action"], + "conditions": ["delivery_rule_condition"], + "matchProcessingBehavior": "str", + "order": 0, + "ruleSetName": "str", + } }, - api_version="2025-06-01", ) ).result() # call '.result()' to poll until service return final result @@ -114,9 +102,20 @@ async def test_rules_begin_delete(self, resource_group): profile_name="str", rule_set_name="str", rule_name="str", - api_version="2025-06-01", ) ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_rules_list_by_rule_set(self, resource_group): + response = self.client.rules.list_by_rule_set( + resource_group_name=resource_group.name, + profile_name="str", + rule_set_name="str", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_secrets_operations.py b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_secrets_operations.py similarity index 83% rename from sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_secrets_operations.py rename to sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_secrets_operations.py index 5e01f843748b..3c6e255cf582 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_secrets_operations.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_secrets_operations.py @@ -2,11 +2,11 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy @@ -14,21 +14,9 @@ @pytest.mark.skip("you may need to update the auto-generated test case before run it") -class TestCdnManagementSecretsOperations(AzureMgmtRecordedTestCase): +class TestCdnSecretsOperations(AzureMgmtRecordedTestCase): def setup_method(self, method): - self.client = self.create_mgmt_client(CdnManagementClient) - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_secrets_list_by_profile(self, resource_group): - response = self.client.secrets.list_by_profile( - resource_group_name=resource_group.name, - profile_name="str", - api_version="2025-06-01", - ) - result = [r for r in response] - # please add some check logic here by yourself - # ... + self.client = self.create_mgmt_client(CdnClient) @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy @@ -37,7 +25,6 @@ def test_secrets_get(self, resource_group): resource_group_name=resource_group.name, profile_name="str", secret_name="str", - api_version="2025-06-01", ) # please add some check logic here by yourself @@ -51,12 +38,14 @@ def test_secrets_begin_create(self, resource_group): profile_name="str", secret_name="str", secret={ - "deploymentStatus": "str", "id": "str", "name": "str", - "parameters": "secret_parameters", - "profileName": "str", - "provisioningState": "str", + "properties": { + "deploymentStatus": "str", + "parameters": "secret_parameters", + "profileName": "str", + "provisioningState": "str", + }, "systemData": { "createdAt": "2020-02-20 00:00:00", "createdBy": "str", @@ -67,7 +56,6 @@ def test_secrets_begin_create(self, resource_group): }, "type": "str", }, - api_version="2025-06-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -80,8 +68,18 @@ def test_secrets_begin_delete(self, resource_group): resource_group_name=resource_group.name, profile_name="str", secret_name="str", - api_version="2025-06-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_secrets_list_by_profile(self, resource_group): + response = self.client.secrets.list_by_profile( + resource_group_name=resource_group.name, + profile_name="str", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_secrets_operations_async.py b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_secrets_operations_async.py similarity index 83% rename from sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_secrets_operations_async.py rename to sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_secrets_operations_async.py index e2e7b45e418e..161d8e696581 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_secrets_operations_async.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_secrets_operations_async.py @@ -2,11 +2,11 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest -from azure.mgmt.cdn.aio import CdnManagementClient +from azure.mgmt.cdn.aio import CdnClient from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer from devtools_testutils.aio import recorded_by_proxy_async @@ -15,21 +15,9 @@ @pytest.mark.skip("you may need to update the auto-generated test case before run it") -class TestCdnManagementSecretsOperationsAsync(AzureMgmtRecordedTestCase): +class TestCdnSecretsOperationsAsync(AzureMgmtRecordedTestCase): def setup_method(self, method): - self.client = self.create_mgmt_client(CdnManagementClient, is_async=True) - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_secrets_list_by_profile(self, resource_group): - response = self.client.secrets.list_by_profile( - resource_group_name=resource_group.name, - profile_name="str", - api_version="2025-06-01", - ) - result = [r async for r in response] - # please add some check logic here by yourself - # ... + self.client = self.create_mgmt_client(CdnClient, is_async=True) @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async @@ -38,7 +26,6 @@ async def test_secrets_get(self, resource_group): resource_group_name=resource_group.name, profile_name="str", secret_name="str", - api_version="2025-06-01", ) # please add some check logic here by yourself @@ -53,12 +40,14 @@ async def test_secrets_begin_create(self, resource_group): profile_name="str", secret_name="str", secret={ - "deploymentStatus": "str", "id": "str", "name": "str", - "parameters": "secret_parameters", - "profileName": "str", - "provisioningState": "str", + "properties": { + "deploymentStatus": "str", + "parameters": "secret_parameters", + "profileName": "str", + "provisioningState": "str", + }, "systemData": { "createdAt": "2020-02-20 00:00:00", "createdBy": "str", @@ -69,7 +58,6 @@ async def test_secrets_begin_create(self, resource_group): }, "type": "str", }, - api_version="2025-06-01", ) ).result() # call '.result()' to poll until service return final result @@ -84,9 +72,19 @@ async def test_secrets_begin_delete(self, resource_group): resource_group_name=resource_group.name, profile_name="str", secret_name="str", - api_version="2025-06-01", ) ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_secrets_list_by_profile(self, resource_group): + response = self.client.secrets.list_by_profile( + resource_group_name=resource_group.name, + profile_name="str", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_security_policies_operations.py b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_security_policies_operations.py similarity index 82% rename from sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_security_policies_operations.py rename to sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_security_policies_operations.py index b34dad21f126..034eb6bde995 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_security_policies_operations.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_security_policies_operations.py @@ -2,11 +2,11 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest -from azure.mgmt.cdn import CdnManagementClient +from azure.mgmt.cdn import CdnClient from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy @@ -14,21 +14,9 @@ @pytest.mark.skip("you may need to update the auto-generated test case before run it") -class TestCdnManagementSecurityPoliciesOperations(AzureMgmtRecordedTestCase): +class TestCdnSecurityPoliciesOperations(AzureMgmtRecordedTestCase): def setup_method(self, method): - self.client = self.create_mgmt_client(CdnManagementClient) - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_security_policies_list_by_profile(self, resource_group): - response = self.client.security_policies.list_by_profile( - resource_group_name=resource_group.name, - profile_name="str", - api_version="2025-06-01", - ) - result = [r for r in response] - # please add some check logic here by yourself - # ... + self.client = self.create_mgmt_client(CdnClient) @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy @@ -37,7 +25,6 @@ def test_security_policies_get(self, resource_group): resource_group_name=resource_group.name, profile_name="str", security_policy_name="str", - api_version="2025-06-01", ) # please add some check logic here by yourself @@ -51,12 +38,14 @@ def test_security_policies_begin_create(self, resource_group): profile_name="str", security_policy_name="str", security_policy={ - "deploymentStatus": "str", "id": "str", "name": "str", - "parameters": "security_policy_properties_parameters", - "profileName": "str", - "provisioningState": "str", + "properties": { + "deploymentStatus": "str", + "parameters": "security_policy_properties_parameters", + "profileName": "str", + "provisioningState": "str", + }, "systemData": { "createdAt": "2020-02-20 00:00:00", "createdBy": "str", @@ -67,7 +56,6 @@ def test_security_policies_begin_create(self, resource_group): }, "type": "str", }, - api_version="2025-06-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -80,8 +68,7 @@ def test_security_policies_begin_patch(self, resource_group): resource_group_name=resource_group.name, profile_name="str", security_policy_name="str", - security_policy_update_properties={"parameters": "security_policy_properties_parameters"}, - api_version="2025-06-01", + security_policy_update_properties={"properties": {"parameters": "security_policy_properties_parameters"}}, ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -94,8 +81,18 @@ def test_security_policies_begin_delete(self, resource_group): resource_group_name=resource_group.name, profile_name="str", security_policy_name="str", - api_version="2025-06-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_security_policies_list_by_profile(self, resource_group): + response = self.client.security_policies.list_by_profile( + resource_group_name=resource_group.name, + profile_name="str", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_security_policies_operations_async.py b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_security_policies_operations_async.py similarity index 82% rename from sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_security_policies_operations_async.py rename to sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_security_policies_operations_async.py index a56bf2f30e9b..21aac09414e8 100644 --- a/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_management_security_policies_operations_async.py +++ b/sdk/cdn/azure-mgmt-cdn/generated_tests/test_cdn_security_policies_operations_async.py @@ -2,11 +2,11 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest -from azure.mgmt.cdn.aio import CdnManagementClient +from azure.mgmt.cdn.aio import CdnClient from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer from devtools_testutils.aio import recorded_by_proxy_async @@ -15,21 +15,9 @@ @pytest.mark.skip("you may need to update the auto-generated test case before run it") -class TestCdnManagementSecurityPoliciesOperationsAsync(AzureMgmtRecordedTestCase): +class TestCdnSecurityPoliciesOperationsAsync(AzureMgmtRecordedTestCase): def setup_method(self, method): - self.client = self.create_mgmt_client(CdnManagementClient, is_async=True) - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_security_policies_list_by_profile(self, resource_group): - response = self.client.security_policies.list_by_profile( - resource_group_name=resource_group.name, - profile_name="str", - api_version="2025-06-01", - ) - result = [r async for r in response] - # please add some check logic here by yourself - # ... + self.client = self.create_mgmt_client(CdnClient, is_async=True) @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async @@ -38,7 +26,6 @@ async def test_security_policies_get(self, resource_group): resource_group_name=resource_group.name, profile_name="str", security_policy_name="str", - api_version="2025-06-01", ) # please add some check logic here by yourself @@ -53,12 +40,14 @@ async def test_security_policies_begin_create(self, resource_group): profile_name="str", security_policy_name="str", security_policy={ - "deploymentStatus": "str", "id": "str", "name": "str", - "parameters": "security_policy_properties_parameters", - "profileName": "str", - "provisioningState": "str", + "properties": { + "deploymentStatus": "str", + "parameters": "security_policy_properties_parameters", + "profileName": "str", + "provisioningState": "str", + }, "systemData": { "createdAt": "2020-02-20 00:00:00", "createdBy": "str", @@ -69,7 +58,6 @@ async def test_security_policies_begin_create(self, resource_group): }, "type": "str", }, - api_version="2025-06-01", ) ).result() # call '.result()' to poll until service return final result @@ -84,8 +72,9 @@ async def test_security_policies_begin_patch(self, resource_group): resource_group_name=resource_group.name, profile_name="str", security_policy_name="str", - security_policy_update_properties={"parameters": "security_policy_properties_parameters"}, - api_version="2025-06-01", + security_policy_update_properties={ + "properties": {"parameters": "security_policy_properties_parameters"} + }, ) ).result() # call '.result()' to poll until service return final result @@ -100,9 +89,19 @@ async def test_security_policies_begin_delete(self, resource_group): resource_group_name=resource_group.name, profile_name="str", security_policy_name="str", - api_version="2025-06-01", ) ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_security_policies_list_by_profile(self, resource_group): + response = self.client.security_policies.list_by_profile( + resource_group_name=resource_group.name, + profile_name="str", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/cdn/azure-mgmt-cdn/pyproject.toml b/sdk/cdn/azure-mgmt-cdn/pyproject.toml index f9e843d801e4..aa8b0fa711d1 100644 --- a/sdk/cdn/azure-mgmt-cdn/pyproject.toml +++ b/sdk/cdn/azure-mgmt-cdn/pyproject.toml @@ -17,13 +17,12 @@ classifiers = [ "Programming Language :: Python", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", ] -requires-python = ">=3.9" +requires-python = ">=3.10" keywords = [ "azure", "azure sdk", diff --git a/sdk/cdn/azure-mgmt-cdn/tests/conftest.py b/sdk/cdn/azure-mgmt-cdn/tests/conftest.py index e7981d635f56..8c0bebb9a45c 100644 --- a/sdk/cdn/azure-mgmt-cdn/tests/conftest.py +++ b/sdk/cdn/azure-mgmt-cdn/tests/conftest.py @@ -40,6 +40,7 @@ load_dotenv() + @pytest.fixture(scope="session", autouse=True) def add_sanitizers(test_proxy): subscription_id = os.environ.get("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") @@ -52,4 +53,4 @@ def add_sanitizers(test_proxy): add_general_regex_sanitizer(regex=client_secret, value="00000000-0000-0000-0000-000000000000") add_header_regex_sanitizer(key="Set-Cookie", value="[set-cookie;]") add_header_regex_sanitizer(key="Cookie", value="cookie;") - add_body_key_sanitizer(json_path="$..access_token", value="access_token") \ No newline at end of file + add_body_key_sanitizer(json_path="$..access_token", value="access_token") diff --git a/sdk/cdn/azure-mgmt-cdn/tests/disable_test_cli_mgmt_cdn.py b/sdk/cdn/azure-mgmt-cdn/tests/disable_test_cli_mgmt_cdn.py index afc378569c94..393ce398225f 100644 --- a/sdk/cdn/azure-mgmt-cdn/tests/disable_test_cli_mgmt_cdn.py +++ b/sdk/cdn/azure-mgmt-cdn/tests/disable_test_cli_mgmt_cdn.py @@ -1,10 +1,11 @@ +# pylint: disable=line-too-long,useless-suppression # coding: utf-8 -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- # TEST SCENARIO COVERAGE @@ -22,15 +23,14 @@ import azure.mgmt.cdn from devtools_testutils import AzureMgmtRecordedTestCase, ResourceGroupPreparer, recorded_by_proxy -AZURE_LOCATION = 'eastus' +AZURE_LOCATION = "eastus" + class TestMgmtCdn(AzureMgmtRecordedTestCase): def setup_method(self, method): - self.mgmt_client = self.create_mgmt_client( - azure.mgmt.cdn.CdnManagementClient - ) - + self.mgmt_client = self.create_mgmt_client(azure.mgmt.cdn.CdnManagementClient) + @ResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_cdn(self, resource_group): @@ -48,12 +48,7 @@ def test_cdn(self, resource_group): ORIGIN_NAME = "origin1" # Profiles_Create[put] - BODY = { - "location": "WestUs", - "sku": { - "name": "Standard_Verizon" - } - } + BODY = {"location": "WestUs", "sku": {"name": "Standard_Verizon"}} result = self.mgmt_client.profiles.begin_create(resource_group.name, PROFILE_NAME, BODY) result = result.result() @@ -169,81 +164,71 @@ def test_cdn(self, resource_group): # Endpoints_Create[put] BODY = { - "origin_host_header": "www.bing.com", - "origin_path": "/image", - "content_types_to_compress": [ - "text/html", - "application/octet-stream" - ], - "is_compression_enabled": True, - "is_http_allowed": True, - "is_https_allowed": True, - "query_string_caching_behavior": "BypassCaching", - # "delivery_policy": { - # "description": "Test description for a policy.", - # "rules": [ - # { - # "name": "rule1", - # "order": "1", - # "conditions": [ - # { - # "name": "RemoteAddress", - # "parameters": { - # "operator": "IPMatch", - # "negate_condition": True, - # "match_values": [ - # "192.168.1.0/24", - # "10.0.0.0/24" - # ], - # "@odata.type": "#Microsoft.Azure.Cdn.Models.DeliveryRuleRemoteAddressConditionParameters" - # } - # } - # ], - # "actions": [ - # { - # "name": "CacheExpiration", - # "parameters": { - # "cache_behavior": "Override", - # "cache_duration": "10:10:09", - # "@odata.type": "#Microsoft.Azure.Cdn.Models.DeliveryRuleCacheExpirationActionParameters", - # "cache_type": "All" - # } - # }, - # { - # "name": "ModifyResponseHeader", - # "parameters": { - # "header_action": "Overwrite", - # "header_name": "Access-Control-Allow-Origin", - # "value": "*", - # "@odata.type": "#Microsoft.Azure.Cdn.Models.DeliveryRuleHeaderActionParameters" - # } - # }, - # { - # "name": "ModifyRequestHeader", - # "parameters": { - # "header_action": "Overwrite", - # "header_name": "Accept-Encoding", - # "value": "gzip", - # "@odata.type": "#Microsoft.Azure.Cdn.Models.DeliveryRuleHeaderActionParameters" - # } - # } - # ] - # } - # ] - # }, - "origins": [ - { - "name": "origin1", - "host_name": "host1.hello.com" - } - ], - # "web_application_firewall_policy_link": { - # "id": "/subscriptions/" + SUBSCRIPTION_ID + "/resourceGroups/" + RESOURCE_GROUP + "/providers/Microsoft.Cdn/CdnWebApplicationFirewallPolicies/" + CDN_WEB_APPLICATION_FIREWALL_POLICY_NAME + "" - # }, - "location": "WestUs", - "tags": { - "kay1": "value1" - } + "origin_host_header": "www.bing.com", + "origin_path": "/image", + "content_types_to_compress": ["text/html", "application/octet-stream"], + "is_compression_enabled": True, + "is_http_allowed": True, + "is_https_allowed": True, + "query_string_caching_behavior": "BypassCaching", + # "delivery_policy": { + # "description": "Test description for a policy.", + # "rules": [ + # { + # "name": "rule1", + # "order": "1", + # "conditions": [ + # { + # "name": "RemoteAddress", + # "parameters": { + # "operator": "IPMatch", + # "negate_condition": True, + # "match_values": [ + # "192.168.1.0/24", + # "10.0.0.0/24" + # ], + # "@odata.type": "#Microsoft.Azure.Cdn.Models.DeliveryRuleRemoteAddressConditionParameters" + # } + # } + # ], + # "actions": [ + # { + # "name": "CacheExpiration", + # "parameters": { + # "cache_behavior": "Override", + # "cache_duration": "10:10:09", + # "@odata.type": "#Microsoft.Azure.Cdn.Models.DeliveryRuleCacheExpirationActionParameters", + # "cache_type": "All" + # } + # }, + # { + # "name": "ModifyResponseHeader", + # "parameters": { + # "header_action": "Overwrite", + # "header_name": "Access-Control-Allow-Origin", + # "value": "*", + # "@odata.type": "#Microsoft.Azure.Cdn.Models.DeliveryRuleHeaderActionParameters" + # } + # }, + # { + # "name": "ModifyRequestHeader", + # "parameters": { + # "header_action": "Overwrite", + # "header_name": "Accept-Encoding", + # "value": "gzip", + # "@odata.type": "#Microsoft.Azure.Cdn.Models.DeliveryRuleHeaderActionParameters" + # } + # } + # ] + # } + # ] + # }, + "origins": [{"name": "origin1", "host_name": "host1.hello.com"}], + # "web_application_firewall_policy_link": { + # "id": "/subscriptions/" + SUBSCRIPTION_ID + "/resourceGroups/" + RESOURCE_GROUP + "/providers/Microsoft.Cdn/CdnWebApplicationFirewallPolicies/" + CDN_WEB_APPLICATION_FIREWALL_POLICY_NAME + "" + # }, + "location": "WestUs", + "tags": {"kay1": "value1"}, } result = self.mgmt_client.endpoints.begin_create(resource_group.name, PROFILE_NAME, ENDPOINT_NAME, BODY) result = result.result() @@ -336,11 +321,10 @@ def test_cdn(self, resource_group): """ # Origins_Update[patch] - BODY = { - "http_port": "42", - "https_port": "43" - } - result = self.mgmt_client.origins.begin_update(resource_group.name, PROFILE_NAME, ENDPOINT_NAME, ORIGIN_NAME, BODY) + BODY = {"http_port": "42", "https_port": "43"} + result = self.mgmt_client.origins.begin_update( + resource_group.name, PROFILE_NAME, ENDPOINT_NAME, ORIGIN_NAME, BODY + ) result = result.result() """ @@ -454,21 +438,17 @@ def test_cdn(self, resource_group): """ # Endpoints_ValidateCustomDomain[post] - BODY = { - "host_name": "www.someDomain.com" - } + BODY = {"host_name": "www.someDomain.com"} # HOST_NAME = "www.someDomain.com" - result = self.mgmt_client.endpoints.validate_custom_domain(resource_group.name, PROFILE_NAME, ENDPOINT_NAME, BODY) + result = self.mgmt_client.endpoints.validate_custom_domain( + resource_group.name, PROFILE_NAME, ENDPOINT_NAME, BODY + ) # Endpoints_ListResourceUsage[post] result = self.mgmt_client.endpoints.list_resource_usage(resource_group.name, PROFILE_NAME, ENDPOINT_NAME) # Endpoints_PurgeContent[post] - BODY = { - "content_paths": [ - "/folder1" - ] - } + BODY = {"content_paths": ["/folder1"]} # CONTENT_PATHS = ["/folder1"] result = self.mgmt_client.endpoints.begin_purge_content(resource_group.name, PROFILE_NAME, ENDPOINT_NAME, BODY) result = result.result() @@ -482,11 +462,7 @@ def test_cdn(self, resource_group): result = result.result() # Endpoints_LoadContent[post] - BODY = { - "content_paths": [ - "/folder1" - ] - } + BODY = {"content_paths": ["/folder1"]} # CONTENT_PATHS = ["/folder1"] result = self.mgmt_client.endpoints.begin_load_content(resource_group.name, PROFILE_NAME, ENDPOINT_NAME, BODY) result = result.result() @@ -496,12 +472,10 @@ def test_cdn(self, resource_group): # Endpoints_Update[patch] BODY = { - "tags": { - "additional_properties": "Tag1" - }, - # "web_application_firewall_policy_link": { - # "id": "/subscriptions/" + SUBSCRIPTION_ID + "/resourceGroups/" + RESOURCE_GROUP + "/providers/Microsoft.Cdn/CdnWebApplicationFirewallPolicies/" + CDN_WEB_APPLICATION_FIREWALL_POLICY_NAME + "" - # } + "tags": {"additional_properties": "Tag1"}, + # "web_application_firewall_policy_link": { + # "id": "/subscriptions/" + SUBSCRIPTION_ID + "/resourceGroups/" + RESOURCE_GROUP + "/providers/Microsoft.Cdn/CdnWebApplicationFirewallPolicies/" + CDN_WEB_APPLICATION_FIREWALL_POLICY_NAME + "" + # } } result = self.mgmt_client.endpoints.begin_update(resource_group.name, PROFILE_NAME, ENDPOINT_NAME, BODY) result = result.result() @@ -513,19 +487,12 @@ def test_cdn(self, resource_group): result = self.mgmt_client.profiles.generate_sso_uri(resource_group.name, PROFILE_NAME) # Profiles_Update[patch] - BODY = { - "tags": { - "additional_properties": "Tag1" - } - } + BODY = {"tags": {"additional_properties": "Tag1"}} result = self.mgmt_client.profiles.begin_update(resource_group.name, PROFILE_NAME, BODY) result = result.result() # CheckNameAvailabilityWithSubscription[post] - BODY = { - "name": "sampleName", - "type": "Microsoft.Cdn/Profiles/Endpoints" - } + BODY = {"name": "sampleName", "type": "Microsoft.Cdn/Profiles/Endpoints"} # CHECK_NAME = "sampleName" result = self.mgmt_client.check_name_availability_with_subscription(BODY) @@ -533,22 +500,19 @@ def test_cdn(self, resource_group): result = self.mgmt_client.resource_usage.list() # ValidateProbe[post] - BODY = { - "probe_url": "https://www.bing.com/image" - } + BODY = {"probe_url": "https://www.bing.com/image"} # PROBEURL = "https://www.bing.com/image" result = self.mgmt_client.validate_probe(BODY) # CheckNameAvailability[post] - BODY = { - "name": "sampleName", - "type": "Microsoft.Cdn/Profiles/Endpoints" - } + BODY = {"name": "sampleName", "type": "Microsoft.Cdn/Profiles/Endpoints"} # CHECKNAME = "sampleName" result = self.mgmt_client.check_name_availability(BODY) # CustomDomains_Delete[delete] - result = self.mgmt_client.custom_domains.begin_delete(resource_group.name, PROFILE_NAME, ENDPOINT_NAME, CUSTOM_DOMAIN_NAME) + result = self.mgmt_client.custom_domains.begin_delete( + resource_group.name, PROFILE_NAME, ENDPOINT_NAME, CUSTOM_DOMAIN_NAME + ) result = result.result() """ @@ -565,6 +529,6 @@ def test_cdn(self, resource_group): result = result.result() -#------------------------------------------------------------------------------ -if __name__ == '__main__': +# ------------------------------------------------------------------------------ +if __name__ == "__main__": unittest.main() diff --git a/sdk/cdn/azure-mgmt-cdn/tsp-location.yaml b/sdk/cdn/azure-mgmt-cdn/tsp-location.yaml new file mode 100644 index 000000000000..1961cb745f2d --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/tsp-location.yaml @@ -0,0 +1,4 @@ +directory: specification/cdn/resource-manager/Microsoft.Cdn/Cdn +commit: eb08171fefa9dc5953ec462776a45f9a944853ad +repo: Azure/azure-rest-api-specs +additionalDirectories: From 6990f932962ce76dfd799200929e17d021d73f0d Mon Sep 17 00:00:00 2001 From: Yuchao Yan Date: Tue, 19 May 2026 14:36:18 +0800 Subject: [PATCH 3/3] changelog from report comparison --- sdk/cdn/azure-mgmt-cdn/CHANGELOG.md | 264 +++++++++++++++++++++++++++- 1 file changed, 263 insertions(+), 1 deletion(-) diff --git a/sdk/cdn/azure-mgmt-cdn/CHANGELOG.md b/sdk/cdn/azure-mgmt-cdn/CHANGELOG.md index 57ba49fb6f19..7d889b6aea0c 100644 --- a/sdk/cdn/azure-mgmt-cdn/CHANGELOG.md +++ b/sdk/cdn/azure-mgmt-cdn/CHANGELOG.md @@ -2,7 +2,269 @@ ## 13.2.0 (2026-05-19) -skip changelog generation +### Features Added + + - Model `AFDDomain` added property `properties` + - Model `AFDEndpoint` added property `properties` + - Model `AFDEndpointUpdateParameters` added property `properties` + - Model `AFDOrigin` added property `properties` + - Model `AFDOriginGroup` added property `properties` + - Model `CanMigrateResult` added property `properties` + - Model `Endpoint` added property `properties` + - Model `EndpointUpdateParameters` added property `properties` + - Model `Operation` added property `operation_properties` + - Model `Origin` added property `properties` + - Model `OriginGroup` added property `properties` + - Enum `PolicySettingsDefaultCustomBlockResponseStatusCode` added member `ENUM_200` + - Enum `PolicySettingsDefaultCustomBlockResponseStatusCode` added member `ENUM_403` + - Enum `PolicySettingsDefaultCustomBlockResponseStatusCode` added member `ENUM_405` + - Enum `PolicySettingsDefaultCustomBlockResponseStatusCode` added member `ENUM_406` + - Enum `PolicySettingsDefaultCustomBlockResponseStatusCode` added member `ENUM_429` + - Model `ProfileUpdateParameters` added property `properties` + - Model `Route` added property `properties` + - Model `Rule` added property `properties` + - Model `RuleSet` added property `properties` + - Model `Secret` added property `properties` + - Model `SecurityPolicy` added property `properties` + - Added model `CanMigrateProperties` + - Added model `CustomDomainPropertiesParameters` + - Added enum `DeliveryRuleActionName` + - Added model `OperationProperties` + - Added model `ProfilePropertiesUpdateParameters` + - Added model `SecurityPolicyUpdateProperties` + +### Breaking Changes + + - Deleted or renamed client `CdnManagementClient` + - Model `AFDDomain` deleted or renamed its instance variable `profile_name` + - Model `AFDDomain` deleted or renamed its instance variable `tls_settings` + - Model `AFDDomain` deleted or renamed its instance variable `azure_dns_zone` + - Model `AFDDomain` deleted or renamed its instance variable `pre_validated_custom_domain_resource_id` + - Model `AFDDomain` deleted or renamed its instance variable `provisioning_state` + - Model `AFDDomain` deleted or renamed its instance variable `deployment_status` + - Model `AFDDomain` deleted or renamed its instance variable `domain_validation_state` + - Model `AFDDomain` deleted or renamed its instance variable `host_name` + - Model `AFDDomain` deleted or renamed its instance variable `extended_properties` + - Model `AFDDomain` deleted or renamed its instance variable `validation_properties` + - Model `AFDDomainUpdateParameters` deleted or renamed its instance variable `profile_name` + - Model `AFDDomainUpdateParameters` deleted or renamed its instance variable `tls_settings` + - Model `AFDDomainUpdateParameters` deleted or renamed its instance variable `azure_dns_zone` + - Model `AFDDomainUpdateParameters` deleted or renamed its instance variable `pre_validated_custom_domain_resource_id` + - Model `AFDEndpoint` deleted or renamed its instance variable `profile_name` + - Model `AFDEndpoint` deleted or renamed its instance variable `enabled_state` + - Model `AFDEndpoint` deleted or renamed its instance variable `provisioning_state` + - Model `AFDEndpoint` deleted or renamed its instance variable `deployment_status` + - Model `AFDEndpoint` deleted or renamed its instance variable `host_name` + - Model `AFDEndpoint` deleted or renamed its instance variable `auto_generated_domain_name_label_scope` + - Model `AFDEndpointUpdateParameters` deleted or renamed its instance variable `profile_name` + - Model `AFDEndpointUpdateParameters` deleted or renamed its instance variable `enabled_state` + - Model `AFDOrigin` deleted or renamed its instance variable `origin_group_name` + - Model `AFDOrigin` deleted or renamed its instance variable `azure_origin` + - Model `AFDOrigin` deleted or renamed its instance variable `host_name` + - Model `AFDOrigin` deleted or renamed its instance variable `http_port` + - Model `AFDOrigin` deleted or renamed its instance variable `https_port` + - Model `AFDOrigin` deleted or renamed its instance variable `origin_host_header` + - Model `AFDOrigin` deleted or renamed its instance variable `priority` + - Model `AFDOrigin` deleted or renamed its instance variable `weight` + - Model `AFDOrigin` deleted or renamed its instance variable `shared_private_link_resource` + - Model `AFDOrigin` deleted or renamed its instance variable `enabled_state` + - Model `AFDOrigin` deleted or renamed its instance variable `enforce_certificate_name_check` + - Model `AFDOrigin` deleted or renamed its instance variable `provisioning_state` + - Model `AFDOrigin` deleted or renamed its instance variable `deployment_status` + - Model `AFDOriginGroup` deleted or renamed its instance variable `profile_name` + - Model `AFDOriginGroup` deleted or renamed its instance variable `load_balancing_settings` + - Model `AFDOriginGroup` deleted or renamed its instance variable `health_probe_settings` + - Model `AFDOriginGroup` deleted or renamed its instance variable `traffic_restoration_time_to_healed_or_new_endpoints_in_minutes` + - Model `AFDOriginGroup` deleted or renamed its instance variable `session_affinity_state` + - Model `AFDOriginGroup` deleted or renamed its instance variable `authentication` + - Model `AFDOriginGroup` deleted or renamed its instance variable `provisioning_state` + - Model `AFDOriginGroup` deleted or renamed its instance variable `deployment_status` + - Model `AFDOriginGroupUpdateParameters` deleted or renamed its instance variable `profile_name` + - Model `AFDOriginGroupUpdateParameters` deleted or renamed its instance variable `load_balancing_settings` + - Model `AFDOriginGroupUpdateParameters` deleted or renamed its instance variable `health_probe_settings` + - Model `AFDOriginGroupUpdateParameters` deleted or renamed its instance variable `traffic_restoration_time_to_healed_or_new_endpoints_in_minutes` + - Model `AFDOriginGroupUpdateParameters` deleted or renamed its instance variable `session_affinity_state` + - Model `AFDOriginGroupUpdateParameters` deleted or renamed its instance variable `authentication` + - Model `AFDOriginUpdateParameters` deleted or renamed its instance variable `origin_group_name` + - Model `AFDOriginUpdateParameters` deleted or renamed its instance variable `azure_origin` + - Model `AFDOriginUpdateParameters` deleted or renamed its instance variable `host_name` + - Model `AFDOriginUpdateParameters` deleted or renamed its instance variable `http_port` + - Model `AFDOriginUpdateParameters` deleted or renamed its instance variable `https_port` + - Model `AFDOriginUpdateParameters` deleted or renamed its instance variable `origin_host_header` + - Model `AFDOriginUpdateParameters` deleted or renamed its instance variable `priority` + - Model `AFDOriginUpdateParameters` deleted or renamed its instance variable `weight` + - Model `AFDOriginUpdateParameters` deleted or renamed its instance variable `shared_private_link_resource` + - Model `AFDOriginUpdateParameters` deleted or renamed its instance variable `enabled_state` + - Model `AFDOriginUpdateParameters` deleted or renamed its instance variable `enforce_certificate_name_check` + - Model `CanMigrateResult` deleted or renamed its instance variable `can_migrate` + - Model `CanMigrateResult` deleted or renamed its instance variable `default_sku` + - Model `CanMigrateResult` deleted or renamed its instance variable `errors` + - Model `CustomDomainParameters` deleted or renamed its instance variable `host_name` + - Model `Endpoint` deleted or renamed its instance variable `origin_path` + - Model `Endpoint` deleted or renamed its instance variable `content_types_to_compress` + - Model `Endpoint` deleted or renamed its instance variable `origin_host_header` + - Model `Endpoint` deleted or renamed its instance variable `is_compression_enabled` + - Model `Endpoint` deleted or renamed its instance variable `is_http_allowed` + - Model `Endpoint` deleted or renamed its instance variable `is_https_allowed` + - Model `Endpoint` deleted or renamed its instance variable `query_string_caching_behavior` + - Model `Endpoint` deleted or renamed its instance variable `optimization_type` + - Model `Endpoint` deleted or renamed its instance variable `probe_path` + - Model `Endpoint` deleted or renamed its instance variable `geo_filters` + - Model `Endpoint` deleted or renamed its instance variable `default_origin_group` + - Model `Endpoint` deleted or renamed its instance variable `url_signing_keys` + - Model `Endpoint` deleted or renamed its instance variable `delivery_policy` + - Model `Endpoint` deleted or renamed its instance variable `web_application_firewall_policy_link` + - Model `Endpoint` deleted or renamed its instance variable `host_name` + - Model `Endpoint` deleted or renamed its instance variable `origins` + - Model `Endpoint` deleted or renamed its instance variable `origin_groups` + - Model `Endpoint` deleted or renamed its instance variable `custom_domains` + - Model `Endpoint` deleted or renamed its instance variable `resource_state` + - Model `Endpoint` deleted or renamed its instance variable `provisioning_state` + - Model `EndpointUpdateParameters` deleted or renamed its instance variable `origin_path` + - Model `EndpointUpdateParameters` deleted or renamed its instance variable `content_types_to_compress` + - Model `EndpointUpdateParameters` deleted or renamed its instance variable `origin_host_header` + - Model `EndpointUpdateParameters` deleted or renamed its instance variable `is_compression_enabled` + - Model `EndpointUpdateParameters` deleted or renamed its instance variable `is_http_allowed` + - Model `EndpointUpdateParameters` deleted or renamed its instance variable `is_https_allowed` + - Model `EndpointUpdateParameters` deleted or renamed its instance variable `query_string_caching_behavior` + - Model `EndpointUpdateParameters` deleted or renamed its instance variable `optimization_type` + - Model `EndpointUpdateParameters` deleted or renamed its instance variable `probe_path` + - Model `EndpointUpdateParameters` deleted or renamed its instance variable `geo_filters` + - Model `EndpointUpdateParameters` deleted or renamed its instance variable `default_origin_group` + - Model `EndpointUpdateParameters` deleted or renamed its instance variable `url_signing_keys` + - Model `EndpointUpdateParameters` deleted or renamed its instance variable `delivery_policy` + - Model `EndpointUpdateParameters` deleted or renamed its instance variable `web_application_firewall_policy_link` + - Model `Operation` deleted or renamed its instance variable `service_specification` + - Model `Origin` deleted or renamed its instance variable `host_name` + - Model `Origin` deleted or renamed its instance variable `http_port` + - Model `Origin` deleted or renamed its instance variable `https_port` + - Model `Origin` deleted or renamed its instance variable `origin_host_header` + - Model `Origin` deleted or renamed its instance variable `priority` + - Model `Origin` deleted or renamed its instance variable `weight` + - Model `Origin` deleted or renamed its instance variable `enabled` + - Model `Origin` deleted or renamed its instance variable `private_link_alias` + - Model `Origin` deleted or renamed its instance variable `private_link_resource_id` + - Model `Origin` deleted or renamed its instance variable `private_link_location` + - Model `Origin` deleted or renamed its instance variable `private_link_approval_message` + - Model `Origin` deleted or renamed its instance variable `resource_state` + - Model `Origin` deleted or renamed its instance variable `provisioning_state` + - Model `Origin` deleted or renamed its instance variable `private_endpoint_status` + - Model `OriginGroup` deleted or renamed its instance variable `health_probe_settings` + - Model `OriginGroup` deleted or renamed its instance variable `origins` + - Model `OriginGroup` deleted or renamed its instance variable `traffic_restoration_time_to_healed_or_new_endpoints_in_minutes` + - Model `OriginGroup` deleted or renamed its instance variable `response_based_origin_error_detection_settings` + - Model `OriginGroup` deleted or renamed its instance variable `resource_state` + - Model `OriginGroup` deleted or renamed its instance variable `provisioning_state` + - Model `OriginGroupUpdateParameters` deleted or renamed its instance variable `health_probe_settings` + - Model `OriginGroupUpdateParameters` deleted or renamed its instance variable `origins` + - Model `OriginGroupUpdateParameters` deleted or renamed its instance variable `traffic_restoration_time_to_healed_or_new_endpoints_in_minutes` + - Model `OriginGroupUpdateParameters` deleted or renamed its instance variable `response_based_origin_error_detection_settings` + - Model `OriginUpdateParameters` deleted or renamed its instance variable `host_name` + - Model `OriginUpdateParameters` deleted or renamed its instance variable `http_port` + - Model `OriginUpdateParameters` deleted or renamed its instance variable `https_port` + - Model `OriginUpdateParameters` deleted or renamed its instance variable `origin_host_header` + - Model `OriginUpdateParameters` deleted or renamed its instance variable `priority` + - Model `OriginUpdateParameters` deleted or renamed its instance variable `weight` + - Model `OriginUpdateParameters` deleted or renamed its instance variable `enabled` + - Model `OriginUpdateParameters` deleted or renamed its instance variable `private_link_alias` + - Model `OriginUpdateParameters` deleted or renamed its instance variable `private_link_resource_id` + - Model `OriginUpdateParameters` deleted or renamed its instance variable `private_link_location` + - Model `OriginUpdateParameters` deleted or renamed its instance variable `private_link_approval_message` + - Deleted or renamed enum value `PolicySettingsDefaultCustomBlockResponseStatusCode.FOUR_HUNDRED_FIVE` + - Deleted or renamed enum value `PolicySettingsDefaultCustomBlockResponseStatusCode.FOUR_HUNDRED_SIX` + - Deleted or renamed enum value `PolicySettingsDefaultCustomBlockResponseStatusCode.FOUR_HUNDRED_THREE` + - Deleted or renamed enum value `PolicySettingsDefaultCustomBlockResponseStatusCode.FOUR_HUNDRED_TWENTY_NINE` + - Deleted or renamed enum value `PolicySettingsDefaultCustomBlockResponseStatusCode.TWO_HUNDRED` + - Model `ProfileUpdateParameters` deleted or renamed its instance variable `origin_response_timeout_seconds` + - Model `ProfileUpdateParameters` deleted or renamed its instance variable `log_scrubbing` + - Model `Route` deleted or renamed its instance variable `endpoint_name` + - Model `Route` deleted or renamed its instance variable `custom_domains` + - Model `Route` deleted or renamed its instance variable `origin_group` + - Model `Route` deleted or renamed its instance variable `origin_path` + - Model `Route` deleted or renamed its instance variable `rule_sets` + - Model `Route` deleted or renamed its instance variable `supported_protocols` + - Model `Route` deleted or renamed its instance variable `patterns_to_match` + - Model `Route` deleted or renamed its instance variable `cache_configuration` + - Model `Route` deleted or renamed its instance variable `forwarding_protocol` + - Model `Route` deleted or renamed its instance variable `link_to_default_domain` + - Model `Route` deleted or renamed its instance variable `https_redirect` + - Model `Route` deleted or renamed its instance variable `enabled_state` + - Model `Route` deleted or renamed its instance variable `provisioning_state` + - Model `Route` deleted or renamed its instance variable `deployment_status` + - Model `RouteUpdateParameters` deleted or renamed its instance variable `endpoint_name` + - Model `RouteUpdateParameters` deleted or renamed its instance variable `custom_domains` + - Model `RouteUpdateParameters` deleted or renamed its instance variable `origin_group` + - Model `RouteUpdateParameters` deleted or renamed its instance variable `origin_path` + - Model `RouteUpdateParameters` deleted or renamed its instance variable `rule_sets` + - Model `RouteUpdateParameters` deleted or renamed its instance variable `supported_protocols` + - Model `RouteUpdateParameters` deleted or renamed its instance variable `patterns_to_match` + - Model `RouteUpdateParameters` deleted or renamed its instance variable `cache_configuration` + - Model `RouteUpdateParameters` deleted or renamed its instance variable `forwarding_protocol` + - Model `RouteUpdateParameters` deleted or renamed its instance variable `link_to_default_domain` + - Model `RouteUpdateParameters` deleted or renamed its instance variable `https_redirect` + - Model `RouteUpdateParameters` deleted or renamed its instance variable `enabled_state` + - Model `Rule` deleted or renamed its instance variable `rule_set_name` + - Model `Rule` deleted or renamed its instance variable `order` + - Model `Rule` deleted or renamed its instance variable `conditions` + - Model `Rule` deleted or renamed its instance variable `actions` + - Model `Rule` deleted or renamed its instance variable `match_processing_behavior` + - Model `Rule` deleted or renamed its instance variable `provisioning_state` + - Model `Rule` deleted or renamed its instance variable `deployment_status` + - Model `RuleSet` deleted or renamed its instance variable `provisioning_state` + - Model `RuleSet` deleted or renamed its instance variable `deployment_status` + - Model `RuleSet` deleted or renamed its instance variable `profile_name` + - Model `RuleUpdateParameters` deleted or renamed its instance variable `rule_set_name` + - Model `RuleUpdateParameters` deleted or renamed its instance variable `order` + - Model `RuleUpdateParameters` deleted or renamed its instance variable `conditions` + - Model `RuleUpdateParameters` deleted or renamed its instance variable `actions` + - Model `RuleUpdateParameters` deleted or renamed its instance variable `match_processing_behavior` + - Model `Secret` deleted or renamed its instance variable `provisioning_state` + - Model `Secret` deleted or renamed its instance variable `deployment_status` + - Model `Secret` deleted or renamed its instance variable `profile_name` + - Model `Secret` deleted or renamed its instance variable `parameters` + - Model `SecurityPolicy` deleted or renamed its instance variable `provisioning_state` + - Model `SecurityPolicy` deleted or renamed its instance variable `deployment_status` + - Model `SecurityPolicy` deleted or renamed its instance variable `profile_name` + - Model `SecurityPolicy` deleted or renamed its instance variable `parameters` + - Model `SecurityPolicyUpdateParameters` deleted or renamed its instance variable `parameters` + - Deleted or renamed model `AzureFirstPartyManagedCertificate` + - Deleted or renamed model `CdnWebApplicationFirewallPolicyList` + - Deleted or renamed model `Certificate` + - Deleted or renamed model `CustomerCertificate` + - Deleted or renamed model `DeliveryRuleActionEnum` + - Deleted or renamed model `EdgenodeResult` + - Deleted or renamed model `ManagedCertificate` + - Deleted or renamed model `ManagedRuleSetDefinitionList` + - Deleted or renamed model `ValidationToken` + - Method `LogAnalyticsOperations.get_log_analytics_metrics` changed its parameter `metrics` from `positional_or_keyword` to `keyword_only` + - Method `LogAnalyticsOperations.get_log_analytics_metrics` changed its parameter `date_time_begin` from `positional_or_keyword` to `keyword_only` + - Method `LogAnalyticsOperations.get_log_analytics_metrics` changed its parameter `date_time_end` from `positional_or_keyword` to `keyword_only` + - Method `LogAnalyticsOperations.get_log_analytics_metrics` changed its parameter `granularity` from `positional_or_keyword` to `keyword_only` + - Method `LogAnalyticsOperations.get_log_analytics_metrics` changed its parameter `custom_domains` from `positional_or_keyword` to `keyword_only` + - Method `LogAnalyticsOperations.get_log_analytics_metrics` changed its parameter `protocols` from `positional_or_keyword` to `keyword_only` + - Method `LogAnalyticsOperations.get_log_analytics_metrics` changed its parameter `group_by` from `positional_or_keyword` to `keyword_only` + - Method `LogAnalyticsOperations.get_log_analytics_metrics` changed its parameter `continents` from `positional_or_keyword` to `keyword_only` + - Method `LogAnalyticsOperations.get_log_analytics_metrics` changed its parameter `country_or_regions` from `positional_or_keyword` to `keyword_only` + - Method `LogAnalyticsOperations.get_log_analytics_rankings` changed its parameter `rankings` from `positional_or_keyword` to `keyword_only` + - Method `LogAnalyticsOperations.get_log_analytics_rankings` changed its parameter `metrics` from `positional_or_keyword` to `keyword_only` + - Method `LogAnalyticsOperations.get_log_analytics_rankings` changed its parameter `max_ranking` from `positional_or_keyword` to `keyword_only` + - Method `LogAnalyticsOperations.get_log_analytics_rankings` changed its parameter `date_time_begin` from `positional_or_keyword` to `keyword_only` + - Method `LogAnalyticsOperations.get_log_analytics_rankings` changed its parameter `date_time_end` from `positional_or_keyword` to `keyword_only` + - Method `LogAnalyticsOperations.get_log_analytics_rankings` changed its parameter `custom_domains` from `positional_or_keyword` to `keyword_only` + - Method `LogAnalyticsOperations.get_waf_log_analytics_metrics` changed its parameter `metrics` from `positional_or_keyword` to `keyword_only` + - Method `LogAnalyticsOperations.get_waf_log_analytics_metrics` changed its parameter `date_time_begin` from `positional_or_keyword` to `keyword_only` + - Method `LogAnalyticsOperations.get_waf_log_analytics_metrics` changed its parameter `date_time_end` from `positional_or_keyword` to `keyword_only` + - Method `LogAnalyticsOperations.get_waf_log_analytics_metrics` changed its parameter `granularity` from `positional_or_keyword` to `keyword_only` + - Method `LogAnalyticsOperations.get_waf_log_analytics_metrics` changed its parameter `actions` from `positional_or_keyword` to `keyword_only` + - Method `LogAnalyticsOperations.get_waf_log_analytics_metrics` changed its parameter `group_by` from `positional_or_keyword` to `keyword_only` + - Method `LogAnalyticsOperations.get_waf_log_analytics_metrics` changed its parameter `rule_types` from `positional_or_keyword` to `keyword_only` + - Method `LogAnalyticsOperations.get_waf_log_analytics_rankings` changed its parameter `metrics` from `positional_or_keyword` to `keyword_only` + - Method `LogAnalyticsOperations.get_waf_log_analytics_rankings` changed its parameter `date_time_begin` from `positional_or_keyword` to `keyword_only` + - Method `LogAnalyticsOperations.get_waf_log_analytics_rankings` changed its parameter `date_time_end` from `positional_or_keyword` to `keyword_only` + - Method `LogAnalyticsOperations.get_waf_log_analytics_rankings` changed its parameter `max_ranking` from `positional_or_keyword` to `keyword_only` + - Method `LogAnalyticsOperations.get_waf_log_analytics_rankings` changed its parameter `rankings` from `positional_or_keyword` to `keyword_only` + - Method `LogAnalyticsOperations.get_waf_log_analytics_rankings` changed its parameter `actions` from `positional_or_keyword` to `keyword_only` + - Method `LogAnalyticsOperations.get_waf_log_analytics_rankings` changed its parameter `rule_types` from `positional_or_keyword` to `keyword_only` ## 13.1.1 (2024-06-12)